/* ===============================
   Document-level setup
   =============================== */

html,
body {
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 0;
}

/* ===============================
   Clean, legible design system
   =============================== */

:root {
  /* Typography - Distinctive font pairing */
  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Warm, inviting primary color palette */
  --primary: #2D5A47;           /* Deep forest green */
  --primary-light: #4A7C6A;
  --primary-dark: #1E3D30;

  /* Rich accent color */
  --accent: #C17F59;            /* Warm terracotta */
  --accent-light: #E8D4C4;
  --accent-dark: #A66B48;

  /* Warmer neutrals */
  --bg-primary: #FAF9F7;        /* Warm off-white */
  --bg-secondary: #FFFFFF;
  --bg-card: #FFFFFF;

  /* Text with excellent contrast - tinted darks */
  --text-primary: #1A1A1A;
  --text-secondary: #4A4A4A;
  --text-muted: #6B6B6B;

  /* Borders and dividers - warmer tones */
  --border-light: #E8E6E3;
  --border-medium: #D4D1CC;

  /* Layered shadows with color for depth */
  --shadow-sm: 
    0 1px 2px rgba(45, 90, 71, 0.04),
    0 2px 4px rgba(0, 0, 0, 0.03);
  --shadow-md: 
    0 2px 4px rgba(45, 90, 71, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 
    0 4px 8px rgba(45, 90, 71, 0.08),
    0 12px 32px rgba(0, 0, 0, 0.1);

  /* Legacy accent colors for compatibility */
  --accent-blue: var(--primary);
  --accent-blue-light: var(--primary-light);
  --accent-green: var(--primary);
  --accent-purple: var(--accent);
}

/* Typography classes */
.font-heading {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

.font-body {
  font-family: var(--font-body);
}

/* Apply heading font to key elements */
h1, h2, .card-title, .brand-font {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* Main background with subtle gradients for visual interest */
.cosmic-bg {
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at top right, rgba(45, 90, 71, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(193, 127, 89, 0.03) 0%, transparent 50%),
    linear-gradient(to bottom, #FAF9F7 0%, #F5F3F0 100%);
  min-height: 100vh;
}

/* Subtle text glow for headings */
.text-glow {
  text-shadow: 0 1px 2px rgba(45, 90, 71, 0.08);
}

/* ===============================
   Utility classes for Tailwind
   =============================== */

/* Background colors */
.bg-dark-card {
  background-color: var(--bg-secondary);
}

.bg-dark-card\/70,
.bg-dark-card\/60 {
  background-color: var(--bg-secondary);
}

/* Border colors */
.border-dark-border {
  border-color: var(--border-light);
}

/* Text colors */
.text-text-primary {
  color: var(--text-primary);
}

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

.text-deep-bg {
  color: var(--bg-secondary);
}

/* Accent button colors */
.bg-accent-cyan {
  background-color: var(--accent-blue);
  color: white;
}

.bg-accent-purple {
  background-color: var(--accent-purple);
  color: white;
}

.bg-accent-green {
  background-color: var(--accent-green);
  color: white;
}

.bg-accent-cyan:hover,
.bg-accent-purple:hover,
.bg-accent-green:hover {
  opacity: 0.9;
}

/* Fill-in-blank answer display - force black text on light green background */
.fill-blank-input[readonly] {
  color: #000000 !important;
  background-color: #bbf7d0 !important;
  border-color: #22c55e !important;
  font-weight: 600 !important;
}

/* ===============================
   Enhanced Card Styles
   =============================== */

.card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 32px;
  
  /* Layered shadows for realistic depth */
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.06);
  
  /* Subtle top highlight */
  border-top: 1px solid rgba(255, 255, 255, 0.8);
  
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.1);
}

/* Card variants with colored accents */
.card-primary {
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FBF9 100%);
}

.card-accent {
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, #FFFFFF 0%, #FDF9F6 100%);
}

/* ===============================
   Enhanced Button Styles
   =============================== */

/* Primary button with gradient and depth */
.btn-primary {
  background: linear-gradient(180deg, #3D6B57 0%, #2D5A47 100%);
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: white;
  
  /* Subtle inner shadow for depth */
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 2px 8px rgba(45, 90, 71, 0.25);
    
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #4A7C6A 0%, #3D6B57 100%);
  transform: translateY(-1px);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 4px 16px rgba(45, 90, 71, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Accent button variant */
.btn-accent {
  background: linear-gradient(180deg, #D08F69 0%, #C17F59 100%);
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: white;
  
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 2px 8px rgba(193, 127, 89, 0.25);
    
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-accent:hover {
  background: linear-gradient(180deg, #E09F79 0%, #D08F69 100%);
  transform: translateY(-1px);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 4px 16px rgba(193, 127, 89, 0.3);
}

/* Ghost/outline buttons */
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  border-radius: 12px;
  padding: 12px 22px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-outline:hover {
  background: rgba(45, 90, 71, 0.08);
  border-color: var(--primary-light);
}

.btn-outline-accent {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  border-radius: 12px;
  padding: 12px 22px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-outline-accent:hover {
  background: var(--accent-light);
}

/* ===============================
   XP Badge Styles
   =============================== */

.xp-badge {
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

/* ===============================
   Progress Bar Styles
   =============================== */

.progress-bar {
  height: 4px;
  background: #E8E8E8;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 12px;
}

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

/* ===============================
   Spacing Utilities
   =============================== */

.space-generous {
  padding: 32px;
  gap: 32px;
}

.space-comfortable {
  padding: 24px;
  gap: 24px;
}


