/* ==========================================================================
   Perfect Match — shared stylesheet
   Premium glassmorphic dating-app aesthetic. Violet -> Pink gradient theme.
   ========================================================================== */

:root {
  --violet: #6C5CE7;
  --violet-dark: #5546c8;
  --pink: #FD79A8;
  --pink-dark: #e85c8e;
  --gradient: linear-gradient(135deg, #6C5CE7 0%, #a86bd8 50%, #FD79A8 100%);
  --gradient-hover: linear-gradient(135deg, #7a68f0 0%, #b378e3 50%, #ff8ab3 100%);
  --gradient-soft: linear-gradient(135deg, rgba(108, 92, 231, 0.12), rgba(253, 121, 168, 0.12));
  --bg: #f6f4fd;
  --bg-alt: #fbf5f8;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-strong: rgba(255, 255, 255, 0.82);
  --surface-solid: #ffffff;
  --border-glass: rgba(255, 255, 255, 0.55);
  --text: #2b2740;
  --text-muted: #6c6785;
  --text-faint: #948fae;
  --success: #00b894;
  --success-bg: rgba(0, 184, 148, 0.12);
  --danger: #e74c3c;
  --danger-bg: rgba(231, 76, 60, 0.1);
  --warning: #e6a723;
  --warning-bg: rgba(230, 167, 35, 0.14);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow-sm: 0 4px 16px rgba(90, 70, 180, 0.08);
  --shadow-md: 0 10px 34px rgba(90, 70, 180, 0.14);
  --shadow-lg: 0 24px 64px rgba(90, 70, 180, 0.22);
  --shadow-glow: 0 8px 24px rgba(253, 121, 168, 0.35);
  --font: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient decorative background blobs, shared by every page */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  opacity: 0.55;
  pointer-events: none;
}
body::before {
  width: 46vw;
  height: 46vw;
  max-width: 620px;
  max-height: 620px;
  top: -14vw;
  right: -12vw;
  background: radial-gradient(circle at 30% 30%, #a99bf5, #FD79A8 70%);
}
body::after {
  width: 38vw;
  height: 38vw;
  max-width: 520px;
  max-height: 520px;
  bottom: -12vw;
  left: -10vw;
  background: radial-gradient(circle at 60% 60%, #6C5CE7, #ffd6e8 75%);
  opacity: 0.4;
}

h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.2; margin: 0 0 0.5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--text-muted); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section {
  padding: 72px 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease, background 0.22s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover:not(:disabled) {
  background: var(--gradient-hover);
  box-shadow: 0 12px 32px rgba(253, 121, 168, 0.45);
  transform: translateY(-2px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.5);
  color: var(--violet-dark);
  border: 1.5px solid rgba(108, 92, 231, 0.35);
  backdrop-filter: blur(10px);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--violet);
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid rgba(108, 92, 231, 0.2);
}
.btn-ghost:hover:not(:disabled) {
  color: var(--violet-dark);
  border-color: var(--violet);
  background: rgba(108, 92, 231, 0.06);
}

.btn-block { width: 100%; }
.btn-small { padding: 9px 18px; font-size: 13.5px; }
.btn-lg { padding: 17px 36px; font-size: 16.5px; }

/* ==========================================================================
   Glass cards
   ========================================================================== */

.glass-card {
  background: var(--surface);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.card {
  background: var(--surface-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.logo i {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 22px;
}

.main-nav { display: flex; align-items: center; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-links a:not(.btn) {
  font-weight: 500;
  font-size: 14.5px;
  color: var(--text-muted);
  position: relative;
  padding: 6px 2px;
  transition: color 0.2s ease;
}
.nav-links a:not(.btn):hover { color: var(--violet-dark); }
.nav-links a.active:not(.btn) { color: var(--violet-dark); }
.nav-links a.active:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}
.nav-user {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 14px;
  background: rgba(108, 92, 231, 0.08);
  border-radius: var(--radius-pill);
}

.nav-user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  order: 2;
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

[data-auth] { display: none; }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 15px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(108, 92, 231, 0.16);
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
textarea { resize: vertical; min-height: 90px; font-family: var(--font); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--violet);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.12);
}

input::placeholder, textarea::placeholder { color: var(--text-faint); }

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' stroke='%236C5CE7' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-hint { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }

.auth-shell {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  padding: 44px 40px;
}
.auth-card .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pink-dark);
  margin-bottom: 10px;
}
.auth-card h1 { font-size: 27px; margin-bottom: 6px; }
.auth-card > p.sub { margin-bottom: 28px; }
.auth-footer-link { text-align: center; margin-top: 22px; font-size: 14px; color: var(--text-muted); }
.auth-footer-link a { color: var(--violet-dark); font-weight: 600; }
.auth-footer-link a:hover { text-decoration: underline; }

.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 18px;
  display: none;
  align-items: center;
  gap: 9px;
}
.alert.show { display: flex; }
.alert-error { background: var(--danger-bg); color: #c0392b; border: 1px solid rgba(231, 76, 60, 0.25); }
.alert-success { background: var(--success-bg); color: #06805f; border: 1px solid rgba(0, 184, 148, 0.25); }

/* ==========================================================================
   Hero (index.html)
   ========================================================================== */

.hero {
  padding: 90px 0 60px;
  text-align: center;
  position: relative;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--violet-dark);
  margin-bottom: 26px;
}
.hero-badge i { color: var(--pink); }
.hero h1 {
  font-size: clamp(34px, 6vw, 62px);
  max-width: 880px;
  margin: 0 auto 20px;
}
.hero .lead {
  max-width: 600px;
  margin: 0 auto 36px;
  font-size: 17.5px;
  color: var(--text-muted);
}
.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.hero-note { font-size: 13px; color: var(--text-faint); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 40px;
}
.step-card {
  padding: 34px 28px;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.step-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.step-num {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 46px;
  font-weight: 800;
  color: rgba(108, 92, 231, 0.09);
}
.step-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-glow);
}
.step-card h3 { font-size: 18.5px; margin-bottom: 8px; }
.step-card p { font-size: 14.5px; margin-bottom: 0; }

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature-card { padding: 26px 22px; text-align: center; }
.feature-card:hover { transform: translateY(-4px); }
.feature-card i {
  font-size: 24px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}
.feature-card h4 { font-size: 15.5px; margin-bottom: 6px; }
.feature-card p { font-size: 13.5px; margin-bottom: 0; }

.cta-band {
  text-align: center;
  padding: 60px 40px;
  margin: 40px auto 0;
  max-width: 880px;
}
.cta-band h2 { font-size: 30px; }

.site-footer {
  text-align: center;
  padding: 34px 20px 44px;
  font-size: 13px;
  color: var(--text-faint);
}
.site-footer i { color: var(--pink); }

/* ==========================================================================
   Page header (shared title block for app pages)
   ========================================================================== */

.page-shell { min-height: calc(100vh - var(--header-h)); padding-bottom: 60px; }
.page-head { padding: 44px 0 30px; }
.page-head h1 { font-size: 30px; margin-bottom: 6px; }
.page-head p { margin-bottom: 0; }

/* ==========================================================================
   Quiz page
   ========================================================================== */

.progress-bar-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 100;
  background: rgba(246, 244, 253, 0.9);
  backdrop-filter: blur(14px);
  padding: 14px 0;
  border-bottom: 1px solid rgba(108, 92, 231, 0.1);
}
.progress-bar-inner { display: flex; align-items: center; gap: 16px; }
.progress-track {
  flex: 1;
  height: 10px;
  border-radius: var(--radius-pill);
  background: rgba(108, 92, 231, 0.12);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gradient);
  border-radius: var(--radius-pill);
  transition: width 0.35s ease;
}
.progress-label { font-size: 13.5px; font-weight: 700; color: var(--violet-dark); white-space: nowrap; }

