/* ============================================================
   COUPLE QUIZ — Design System & Component Styles
   Mobile-first · Warm & Playful · Coral / Lavender palette
   ============================================================ */

/* ----- Design Tokens ----- */
:root {
  /* Colors */
  --color-primary: hsl(12, 76%, 65%);
  --color-primary-light: hsl(12, 76%, 80%);
  --color-primary-dark: hsl(12, 76%, 50%);
  --color-accent: hsl(260, 55%, 72%);
  --color-accent-light: hsl(260, 55%, 85%);
  --color-bg: hsl(30, 50%, 97%);
  --color-bg-card: hsl(0, 0%, 100%);
  --color-text: hsl(20, 15%, 20%);
  --color-text-muted: hsl(20, 10%, 50%);
  --color-success: hsl(150, 60%, 45%);
  --color-error: hsl(0, 70%, 60%);
  --color-border: hsl(20, 20%, 90%);

  /* Dimension palette */
  --dim-connection: hsl(12, 76%, 65%);
  --dim-communication: hsl(260, 55%, 72%);
  --dim-conflict: hsl(35, 85%, 55%);
  --dim-planning: hsl(170, 55%, 45%);
  --dim-affection: hsl(330, 65%, 65%);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px hsla(20, 30%, 20%, 0.06);
  --shadow-md: 0 4px 20px hsla(20, 30%, 20%, 0.1);
  --shadow-lg: 0 8px 40px hsla(20, 30%, 20%, 0.15);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Smooth intrinsic-size transitions (details/summary etc.) */
  interpolate-size: allow-keywords;
}

/* Animatable progress custom property */
@property --progress {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}


/* ============================================================
   RESET & GLOBAL
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background:
    linear-gradient(
      168deg,
      var(--color-bg) 0%,
      hsl(20, 45%, 95%) 40%,
      hsl(280, 30%, 96%) 100%
    );
  background-attachment: fixed;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}


/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem);  font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);    font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); font-weight: 600; }
h4 { font-size: clamp(1rem, 2vw, 1.25rem);    font-weight: 600; }

p {
  margin-bottom: 1rem;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-center {
  text-align: center;
}

.text-sm {
  font-size: 0.875rem;
}


/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem;
}

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
}


/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.8);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
}

.nav-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-brand:hover {
  text-decoration: none;
  color: var(--color-primary-dark);
}

.nav-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--color-primary);
  background: hsla(12, 76%, 65%, 0.08);
  text-decoration: none;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s, color 0.25s, border-color 0.25s;
  min-height: 48px;
  min-width: 48px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Primary */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  box-shadow: 0 4px 14px hsla(12, 76%, 50%, 0.3);
}

.btn-primary:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 22px hsla(12, 76%, 50%, 0.4);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Secondary */
.btn-secondary {
  background: #fff;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary-light);
  transform: scale(1.03);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  background: hsla(20, 20%, 90%, 0.5);
  color: var(--color-text);
}

/* Size modifiers */
.btn-sm {
  padding: 8px 18px;
  font-size: 0.875rem;
  min-height: 38px;
}

.btn-lg {
  padding: 18px 36px;
  font-size: 1.1rem;
}

.btn-block {
  display: flex;
  width: 100%;
}


/* ============================================================
   FORMS
   ============================================================ */

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg-card);
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.form-input::placeholder {
  color: hsl(20, 10%, 70%);
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px hsla(12, 76%, 65%, 0.12);
}

.form-input:user-valid {
  border-color: var(--color-success);
}

.form-input:user-invalid {
  border-color: var(--color-error);
}

.form-error {
  color: var(--color-error);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  min-height: 1.25rem;
}

.form-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}


/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-flat {
  box-shadow: var(--shadow-sm);
}

.card-flat:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.card-glass {
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem;
}


/* ============================================================
   HERO SECTION (Landing)
   ============================================================ */

.hero-section {
  text-align: center;
  padding: 3rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero-emoji {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
  animation: float 3s ease-in-out infinite;
}

.hero-title {
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--color-text-muted);
  max-width: 480px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  max-width: 320px;
  margin: 0 auto;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}


/* ============================================================
   HOW IT WORKS
   ============================================================ */

.steps-section {
  padding: 2rem 0;
}

.steps-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.steps-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.step-card {
  text-align: center;
  padding: 1.75rem 1.5rem;
}

.step-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: block;
}

.step-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.step-desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}


/* ============================================================
   QUIZ CONTAINER & CARD ANIMATIONS
   ============================================================ */

.quiz-container {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
}

.quiz-progress-area {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0;
}

.quiz-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem 0.75rem;
}

.quiz-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 1.25rem;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.quiz-back-btn:hover {
  background: hsla(20, 20%, 90%, 0.6);
  color: var(--color-text);
}

.quiz-back-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.quiz-counter {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-left: auto;
}

