/* ============================================================
   MeetMind — Global Styles
   Dark, premium aesthetic inspired by Linear & Vercel
   ============================================================ */

/* ---- CSS Variables / Design Tokens ---- */
:root {
  --bg-primary: #0D0F14;
  --bg-secondary: #13151C;
  --bg-card: #1A1D24;
  --bg-card-hover: #22252E;
  --bg-elevated: #252830;
  --border-color: #2A2D36;
  --border-subtle: #1E2028;
  --accent: #6C63FF;
  --accent-glow: rgba(108, 99, 255, 0.25);
  --accent-hover: #7B73FF;
  --accent-soft: rgba(108, 99, 255, 0.12);
  --text-primary: #F0F0F5;
  --text-secondary: #8B8D97;
  --text-tertiary: #5A5C66;
  --success: #00D4AA;
  --success-soft: rgba(0, 212, 170, 0.12);
  --danger: #FF5C5C;
  --danger-soft: rgba(255, 92, 92, 0.12);
  --warning: #FFB84D;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50%;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px var(--accent-glow);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 72px;
  --header-height: 60px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

input, button { font-family: var(--font-body); }

/* ---- App Shell ---- */
#app {
  max-width: 430px;
  margin: 0 auto;
  height: 100dvh;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

/* ---- Screens ---- */
.screen {
  position: absolute;
  inset: 0;
  padding: 0 20px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
  padding-bottom: var(--nav-height);
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  -webkit-overflow-scrolling: touch;
}

.screen.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.screen::-webkit-scrollbar { display: none; }
.screen { scrollbar-width: none; }

/* ---- Screen Header ---- */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 10;
  margin-top: 4px;
}

.screen-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
}

.icon-btn {
  width: 40px; height: 40px;
  border: none; background: var(--bg-card);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s;
}

.icon-btn:active { transform: scale(0.92); background: var(--bg-elevated); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---- Home Screen ---- */
.greeting-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.greeting {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
}

.avatar-btn {
  width: 42px; height: 42px;
  border-radius: var(--radius-full);
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.1s;
}

.avatar-btn:active { transform: scale(0.92); }

/* Search */
.search-container {
  position: relative;
  margin: 8px 0 16px;
}

.search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-tertiary);
  width: 16px; height: 16px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

.search-input::placeholder { color: var(--text-tertiary); }
.search-input:focus { border-color: var(--accent); }

/* CTA Button */
.cta-button {
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--accent), #8B83FF);
  border: none;
  border-radius: var(--radius-lg);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.3s;
  box-shadow: var(--shadow-glow);
  margin-bottom: 24px;
}

.cta-button:active { transform: scale(0.97); }
.cta-button:hover { box-shadow: 0 0 40px var(--accent-glow); }

.cta-icon-wrap {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}

.cta-icon { width: 18px; height: 18px; }
.cta-arrow { margin-left: auto; width: 18px; height: 18px; opacity: 0.7; }

/* Ripple effect */
.cta-button .ripple {
  position: absolute;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: ripple-anim 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* Section header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
}

.text-btn {
  background: none; border: none;
  color: var(--accent);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
}

/* ---- Meeting Cards ---- */
.meetings-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 20px; }

.meeting-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s, border-color var(--transition);
  animation: fadeInUp 0.3s ease forwards;
}

.meeting-card:active { transform: scale(0.98); background: var(--bg-card-hover); }
.meeting-card:hover { border-color: var(--accent); }

.meeting-card-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meeting-card-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.meeting-card-meta span { display: flex; align-items: center; gap: 4px; }
.meeting-card-meta svg { width: 12px; height: 12px; }

.meta-dot { color: var(--text-tertiary); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Empty States ---- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  animation: fadeInUp 0.4s ease;
}

.empty-icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
}

.empty-icon svg { width: 28px; height: 28px; color: var(--text-tertiary); }

.empty-state h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--text-secondary);
}