.quiz-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 46px 0 22px;
}
.quiz-section-title .badge-num {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-glow);
}
.quiz-section-title h2 { font-size: 20px; margin-bottom: 0; }
.quiz-section-title p { margin: 2px 0 0; font-size: 13.5px; }

.question-card {
  padding: 24px 26px;
  margin-bottom: 14px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  scroll-margin-top: 150px;
}
.question-card.answered { border-color: rgba(0, 184, 148, 0.35); }
.question-index { font-size: 12px; font-weight: 700; color: var(--text-faint); margin-bottom: 8px; letter-spacing: 0.03em; }
.question-text { font-size: 15.5px; font-weight: 600; margin-bottom: 18px; color: var(--text); }

.likert-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.likert-btn {
  padding: 12px 6px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(108, 92, 231, 0.16);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.3;
}
.likert-btn:hover { border-color: var(--violet); background: rgba(108, 92, 231, 0.06); }
.likert-btn.selected {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.option-cards { display: grid; gap: 10px; }
.option-card {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(108, 92, 231, 0.16);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}
.option-card:hover { border-color: var(--violet); background: rgba(108, 92, 231, 0.06); }
.option-card .dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(108, 92, 231, 0.3);
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
}
.option-card.selected {
  border-color: var(--violet);
  background: rgba(108, 92, 231, 0.09);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}