.quiz-cards-viewport {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.quiz-card {
  position: absolute;
  width: 100%;
  padding: 2rem 1.5rem;
  will-change: transform, opacity;
  transition:
    transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60dvh;
}

.quiz-card.active {
  transform: translateX(0);
  opacity: 1;
}

.quiz-card.prev {
  transform: translateX(-110%);
  opacity: 0;
  pointer-events: none;
}

.quiz-card.next {
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
}

/* Entry animation with @starting-style */
@starting-style {
  .quiz-card.active {
    transform: translateX(100%);
    opacity: 0;
  }
}

.quiz-card-inner {
  width: 100%;
  max-width: 500px;
}

.quiz-question-text {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 2.5rem;
  line-height: 1.45;
}

.quiz-dimension-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
  background: hsla(12, 76%, 65%, 0.1);
  color: var(--color-primary);
}


/* ============================================================
   PROGRESS BAR
   ============================================================ */

.progress-bar {
  height: 6px;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
  margin: 0 1.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  transform-origin: left center;
  transform: scaleX(var(--progress, 0));
  transition: transform 0.4s ease-out;
  border-radius: var(--radius-pill);
}


/* ============================================================
   LIKERT SCALE
   ============================================================ */

.likert-scale {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  padding: 1rem 0;
}

.likert-option {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: var(--color-bg-card);
  color: var(--color-text-muted);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.likert-option:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  transform: scale(1.08);
}

.likert-option:active {
  transform: scale(0.95);
}

.likert-option.selected {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  transform: scale(1.1);
  box-shadow: 0 4px 16px hsla(12, 76%, 50%, 0.3);
}

.likert-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 0.25rem;
  margin-top: 0.5rem;
}

.likert-label-text {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  max-width: 80px;
  text-align: center;
  line-height: 1.3;
}


/* ============================================================
   CHOICE CARDS (A/B)
   ============================================================ */

.choice-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.choice-card {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-size: 1rem;
  line-height: 1.5;
  background: var(--color-bg-card);
  color: var(--color-text);
  text-align: left;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.choice-card:hover {
  border-color: var(--color-accent);
  background: hsla(260, 55%, 85%, 0.1);
}

.choice-card:active {
  transform: scale(0.98);
}

.choice-card.selected {
  border-color: var(--color-accent);
  background: hsla(260, 55%, 85%, 0.15);
  box-shadow: 0 4px 16px hsla(260, 55%, 72%, 0.2);
}

.choice-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}


/* ============================================================
   SUBMIT CARD (Quiz Final)
   ============================================================ */

.submit-card {
  text-align: center;
}

.submit-card h2 {
  margin-bottom: 0.75rem;
}

.submit-card p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.submit-card .btn {
  min-width: 200px;
}


/* ============================================================
   RESULTS PAGE
   ============================================================ */

/* Archetype Hero */
.archetype-hero {
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.archetype-hero-self {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-light));
}

.archetype-hero-partner {
  background: linear-gradient(135deg, var(--color-accent-light), hsl(200, 50%, 85%));
}

.archetype-hero-couple {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent-light), hsl(170, 40%, 85%));
}

.archetype-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.archetype-name {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.archetype-desc {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 440px;
  margin: 0 auto;
}

.affection-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
}


/* Dimension Bars */
.dimensions-section {
  margin-bottom: 2rem;
}

.dimensions-section h3 {
  margin-bottom: 1.5rem;
}

.dimension-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dimension-label {
  width: 120px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: capitalize;
  flex-shrink: 0;
}

.dimension-track {
  flex: 1;
  height: 10px;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  position: relative;
  overflow: hidden;
}

.dimension-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 1s ease-out;
  width: 0;
}

.dimension-fill[data-dim="connection"] {
  background: linear-gradient(90deg, var(--dim-connection), hsl(12, 76%, 55%));
}
.dimension-fill[data-dim="communication"] {
  background: linear-gradient(90deg, var(--dim-communication), hsl(260, 55%, 62%));
}
.dimension-fill[data-dim="conflict"] {
  background: linear-gradient(90deg, var(--dim-conflict), hsl(35, 85%, 45%));
}
.dimension-fill[data-dim="planning"] {
  background: linear-gradient(90deg, var(--dim-planning), hsl(170, 55%, 38%));
}
.dimension-fill[data-dim="affection"] {
  background: linear-gradient(90deg, var(--dim-affection), hsl(330, 65%, 55%));
}

.score-label {
  width: 40px;
  text-align: right;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
  color: var(--color-text);
}


/* Comparison Bars (Couple View) */
.comparison-section {
  margin-bottom: 2rem;
}

.comparison-section h3 {
  margin-bottom: 1.5rem;
}

.comparison-item {
  margin-bottom: 2rem;
}

.comparison-dimension-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.comparison-dimension-name {
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: capitalize;
}

