@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette - Calming, Modern Futuristic Glassmorphism for Anxiety (TMAS) Test */
  --bg-color: #09131d;
  --bg-secondary: #0d1e2e;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(20, 184, 166, 0.45);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  
  --primary: #0d9488;
  --primary-hover: #0f766e;
  --primary-light: rgba(13, 148, 136, 0.16);
  --primary-glow: rgba(20, 184, 166, 0.35);
  
  --accent-teal: #14b8a6;
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;

  --glass-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.7), 0 0 25px rgba(13, 148, 136, 0.08);
  --btn-shadow: 0 4px 18px 0 rgba(13, 148, 136, 0.35);
  --font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(13, 148, 136, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(13, 30, 46, 0.65) 0%, transparent 100%);
  background-attachment: fixed;
  padding: 1.5rem;
}

.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

/* Glassmorphism Card */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(20, 184, 166, 0.8), rgba(6, 182, 212, 0.8), transparent);
}

.card:hover {
  border-color: var(--card-hover-border);
}

/* Header & Typography */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

h1 {
  font-size: 2.1rem;
  line-height: 1.25;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, #ffffff 40%, #99f6e4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* Badge Pill */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.35);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #5eead4;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Instructions Box */
.instructions-box {
  background: rgba(13, 27, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--accent-teal);
  border-radius: 14px;
  padding: 1.5rem;
  margin: 1.75rem 0;
  text-align: left;
}

.instructions-box h3 {
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.instructions-box p {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0;
}

.instructions-box p.important {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
  color: #f1f5f9;
  font-size: 0.95rem;
}

/* Action Buttons */
.actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary, .btn-teal {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
  color: #ffffff;
  box-shadow: var(--btn-shadow);
}

.btn-primary:hover, .btn-teal:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px 0 rgba(13, 148, 136, 0.5);
  background: linear-gradient(135deg, var(--accent-teal) 0%, #0891b2 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #e2e8f0;
}

.form-group input, .form-group select {
  width: 100%;
  padding: 0.85rem 1.15rem;
  background: rgba(13, 27, 42, 0.7);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.25);
  background: rgba(13, 27, 42, 0.9);
}

/* Test Area */
.progress-container {
  margin-bottom: 1.5rem;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 10px;
}

/* Mandatory Instruction Banner (Prompt 3.3) */
.instruction-banner {
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 12px;
  padding: 0.8rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: #99f6e4;
  text-align: center;
  letter-spacing: 0.01em;
}

.question-text {
  font-size: 1.45rem;
  line-height: 1.55;
  color: #ffffff;
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 600;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Options Grid for 2 Choices (Ha / Yo'q) */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.option-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.4rem 1.75rem;
  color: #f1f5f9;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  outline: none;
}

/* ========================================
   MOBILE RESPONSIVE — Tablet (≤768px)
   ======================================== */
@media (max-width: 768px) {
  body {
    padding: 1rem;
  }

  .card {
    padding: 1.75rem 1.25rem;
    border-radius: 20px;
  }

  h1 {
    font-size: 1.65rem;
    margin-bottom: 1rem;
  }

  p {
    font-size: 0.97rem;
    margin-bottom: 1.15rem;
  }

  .badge-pill {
    font-size: 0.78rem;
    padding: 0.3rem 0.85rem;
  }

  .instructions-box {
    padding: 1.15rem;
    margin: 1.25rem 0;
  }

  .instructions-box h3 {
    font-size: 1.05rem;
  }

  .instructions-box p {
    font-size: 0.93rem;
  }

  /* Buttons */
  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.97rem;
  }

  .actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .actions .btn,
  .actions a.btn {
    width: 100%;
  }

  /* Question & Options — Test page */
  .question-text {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
    min-height: 3rem;
  }

  .instruction-banner {
    font-size: 1rem;
    padding: 0.7rem 1rem;
    margin-bottom: 1.25rem;
  }

  .options-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }

  .option-btn {
    padding: 1.1rem 1.25rem;
    font-size: 1.05rem;
    border-radius: 14px;
  }

  .option-letter {
    width: 36px;
    height: 36px;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  /* User details card */
  .user-details-card {
    grid-template-columns: repeat(2, 1fr);
    padding: 1rem 1.15rem;
    gap: 0.85rem;
  }

  .user-field-label {
    font-size: 0.72rem;
  }

  .user-field-val {
    font-size: 0.95rem;
  }

  /* Score Hero */
  .score-hero {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .score-num-display {
    font-size: 3rem;
  }

  .score-level-title {
    font-size: 1.2rem;
  }

  .score-scale-info {
    font-size: 0.88rem;
  }

  /* Gauge */
  .gauge-labels {
    font-size: 0.7rem;
    flex-wrap: wrap;
    gap: 0.15rem;
    justify-content: space-around;
  }

  /* Interpretation cards */
  .interpretation-card {
    padding: 1.25rem;
    border-radius: 14px;
  }

  .interpretation-card h3 {
    font-size: 1.08rem;
  }

  .interpretation-item {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  /* Clinical Table */
  .clinical-table-wrapper {
    border-radius: 12px;
  }

  .clinical-table {
    font-size: 0.85rem;
  }

  .clinical-table th,
  .clinical-table td {
    padding: 0.7rem 0.8rem;
  }

  .clinical-table th {
    font-size: 0.72rem;
  }

  /* Disclaimer */
  .disclaimer-box {
    padding: 1rem 1.15rem;
    border-radius: 12px;
    margin: 1.5rem 0;
  }

  .disclaimer-box p {
    font-size: 0.85rem;
  }

  /* Progress */
  .progress-info {
    font-size: 0.82rem;
  }

  /* Form Controls */
  .form-group label {
    font-size: 0.88rem;
  }

  .form-group input,
  .form-group select {
    padding: 0.78rem 1rem;
    font-size: 0.95rem;
    border-radius: 10px;
  }
}

/* ========================================
   MOBILE RESPONSIVE — Phone (≤480px)
   ======================================== */
@media (max-width: 480px) {
  body {
    padding: 0.6rem;
  }

  .container {
    max-width: 100%;
  }

  .card {
    padding: 1.25rem 1rem;
    border-radius: 16px;
  }

  h1 {
    font-size: 1.35rem;
    line-height: 1.3;
    margin-bottom: 0.85rem;
  }

  h2 {
    font-size: 1.15rem;
  }

  h3 {
    font-size: 1rem;
  }

  p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  .badge-pill {
    font-size: 0.72rem;
    padding: 0.25rem 0.7rem;
    gap: 0.35rem;
    margin-bottom: 1rem;
  }

  /* Instructions */
  .instructions-box {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 12px;
  }

  .instructions-box h3 {
    font-size: 0.97rem;
    gap: 0.4rem;
  }

  .instructions-box p {
    font-size: 0.88rem;
    line-height: 1.6;
  }

  .instructions-box p.important {
    font-size: 0.88rem;
  }

  /* Buttons */
  .btn {
    padding: 0.8rem 1.25rem;
    font-size: 0.92rem;
    border-radius: 12px;
    gap: 0.5rem;
  }

  .actions {
    margin-top: 1.25rem;
    gap: 0.65rem;
  }

  /* Instruction banner for test page */
  .instruction-banner {
    font-size: 0.92rem;
    padding: 0.65rem 0.9rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    line-height: 1.5;
  }

  /* Question Text */
  .question-text {
    font-size: 1.05rem;
    line-height: 1.45;
    margin-bottom: 1.25rem;
    min-height: 2.5rem;
  }

  /* Option Buttons — Touch optimized */
  .options-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 1rem;
  }

  .option-btn {
    padding: 1rem 0.85rem;
    font-size: 0.95rem;
    border-radius: 12px;
    gap: 0.65rem;
  }

  .option-btn:hover {
    transform: none; /* Disable hover shift on touch */
    box-shadow: none;
  }

  .option-btn:active {
    transform: scale(0.97);
    background: rgba(13, 148, 136, 0.18);
    border-color: rgba(20, 184, 166, 0.6);
  }

  .option-letter {
    width: 34px;
    height: 34px;
    font-size: 0.88rem;
    border-radius: 9px;
  }

  .option-btn-content {
    gap: 0.65rem;
  }

  .option-arrow {
    font-size: 1rem;
  }

  .option-btn:hover .option-arrow {
    transform: none;
  }

  /* Progress */
  .progress-container {
    margin-bottom: 1rem;
  }

  .progress-info {
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
  }

  .progress-bar {
    height: 6px;
  }

  /* User details card */
  .user-details-card {
    grid-template-columns: 1fr 1fr;
    padding: 0.85rem 1rem;
    gap: 0.75rem;
    border-radius: 12px;
    margin-bottom: 1.25rem;
  }

  .user-field-label {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
  }

  .user-field-val {
    font-size: 0.88rem;
  }

  /* Score Hero */
  .score-hero {
    padding: 1.25rem;
    border-radius: 14px;
    margin-bottom: 1.25rem;
  }

  .score-num-display {
    font-size: 2.5rem;
    margin-bottom: 0.2rem;
  }

  .score-level-title {
    font-size: 1.08rem;
    margin-bottom: 0.35rem;
  }

  .score-scale-info {
    font-size: 0.82rem;
    margin-bottom: 0.85rem;
  }

  /* Gauge */
  .anxiety-gauge-wrapper {
    max-width: 100%;
  }

  .gauge-bar-bg {
    height: 10px;
  }

  .gauge-labels {
    font-size: 0.62rem;
    margin-top: 0.35rem;
    flex-wrap: wrap;
    gap: 0.1rem 0.3rem;
    justify-content: space-between;
  }

  /* Interpretation cards */
  .interpretation-card {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
  }

  .interpretation-card h3 {
    font-size: 0.97rem;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
  }

  .interpretation-item {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  /* Clinical Table — Card layout for mobile */
  .clinical-table-wrapper {
    border-radius: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .clinical-table {
    font-size: 0.8rem;
    min-width: 540px;
  }

  .clinical-table th,
  .clinical-table td {
    padding: 0.6rem 0.65rem;
  }

  .clinical-table th {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  /* Disclaimer */
  .disclaimer-box {
    padding: 0.9rem 1rem;
    border-radius: 10px;
    margin: 1.25rem 0;
  }

  .disclaimer-box p {
    font-size: 0.82rem;
    line-height: 1.55;
  }

  /* Form Controls */
  .form-group {
    margin-bottom: 1rem;
  }

  .form-group label {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
  }

  .form-group input,
  .form-group select {
    padding: 0.72rem 0.9rem;
    font-size: 0.92rem;
    border-radius: 10px;
  }
}

/* ========================================
   MOBILE RESPONSIVE — Extra small (≤360px)
   ======================================== */
@media (max-width: 360px) {
  body {
    padding: 0.4rem;
  }

  .card {
    padding: 1rem 0.85rem;
    border-radius: 14px;
  }

  h1 {
    font-size: 1.2rem;
  }

  .question-text {
    font-size: 0.97rem;
    min-height: 2rem;
  }

  .options-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .option-btn {
    padding: 0.85rem 0.75rem;
    font-size: 0.9rem;
  }

  .option-letter {
    width: 30px;
    height: 30px;
    font-size: 0.82rem;
    border-radius: 8px;
  }

  .score-hero {
    padding: 1rem;
  }

  .score-num-display {
    font-size: 2.1rem;
  }

  .score-level-title {
    font-size: 0.95rem;
  }

  .gauge-labels {
    font-size: 0.58rem;
  }

  .interpretation-card h3 {
    font-size: 0.9rem;
  }

  .interpretation-item {
    font-size: 0.85rem;
  }

  .user-details-card {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .btn {
    padding: 0.72rem 1rem;
    font-size: 0.87rem;
  }

  .disclaimer-box p {
    font-size: 0.78rem;
  }
}