.empty-inline {
  text-align: center;
  padding: 16px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ---- Record Screen ---- */
.record-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}

.meeting-title-input {
  width: 100%;
  text-align: center;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  outline: none;
  margin-bottom: 24px;
  transition: border-color var(--transition);
}

.meeting-title-input::placeholder { color: var(--text-tertiary); }
.meeting-title-input:focus { border-color: var(--accent); }

/* Pre-record state */
.pre-record-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 60px 0 40px;
}

.big-record-btn {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent), #8B83FF);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: 0 0 40px var(--accent-glow), 0 8px 32px rgba(0,0,0,0.4);
  transition: transform 0.15s, box-shadow 0.3s;
}

.big-record-btn:active { transform: scale(0.93); }
.big-record-btn:hover { box-shadow: 0 0 60px var(--accent-glow), 0 8px 32px rgba(0,0,0,0.4); }
.big-record-btn svg { width: 44px; height: 44px; z-index: 1; }

.big-record-ring {
  position: absolute;
  inset: -12px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-full);
  opacity: 0.3;
  animation: record-ring-pulse 2s ease-in-out infinite;
}

@keyframes record-ring-pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.08); opacity: 0.1; }
}

.pre-record-hint {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Waveform */
.waveform-container {
  width: 100%;
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.waveform-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 80px;
}

.waveform-bar {
  width: 4px;
  background: var(--accent);
  border-radius: 2px;
  transition: height 0.1s ease;
  min-height: 4px;
}

.waveform-bar.active {
  animation: waveform-pulse var(--anim-duration, 0.8s) ease-in-out infinite alternate;
  animation-delay: var(--anim-delay, 0s);
}

.waveform-bar.paused { animation-play-state: paused; }

@keyframes waveform-pulse {
  0% { height: var(--min-h, 8px); opacity: 0.5; }
  100% { height: var(--max-h, 60px); opacity: 1; }
}

.recording-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--danger);
  font-weight: 500;
}

.rec-dot {
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: var(--radius-full);
  animation: rec-blink 1s ease-in-out infinite;
}

@keyframes rec-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.timer {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 8px 0 24px;
  color: var(--text-primary);
}

/* Record controls */
.record-controls {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
}

.control-btn {
  width: 60px; height: 60px;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.control-btn:active { transform: scale(0.9); }
.control-btn svg { width: 22px; height: 22px; }

.control-btn.stop-btn {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.control-btn.stop-btn:hover { background: rgba(255, 92, 92, 0.2); }

/* Live transcript */
.live-transcript-container {
  width: 100%;
  margin-top: 8px;
}

.live-transcript-container h3 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-transcript-container h3 svg { width: 14px; height: 14px; color: var(--accent); }

.live-transcript {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  max-height: 180px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.transcript-placeholder { color: var(--text-tertiary); font-style: italic; }

/* ---- Processing Screen ---- */
.processing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px 20px;
  text-align: center;
}

.processing-spinner {
  position: relative;
  width: 80px; height: 80px;
  margin-bottom: 24px;
}

.spinner-ring {
  position: absolute;
  inset: 0;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.spinner-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 28px; height: 28px;
  color: var(--accent);
}

.processing-container h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  margin-bottom: 8px;
}

.processing-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.processing-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.processing-steps .step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-tertiary);
  transition: color 0.3s;
}

.processing-steps .step svg { width: 18px; height: 18px; }
.processing-steps .step.done { color: var(--success); }
.processing-steps .step.active { color: var(--accent); }
.processing-steps .step.active svg { animation: spin 1.5s linear infinite; }

/* ---- Summary Screen ---- */
.summary-container { padding-bottom: 24px; }

.header-actions {
  display: flex;
  gap: 6px;
}

/* Editable title */
.editable-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.edit-title-input {
  flex: 1;
  padding: 8px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  outline: none;
  transition: border-color var(--transition);
}

.edit-title-input:focus {
  border-bottom-color: var(--accent);
}