.comparison-pair {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.comparison-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.comparison-user-label {
  width: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.comparison-track {
  flex: 1;
  height: 8px;
  background: var(--color-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.comparison-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 1s ease-out;
  width: 0;
}

.comparison-fill.fill-a {
  background: var(--color-primary);
}

.comparison-fill.fill-b {
  background: var(--color-accent);
}

.comparison-score {
  width: 36px;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}


/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-waiting {
  background: hsla(35, 85%, 55%, 0.12);
  color: hsl(35, 85%, 40%);
}

.badge-complete {
  background: hsla(150, 60%, 45%, 0.12);
  color: var(--color-success);
}

.badge-aligned {
  background: hsla(150, 60%, 45%, 0.12);
  color: var(--color-success);
}

.badge-complementary {
  background: hsla(35, 85%, 55%, 0.12);
  color: hsl(35, 85%, 40%);
}

.badge-contrast {
  background: hsla(0, 70%, 60%, 0.1);
  color: var(--color-error);
}


/* ============================================================
   EXPANDABLE INSIGHTS (details/summary)
   ============================================================ */

.insights-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.insight-details {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.insight-details summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: var(--radius-md);
  transition: background 0.2s;
  list-style: none;
}

.insight-details summary::-webkit-details-marker {
  display: none;
}

.insight-details summary::marker {
  content: '';
}

.insight-details summary:hover {
  background: hsla(20, 20%, 90%, 0.3);
}

.insight-summary-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.insight-chevron {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.insight-details[open] .insight-chevron {
  transform: rotate(180deg);
}

/* Smooth expand/collapse using interpolate-size */
.insight-details::details-content {
  block-size: 0;
  overflow: clip;
  transition:
    block-size 0.35s ease,
    content-visibility 0.35s ease allow-discrete;
}

.insight-details[open]::details-content {
  block-size: auto;
}

.insight-content {
  padding: 0 1.25rem 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: 0.95rem;
}


/* ============================================================
   DASHBOARD
   ============================================================ */

.dashboard-greeting {
  margin-bottom: 2rem;
}

.dashboard-greeting h1 {
  margin-bottom: 0.25rem;
}

.cta-card {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2.5rem 2rem;
}

.cta-card p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.share-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.share-section h3 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.share-code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.share-link-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.share-link-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text);
  background: var(--color-bg);
  outline: none;
}

.share-link-input:focus {
  border-color: var(--color-primary);
}

.sessions-section {
  margin-top: 2rem;
}

.sessions-section h2 {
  margin-bottom: 1.25rem;
}

.session-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.session-card {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.session-card:hover {
  transform: none;
}

.session-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.session-partner {
  font-weight: 600;
}

.session-date {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.session-card-actions {
  display: flex;
  gap: 0.5rem;
}


/* ============================================================
   JOIN PAGE
   ============================================================ */

.join-hero {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
}

.join-hero .hero-emoji {
  margin-bottom: 1.5rem;
}

.join-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 300px;
  margin: 2rem auto 0;
}


/* ============================================================
   WAITING STATE
   ============================================================ */

.waiting-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

.waiting-state h2 {
  margin-bottom: 0.75rem;
}

.waiting-state p {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.waiting-illustration {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  animation: float 3s ease-in-out infinite;
}


/* ============================================================
   LOADING & EMPTY STATES
   ============================================================ */

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-primary-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

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

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1.5rem;
}

.loading-state p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--color-text-muted);
}

.empty-state p {
  color: var(--color-text-muted);
}


/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  font-weight: 500;
  font-size: 0.95rem;
  animation: slideUp 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  max-width: calc(100vw - 3rem);
  text-align: center;
}

.toast-success {
  background: var(--color-success);
  color: #fff;
}

.toast-error {
  background: var(--color-error);
  color: #fff;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}


/* ============================================================
   ANIMATIONS
   ============================================================ */

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-in {
  animation: fadeInUp 0.5s ease-out both;
  animation-delay: var(--delay, 0ms);
}

.animate-scale-in {
  animation: scaleIn 0.4s ease-out both;
  animation-delay: var(--delay, 0ms);
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-border) 25%,
    hsl(20, 20%, 94%) 50%,
    var(--color-border) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}


/* ============================================================
   AUTH PAGES (Login / Signup)
   ============================================================ */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 65px);
  padding: 2rem 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-card .auth-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}


/* ============================================================
   SECTION DIVIDERS
   ============================================================ */

.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}


/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .quiz-card {
    transition: none;
  }

  .hero-emoji {
    animation: none;
  }

  .waiting-illustration {
    animation: none;
  }
}


/* ============================================================
   RESPONSIVE — TABLET+
   ============================================================ */

@media (min-width: 768px) {
  .container {
    max-width: 700px;
  }

  .hero-section {
    padding: 4rem 2rem;
  }

  .hero-actions {
    flex-direction: row;
    max-width: 420px;
  }

  .steps-grid {
    flex-direction: row;
    gap: 1.5rem;
  }

  .step-card {
    flex: 1;
  }

  .choice-cards {
    flex-direction: row;
  }

  .choice-card {
    flex: 1;
  }

  .comparison-pair {
    flex-direction: row;
    gap: 1rem;
  }

  .comparison-row {
    flex: 1;
  }

  .join-actions {
    flex-direction: row;
    max-width: 360px;
  }

  .share-link-group {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
}
