/* ==========================================================================
   DESIGN SYSTEM & CSS VARIABLES (Clean, Light & Bright Professional Theme)
   ========================================================================== */
:root {
  --bg-canvas: #F8FAFC;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  
  --border-card: rgba(226, 232, 240, 0.85);
  --border-card-hover: rgba(203, 213, 225, 1);

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-white: #FFFFFF;

  --accent-emerald: #10B981;
  --accent-emerald-light: #ECFDF5;
  --accent-sky: #0EA5E9;
  --accent-sky-light: #F0F9FF;
  --accent-indigo: #6366F1;
  --accent-indigo-light: #EEF2FF;

  --gradient-primary: linear-gradient(135deg, #0EA5E9 0%, #6366F1 100%);

  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.04), 0 8px 10px -6px rgba(15, 23, 42, 0.02);
  --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.07), 0 10px 15px -8px rgba(15, 23, 42, 0.03);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

/* Ambient Glow Background Blobs */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(255,255,255,0) 70%);
  top: -100px;
  left: -100px;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18) 0%, rgba(255,255,255,0) 70%);
  top: 35%;
  right: -150px;
}

.glow-3 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(255,255,255,0) 70%);
  bottom: 5%;
  left: 10%;
}

/* Glassmorphism Card Utility */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-smooth);
}

.glass-card:hover {
  border-color: var(--border-card-hover);
  box-shadow: var(--shadow-lg);
}

/* Typography Helpers */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: 2.1rem;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-top: 0.4rem;
}

/* Badges & Pills */
.pill-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.section-header .pill-badge {
  margin-bottom: 0.85rem;
}

.pill-emerald {
  background: var(--accent-emerald-light);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.pill-sky {
  background: var(--accent-sky-light);
  color: var(--accent-sky);
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.pill-indigo {
  background: var(--accent-indigo-light);
  color: var(--accent-indigo);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* NAVBAR & BRAND LOGO */
.navbar-wrapper {
  position: fixed;
  top: 1.25rem;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 1.5rem;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 900px;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
}

.brand, .footer-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
}

.brand-text {
  line-height: 1;
  display: inline-block;
}

.brand-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  margin: 0;
}

.badge-sm {
  font-size: 0.7rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-muted);
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-sky);
}

/* MAIN LAYOUT */
.main-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 8.5rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}

.section {
  margin-bottom: 5rem;
}

.section-header.center {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

/* HERO SECTION */
.hero-section {
  text-align: center;
}

.hero-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
}

.word-title {
  font-size: clamp(3rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.phonetics-bar {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
}

.phonetic-text {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.phonetic-text .ipa {
  color: var(--accent-sky);
  font-weight: 600;
}

.phonetic-text .pos {
  font-style: italic;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.btn-audio {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-sky-light);
  color: var(--accent-sky);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-audio:hover {
  background: var(--accent-sky);
  color: var(--text-white);
}

/* MAIN DEFINITION CARD */
.card-hero-main {
  padding: 2.5rem;
  text-align: left;
  background: #FFFFFF;
}

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-sky);
  margin-bottom: 0.75rem;
}

.definition-text {
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.definition-subtext {
  font-size: 1.025rem;
  line-height: 1.65;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-card);
  padding-top: 1.25rem;
}

/* EXAMPLES SECTION */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.example-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  background: #FFFFFF;
}

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

.ex-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.ex-form-tag {
  font-size: 0.725rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent-emerald-light);
  color: var(--accent-emerald);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
}

.example-quote {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-primary);
  font-weight: 400;
}

.example-context {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* GRAMMAR & CONJUGATION (2x2 Symmetrical Grid) */
.conjugation-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.conjugate-card {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #FFFFFF;
}

.tense-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.tense-word {
  font-size: 1.35rem;
  color: var(--text-primary);
}

.tense-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.example-box {
  background: rgba(15, 23, 42, 0.03);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.875rem;
  margin-top: auto;
}

.ex-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--border-card);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-content {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-primary);
  line-height: 1;
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-sky);
}

.copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .conjugation-grid {
    grid-template-columns: 1fr;
  }

  .examples-grid {
    grid-template-columns: 1fr;
  }

  .main-container {
    padding-top: 6.5rem;
  }

  .card-hero-main {
    padding: 1.75rem;
  }
}
