/* ==========================================================================
   Simpliefy CBT - Global CSS Design Tokens & Styles
   ========================================================================== */

:root {
  /* Dark Blue Hero & Footer Palette */
  --hero-bg: linear-gradient(180deg, #02122c 0%, #032349 50%, #011627 100%);
  --nav-bg: #03122b;
  --footer-bg: #031a38;
  
  /* Primary Accents */
  --teal-accent: #00d29d;
  --teal-glow: rgba(0, 210, 157, 0.35);
  --blue-accent: #0072ff;
  
  /* Light Section Palette */
  --body-light-bg: #ffffff;
  --text-dark-title: #0f172a;
  --text-dark-muted: #64748b;
  
  /* Typography & Radius */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-pill: 50px;
  --radius-btn: 10px;
  --radius-card: 16px;
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--body-light-bg);
  color: var(--text-dark-title);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   1. NAVIGATION HEADER
   ========================================================================== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 4%;
  background-color: var(--nav-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #00d29d 0%, #0072ff 100%);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #ffffff;
}

.logo-text {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.4px;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 600;
  color: #cbd5e1;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-links a:hover {
  color: var(--teal-accent);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.login-link {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.btn-signup-nav {
  background-color: var(--teal-accent);
  color: #02122c;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.btn-signup-nav:hover {
  box-shadow: 0 4px 15px var(--teal-glow);
}

/* ==========================================================================
   2. HERO SECTION (Dark Blue Header)
   ========================================================================== */
.hero-wrapper {
  background: var(--hero-bg);
  color: #ffffff;
  padding: 3.5rem 4% 5rem 4%;
}

.hero-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 3rem;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.4rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  color: #e2e8f0;
  margin-bottom: 1.75rem;
  backdrop-filter: blur(8px);
}

.badge-dot {
  width: 7px;
  height: 7px;
  background-color: var(--teal-accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--teal-accent);
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.8px;
  margin-bottom: 1.5rem;
}

.hero-title .highlight-teal { color: var(--teal-accent); }
.hero-title .highlight-blue { color: var(--blue-accent); }

.hero-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 2.25rem;
  font-weight: 400;
  max-width: 540px;
}

/* Buttons */
.cta-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.btn {
  padding: 0.9rem 1.6rem;
  border-radius: var(--radius-btn);
  font-size: 1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary-teal {
  background-color: var(--teal-accent);
  color: #02122c;
  border: none;
  box-shadow: 0 6px 20px var(--teal-glow);
}

.btn-primary-teal:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--teal-glow);
}

.btn-outline-dark {
  background-color: rgba(255, 255, 255, 0.03);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-outline-dark:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.tagline-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #94a3b8;
  font-style: italic;
  font-size: 0.92rem;
}

.check-icon {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--teal-accent);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-accent);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: bold;
}

/* Right Side Banner Box */
.hero-banner-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-card);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.banner-badge {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.banner-subtitle {
  font-size: 0.95rem;
  color: var(--teal-accent);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   3. SOCIAL PROOF & FEATURES GRID
   ========================================================================== */
.social-proof-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 1.25rem 1rem 1.25rem;
  background-color: var(--body-light-bg);
}

.avatar-group {
  display: flex;
  align-items: center;
}

.avatar-img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  margin-left: -10px;
  object-fit: cover;
  background-color: #cbd5e1;
}

.avatar-img:first-child { margin-left: 0; }

.counter-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--teal-accent);
  color: #02122c;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -10px;
  border: 2px solid #ffffff;
}

.features-section {
  background-color: var(--body-light-bg);
  padding: 3rem 4% 5rem 4%;
  max-width: 1280px;
  margin: 0 auto;
}

.features-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3.5rem auto;
}

.features-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-dark-title);
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.features-header p {
  font-size: 1.05rem;
  color: var(--text-dark-muted);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 4rem;
  row-gap: 3.5rem;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.feature-icon-wrapper svg {
  width: 32px;
  height: 32px;
  margin-bottom: 1rem;
}

.icon-teal { color: var(--teal-accent); }
.icon-blue { color: var(--blue-accent); }

.feature-item h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark-title);
  margin-bottom: 0.5rem;
}

.feature-item p {
  font-size: 0.98rem;
  color: var(--text-dark-muted);
  line-height: 1.6;
}

/* ==========================================================================
   4. FOOTER SECTION
   ========================================================================== */
.footer-wrapper {
  background-color: var(--footer-bg);
  color: #ffffff;
  padding: 4rem 4% 2rem 4%;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 1.25rem;
  max-width: 340px;
}

.footer-column h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--teal-accent); }

.social-icons-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.social-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
  transition: background-color 0.2s ease;
}

.social-circle:hover {
  background-color: var(--teal-accent);
  color: #02122c;
}