.option-card.selected .dot { border-color: var(--violet); background: var(--gradient); }
.option-card.selected .dot::after {
  content: "";
  position: absolute; inset: 3px;
  border-radius: 50%;
  background: #fff;
}

.quiz-submit-bar {
  position: sticky;
  bottom: 0;
  z-index: 100;
  margin-top: 40px;
  padding: 18px 0 26px;
  background: linear-gradient(to top, var(--bg) 60%, transparent);
}
.quiz-submit-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 26px;
}
.quiz-submit-inner .remaining { font-size: 13.5px; color: var(--text-muted); font-weight: 500; }
.quiz-submit-inner .remaining strong { color: var(--violet-dark); }

/* ==========================================================================
   Profile page
   ========================================================================== */

.profile-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 26px;
  align-items: start;
}
.profile-card { padding: 34px; }
.profile-identity { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.avatar-circle {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; font-weight: 700;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}
.profile-identity h2 { font-size: 21px; margin-bottom: 2px; }
.profile-identity .meta { font-size: 13.5px; color: var(--text-faint); }

.summary-box {
  background: var(--gradient-soft);
  border: 1px solid rgba(108, 92, 231, 0.15);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  position: relative;
  margin-bottom: 24px;
}
.summary-box i.fa-quote-left { color: var(--violet); opacity: 0.35; font-size: 18px; margin-bottom: 8px; display: block; }
.summary-box p { color: var(--text); font-size: 15px; margin-bottom: 0; font-style: italic; }

.chip-group { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(108, 92, 231, 0.18);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--violet-dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip i { color: var(--pink); font-size: 11px; }

.chart-card { padding: 30px; text-align: center; }
.chart-card h3 { font-size: 16px; margin-bottom: 4px; }
.chart-card .chart-wrap { max-width: 380px; margin: 14px auto 0; }

.trait-bars { display: grid; gap: 14px; margin-top: 22px; text-align: left; }
.trait-bar-row .trait-label { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }
.trait-bar-track { height: 8px; border-radius: var(--radius-pill); background: rgba(108, 92, 231, 0.1); overflow: hidden; }
.trait-bar-fill { height: 100%; background: var(--gradient); border-radius: var(--radius-pill); transition: width 0.6s ease; }

/* ==========================================================================
   Matches page
   ========================================================================== */

.tabs {
  display: inline-flex;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--border-glass);
  margin-bottom: 30px;
  gap: 4px;
}
.tab-btn {
  border: none;
  background: transparent;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab-btn.active { background: var(--gradient); color: #fff; box-shadow: var(--shadow-glow); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.match-card { padding: 26px; position: relative; }
.match-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.match-card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.match-avatar {
  width: 58px; height: 58px;
  border-radius: 18px;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 20px;
  flex-shrink: 0;
}
.match-name { font-size: 17px; font-weight: 700; margin-bottom: 1px; }
.match-age { font-size: 12.5px; color: var(--text-faint); }

.compat-badge {
  position: absolute;
  top: 22px; right: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.compat-badge .num { font-size: 15px; font-weight: 800; line-height: 1; }
.compat-badge .pct { font-size: 8px; font-weight: 700; opacity: 0.85; }

.match-card-bio { font-size: 13.5px; margin-bottom: 16px; min-height: 20px; }
.match-card-report-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-faint);
}
.match-card-report-link:hover { color: var(--text-muted); }
.match-card-summary {
  font-size: 12.5px;
  color: var(--text-muted);
  background: rgba(108, 92, 231, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 18px;
  font-style: italic;
  line-height: 1.5;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.status-badge.pending-you { background: var(--warning-bg); color: #a5760f; }
.status-badge.pending-them { background: rgba(108, 92, 231, 0.1); color: var(--violet-dark); }
.status-badge.matched { background: var(--success-bg); color: #06805f; }
.status-badge.rejected { background: rgba(148, 143, 174, 0.15); color: var(--text-muted); }

.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--text-faint);
}
.empty-state i { font-size: 38px; margin-bottom: 16px; color: var(--pink); opacity: 0.6; }
.empty-state p { max-width: 360px; margin: 0 auto; }

.skeleton-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.skeleton-card { height: 220px; border-radius: var(--radius-md); background: linear-gradient(90deg, rgba(255,255,255,0.4) 25%, rgba(255,255,255,0.7) 37%, rgba(255,255,255,0.4) 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ==========================================================================
   Challenge page
   ========================================================================== */

.challenge-wrap { max-width: 720px; margin: 0 auto; }
.challenge-intro { text-align: center; padding: 10px 0 34px; }
.challenge-intro i { font-size: 30px; color: var(--pink); margin-bottom: 12px; }
.challenge-vs { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 8px; }
.challenge-q { padding: 26px 28px; margin-bottom: 18px; }
.challenge-q .question-index { }
.challenge-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
@media (max-width: 560px) { .challenge-options { grid-template-columns: 1fr; } }

.result-screen { text-align: center; padding: 60px 30px; }
.result-icon {
  width: 90px; height: 90px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  margin: 0 auto 24px;
  color: #fff;
}
.result-icon.waiting { background: linear-gradient(135deg, #a29bfe, #6C5CE7); animation: pulse 1.8s infinite; }
.result-icon.success { background: linear-gradient(135deg, #00d2a8, #00b894); }
.result-icon.fail { background: linear-gradient(135deg, #b2adc4, #8b86a3); }
@keyframes pulse { 0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(108,92,231,0.4);} 50% { transform: scale(1.05); box-shadow: 0 0 0 14px rgba(108,92,231,0);} }
.result-screen h2 { font-size: 25px; }
.result-score { font-size: 46px; font-weight: 800; margin: 14px 0; }
.result-score .gradient-text { }
.dots-loading span {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--violet); margin: 0 2px; animation: bounce 1.2s infinite ease-in-out;
}
.dots-loading span:nth-child(2) { animation-delay: 0.15s; }
.dots-loading span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%,80%,100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-6px); opacity: 1; } }

/* ==========================================================================
   Chat page
   ========================================================================== */

.chat-shell {
  max-width: 760px;
  margin: 0 auto;
  height: calc(100vh - var(--header-h) - 48px);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
}
.chat-header {
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.chat-header .match-avatar { width: 46px; height: 46px; font-size: 16px; border-radius: 14px; }
.chat-header h3 { font-size: 16px; margin-bottom: 1px; }
.chat-header .status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); display: inline-block; margin-right: 5px; }
.chat-header .meta { font-size: 12px; color: var(--text-faint); }

.chat-window {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.msg-row { display: flex; }
.msg-row.mine { justify-content: flex-end; }
.msg-bubble {
  max-width: 68%;
  padding: 12px 17px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
}
.msg-row.theirs .msg-bubble {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-glass);
  border-bottom-left-radius: 4px;
  color: var(--text);
}
.msg-row.mine .msg-bubble {
  background: var(--gradient);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-time { font-size: 10px; opacity: 0.6; margin-top: 4px; display: block; }

.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 22px;
}
.chat-input-bar input {
  border: none;
  background: transparent;
  padding: 10px 0;
}
.chat-input-bar input:focus { box-shadow: none; }
.chat-send-btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
  transition: transform 0.2s ease;
}
.chat-send-btn:hover { transform: scale(1.06); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==========================================================================
   Loading / misc
   ========================================================================== */

.spinner {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(108, 92, 231, 0.15);
  border-top-color: var(--violet);
  animation: spin 0.8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.center-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: var(--text-faint); font-size: 14px; }

.fade-in { animation: fadeIn 0.4s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: translateY(0);} }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    padding: 18px 24px 26px;
    gap: 14px;
    border-bottom: 1px solid var(--border-glass);
    transform: translateY(-130%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a, .nav-links button { width: 100%; }
  .nav-user { text-align: center; }
}

@media (max-width: 620px) {
  .likert-scale { grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .likert-btn { font-size: 9.5px; padding: 10px 3px; }
  .features { grid-template-columns: 1fr; }
  .auth-card { padding: 32px 24px; }
  .compat-badge { width: 48px; height: 48px; top: 18px; right: 18px; }
  .quiz-submit-inner { flex-direction: column; align-items: stretch; text-align: center; }
}