.icon-btn-sm {
  width: 32px; height: 32px;
  border: none;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  color: var(--text-tertiary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.icon-btn-sm:hover { background: var(--bg-elevated); color: var(--accent); }
.icon-btn-sm svg { width: 14px; height: 14px; }

.summary-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Summary action buttons */
.summary-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.action-btn-primary, .action-btn-secondary {
  flex: 1;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.3s;
  border: none;
}

.action-btn-primary {
  background: linear-gradient(135deg, var(--accent), #8B83FF);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.action-btn-primary:active { transform: scale(0.97); }
.action-btn-primary:hover { box-shadow: 0 0 40px var(--accent-glow); }

.action-btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.action-btn-secondary:active { transform: scale(0.97); }
.action-btn-secondary:hover { border-color: var(--accent); }

.action-btn-primary svg, .action-btn-secondary svg { width: 16px; height: 16px; }

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  animation: fadeInUp 0.35s ease forwards;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.card-header svg { width: 18px; height: 18px; color: var(--accent); }

.card-header h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}

.badge {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.summary-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-bullets li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.summary-bullets li::before {
  content: '';
  position: absolute;
  left: 0; top: 8px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: var(--radius-full);
}

/* Action items */
.action-items-list { display: flex; flex-direction: column; gap: 8px; }

.action-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.action-item.completed { opacity: 0.5; }
.action-item.completed .action-task { text-decoration: line-through; }

.action-checkbox {
  width: 20px; height: 20px; min-width: 20px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: transparent;
  transition: all var(--transition);
  margin-top: 1px;
}

.action-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
  color: var(--bg-primary);
}

.action-checkbox svg { width: 14px; height: 14px; }

.action-task {
  font-size: 13px;
  line-height: 1.45;
  flex: 1;
}

.action-assignee {
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  margin-top: 2px;
}

/* Decisions */
.decisions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.decisions-list li {
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  border-left: 3px solid var(--accent);
}

/* Transcript collapse */
.card-header.clickable {
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  color: inherit;
  margin-bottom: 0;
  padding: 0;
  transition: margin var(--transition);
}

.card-header.clickable[aria-expanded="true"] { margin-bottom: 14px; }

.chevron {
  width: 16px; height: 16px;
  color: var(--text-tertiary);
  transition: transform 0.3s ease;
}

.chevron.rotated { transform: rotate(180deg); }

.transcript-body {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
  overflow: hidden;
  white-space: pre-wrap;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

.transcript-body.collapsed { max-height: 0; opacity: 0; }
.transcript-body.expanded { max-height: 2000px; opacity: 1; }

/* ---- Filter Tabs ---- */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}

.filter-tab {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-tab.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Profile Screen ---- */
.profile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 8px 0 40px;
}

.profile-avatar-large {
  width: 80px; height: 80px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  border: 3px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
}

.settings-group {
  width: 100%;
}

.settings-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.settings-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

.settings-input:focus { border-color: var(--accent); }
.settings-input::placeholder { color: var(--text-tertiary); }

.settings-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

.radio-group { display: flex; gap: 16px; }

.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.radio-option input[type="radio"] {
  accent-color: var(--accent);
  width: 16px; height: 16px;
}

/* Toggle Switch */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-slider {
  width: 44px; height: 24px;
  background: var(--bg-elevated);
  border-radius: 12px;
  position: relative;
  transition: background var(--transition);
}

.toggle-slider::after {
  content: '';
  width: 18px; height: 18px;
  background: var(--text-primary);
  border-radius: var(--radius-full);
  position: absolute;
  top: 3px; left: 3px;
  transition: transform var(--transition);
}

.toggle-container input { display: none; }
.toggle-container input:checked + .toggle-slider { background: var(--accent); }
.toggle-container input:checked + .toggle-slider::after { transform: translateX(20px); }
.toggle-label { font-size: 14px; color: var(--text-secondary); }

.about-section { text-align: center; margin-top: 12px; }
.about-text { font-size: 14px; font-weight: 600; }
.about-sub { font-size: 12px; color: var(--text-tertiary); margin-top: 2px; }

.danger-btn {
  width: 100%;
  padding: 12px;
  background: var(--danger-soft);
  border: 1px solid rgba(255, 92, 92, 0.2);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--transition), transform 0.1s;
}

.danger-btn:active { transform: scale(0.97); }
.danger-btn svg { width: 16px; height: 16px; }

/* ---- Bottom Navigation ---- */
.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  transition: color var(--transition), transform 0.1s;
  position: relative;
}

.nav-item:active { transform: scale(0.9); }
.nav-item svg { width: 20px; height: 20px; }

.nav-item.active { color: var(--accent); }

.nav-item.active::before {
  content: '';
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 2px;
  background: var(--accent);
  border-radius: 0 0 2px 2px;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 340px;
  width: 100%;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.visible .modal-content { transform: scale(1); }

.modal-content h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  margin-bottom: 8px;
}

.modal-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

.modal-btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.modal-btn.cancel {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.modal-btn.confirm {
  background: var(--accent);
  color: #fff;
}

.modal-btn:active { transform: scale(0.95); }

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  max-width: 350px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Utility ---- */
.hidden { display: none !important; }

/* ============================================================
   SPLASH SCREEN
   ============================================================ */
.splash-screen {
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.splash-screen.active {
  opacity: 1;
  pointer-events: auto;
}

.splash-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: fadeInUp 0.6s ease;
}

.splash-logo {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-icon-ring {
  position: absolute;
  inset: 0;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  border-radius: var(--radius-full);
  animation: spin 1.5s linear infinite;
}

.splash-icon-ring-inner {
  position: absolute;
  inset: 10px;
  border: 2px solid transparent;
  border-bottom-color: var(--accent-hover);
  border-radius: var(--radius-full);
  animation: spin 2s linear infinite reverse;
}

.splash-icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  z-index: 1;
  animation: splash-pulse 1.5s ease-in-out infinite;
}

@keyframes splash-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}

.splash-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #8B83FF, var(--accent-hover));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

.splash-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 1px;
}