.footer-handle {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.footer-domain {
  color: var(--teal-accent);
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #64748b;
  font-size: 0.88rem;
}

/* ==========================================================================
   5. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 900px) {
  .nav-links { display: none; }
  
  .hero-container {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-title { font-size: 2.2rem; }
  .hero-banner-card { display: none; }

  .features-grid { grid-template-columns: 1fr; }

  .footer-container { 
    grid-template-columns: 1fr; 
    gap: 2.5rem; 
  }
}

/* ==========================================================================
   6. AUTHENTICATION (REGISTER & LOGIN) STYLES
   ========================================================================== */
.auth-wrapper {
  background: var(--hero-bg);
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
}

.auth-card {
  background: rgba(3, 26, 56, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-card);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  color: #ffffff;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.auth-header p {
  color: #94a3b8;
  font-size: 0.95rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Strictly scoped to auth-card so it doesn't pollute other pages */
.auth-card .form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
}

.auth-card .form-group input,
.auth-card .form-group select {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-btn);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.auth-card .form-group input:focus,
.auth-card .form-group select:focus {
  border-color: var(--teal-accent);
  box-shadow: 0 0 8px var(--teal-glow);
}

.auth-card .form-group select option {
  background-color: #031a38;
  color: #ffffff;
}

.form-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0.5rem 0;
}

.btn-block {
  width: 100%;
  margin-top: 1rem;
}

.auth-footer-text {
  text-align: center;
  font-size: 0.9rem;
  color: #94a3b8;
  margin-top: 1rem;
}

.auth-footer-text a {
  color: var(--teal-accent);
  font-weight: 600;
}

.auth-footer-text a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   7. DASHBOARD & CBT ENGINE STYLES
   ========================================================================== */

/* Dashboard Layout */
.dashboard-wrapper {
  background-color: #f8fafc;
  min-height: 85vh;
  padding: 2.5rem 4%;
}

.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
}

.dash-welcome-card {
  background: var(--hero-bg);
  color: #ffffff;
  padding: 2rem;
  border-radius: var(--radius-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.streak-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--teal-accent);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  color: var(--teal-accent);
}

.dash-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-card);
  padding: 1.75rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.score-comparison {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 1rem 0;
}

.score-value {
  font-size: 2.2rem;
  font-weight: 800;
  display: block;
}

.target-color { color: var(--blue-accent); }
.predicted-color { color: var(--teal-accent); }

.progress-bar-bg {
  height: 10px;
  background-color: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
  margin: 0.75rem 0;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--teal-accent);
}

.dash-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.dash-action-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-btn);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: transform 0.2s ease;
}

.dash-action-card:hover { transform: translateY(-3px); }

.action-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.teal-bg { background-color: #e6fffa; }
.blue-bg { background-color: #ebf8ff; }

/* CBT Practice Engine Layout */
.cbt-engine-wrapper {
  background-color: #011627;
  color: #ffffff;
  min-height: 90vh;
}

.cbt-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: #03122b;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.cbt-workspace {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  min-height: 80vh;
}

.cbt-passage-pane, .cbt-question-pane {
  padding: 2rem;
  overflow-y: auto;
}

.cbt-passage-pane {
  border-right: 1px solid rgba(255,255,255,0.1);
  background-color: rgba(255,255,255,0.02);
}

.pane-header {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--teal-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.25rem;
}

.options-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.option-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-btn);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}

.option-card:hover { border-color: var(--teal-accent); }

.cbt-nav-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 900px) {
  .dash-metrics-grid, .cbt-workspace {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   8. PRACTICE SETUP STYLES (PURE HIGH CONTRAST)
   ========================================================================== */
.practice-setup-wrapper {
  background: var(--hero-bg);
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
}

.practice-setup-card {
  background: #031a38;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-card);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 620px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  color: #ffffff;
}

/* Headers & Paragraphs */
.practice-setup-card .setup-header h2 {
  color: #ffffff !important;
  font-size: 1.85rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.practice-setup-card .setup-header p {
  color: #cbd5e1 !important;
  font-size: 0.98rem;
}

/* Labels */
.practice-setup-card label,
.practice-setup-card .input-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff !important;
  margin-bottom: 0.5rem;
}

/* Select Inputs */
.practice-setup-card select,
.practice-setup-card .custom-select {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-btn);
  background-color: #02122c !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff !important;
  font-family: var(--font-family);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
}

.practice-setup-card select option {
  background-color: #031a38 !important;
  color: #ffffff !important;
}

/* Mode Options */
.practice-setup-card .mode-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  background: #02122c;
  padding: 0.4rem;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.practice-setup-card .mode-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: var(--radius-btn);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 700;
  color: #cbd5e1 !important;
  transition: all 0.2s ease;
  margin-bottom: 0;
}

.practice-setup-card .mode-option input { display: none; }

.practice-setup-card .mode-option span {
  color: #cbd5e1 !important;
}

.practice-setup-card .mode-option.active {
  background-color: var(--teal-accent);
}

.practice-setup-card .mode-option.active span {
  color: #02122c !important;
  font-weight: 800;
}

/* Subject Checkboxes Grid */
.practice-setup-card .subject-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.practice-setup-card .subject-checkbox-card {
  background: #02122c;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-btn);
  padding: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  margin-bottom: 0;
}

.practice-setup-card .subject-checkbox-card .chk-text {
  color: #ffffff !important;
  font-size: 0.92rem;
  font-weight: 600;
}

.practice-setup-card .subject-checkbox-card input[type="checkbox"]:checked + .chk-text {
  color: var(--teal-accent) !important;
  font-weight: 800;
}