.splash-loader {
  width: 120px;
  height: 3px;
  background: var(--bg-card);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.splash-loader-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 2px;
  animation: splash-load 2s ease-in-out forwards;
}

@keyframes splash-load {
  0% { width: 0%; }
  30% { width: 40%; }
  60% { width: 70%; }
  100% { width: 100%; }
}

/* ============================================================
   AUTH SCREENS (Login / Signup)
   ============================================================ */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 40px 4px 40px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.auth-logo svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.auth-logo h1 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #8B83FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-heading {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
}

.auth-sub {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  text-align: center;
}

.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-field input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-field input::placeholder {
  color: var(--text-tertiary);
}

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-submit-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent), #8B83FF);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  margin-top: 8px;
  transition: transform 0.15s, box-shadow 0.3s, opacity 0.2s;
  box-shadow: var(--shadow-glow);
}

.auth-submit-btn:active { transform: scale(0.97); }
.auth-submit-btn:hover { box-shadow: 0 0 40px var(--accent-glow); }
.auth-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-submit-btn svg { width: 18px; height: 18px; }

.auth-switch {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

.auth-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.auth-link:hover { opacity: 0.8; }

.auth-error {
  width: 100%;
  padding: 10px 14px;
  background: var(--danger-soft);
  border: 1px solid rgba(255, 92, 92, 0.2);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 13px;
  text-align: center;
  animation: fadeInUp 0.3s ease;
}

/* ============================================================
   PROFILE EXTRAS (email display, logout)
   ============================================================ */
.profile-email-display {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: -12px;
  margin-bottom: 4px;
}

.logout-btn {
  width: 100%;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background var(--transition), transform 0.1s, color var(--transition);
}

.logout-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.logout-btn:active { transform: scale(0.97); }
.logout-btn svg { width: 16px; height: 16px; }
