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

:root {
  --bg-dark: #070715;
  --bg-card: rgba(18, 18, 43, 0.7);
  --accent-cyan: #6366f1; /* Indigo */
  --accent-purple: #8b5cf6; /* Violet */
  --accent-pink: #ec4899; /* Pink */
  --accent-amber: #f59e0b; /* Amber */
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --text-main: #f8fafc;
  --text-dim: #94a3b8;
  --border-light: rgba(139, 92, 246, 0.25);
  --success: #10b981;
  --error: #ef4444;
}

/* Light Theme Variables */
body.light-theme {
  --bg-dark: #f1f5f9;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-dim: #64748b;
  --border-light: rgba(99, 102, 241, 0.2);
  --accent-cyan: #4f46e5;
  --accent-purple: #7c3aed;
  --accent-pink: #db2777;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
  --success: #059669;
  --error: #dc2626;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 242, 254, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 0, 122, 0.08) 0%, transparent 40%);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-theme {
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(2, 132, 199, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(219, 39, 119, 0.05) 0%, transparent 40%);
}

/* Header & Top Navigation */
header {
  background-color: rgba(6, 9, 19, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.8rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  transition: background-color 0.3s ease;
}

body.light-theme header {
  background-color: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 98% !important;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
}

.header-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
  object-fit: cover;
}

.logo-text {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #00f2fe, #ff007a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 15px rgba(255, 0, 122, 0.2);
}

body.light-theme .logo-text {
  background: linear-gradient(135deg, #0284c7, #db2777);
  -webkit-background-clip: text;
  text-shadow: none;
}

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

.nav-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

.nav-btn:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.03);
}

body.light-theme .nav-btn:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.nav-btn.active {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
  border-bottom: 2px solid var(--accent-cyan);
  border-radius: 8px 8px 0 0;
  background-color: rgba(0, 242, 254, 0.05);
}

body.light-theme .nav-btn.active {
  text-shadow: none;
  background-color: rgba(2, 132, 199, 0.08);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-email {
  font-size: 0.9rem;
  color: var(--text-dim);
  border-right: 1px solid rgba(255,255,255,0.1);
  padding-right: 1rem;
}

body.light-theme .user-email {
  border-right: 1px solid rgba(0,0,0,0.1);
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--accent-cyan);
  text-shadow: 0 0 10px var(--accent-cyan);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

body.light-theme .icon-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Language Selector Dropdown */
.lang-selector-container {
  position: relative;
  display: inline-block;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #0c1322;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  min-width: 160px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1001;
  padding: 0.5rem 0;
  margin-top: 0.8rem;
}

body.light-theme .lang-dropdown {
  background-color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.lang-dropdown.show {
  display: block;
  animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.lang-opt {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-main);
  padding: 0.7rem 1.2rem;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: background 0.2s ease;
}

.lang-opt:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

body.light-theme .lang-opt:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.lang-prefix {
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: var(--accent-cyan);
}

body.light-theme .lang-prefix {
  background: rgba(0, 0, 0, 0.05);
}

/* Hero Section (Neon Cyber Theme) */
.hero-section {
  background: radial-gradient(circle at 50% 50%, rgba(189, 0, 255, 0.08) 0%, var(--bg-dark) 80%);
  padding: 6rem 2rem 5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

body.light-theme .hero-section {
  background: radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.04) 0%, var(--bg-dark) 80%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.hero-logo-img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 4px solid var(--accent-purple);
  box-shadow: 0 0 35px rgba(189, 0, 255, 0.6), inset 0 0 20px rgba(0, 242, 254, 0.3);
  object-fit: cover;
  margin-bottom: 1.5rem;
  transition: transform 0.5s ease;
}

body.light-theme .hero-logo-img {
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
}

.hero-logo-img:hover {
  transform: rotate(360deg) scale(1.05);
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(189, 0, 255, 0.35);
}

body.light-theme .hero-title {
  text-shadow: none;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-dim);
  max-width: 650px;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.btn {
  padding: 0.8rem 2rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(189, 0, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(189, 0, 255, 0.5);
}

body.light-theme .btn-primary {
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.2);
}

.btn-cyber {
  background: transparent;
  border: 2px solid var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
  text-shadow: 0 0 5px rgba(0, 242, 254, 0.5);
  letter-spacing: 2px;
  font-weight: 800;
  border-radius: 30px;
  padding: 1rem 3rem;
  transition: all 0.3s ease;
}

body.light-theme .btn-cyber {
  text-shadow: none;
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.1);
}

.btn-cyber:hover {
  background: var(--accent-cyan);
  color: var(--bg-dark);
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.7);
  transform: scale(1.05);
}

body.light-theme .btn-cyber:hover {
  color: white;
}

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

body.light-theme .btn-secondary {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

body.light-theme .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.05);
}

.btn-danger {
  background: var(--accent-pink);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 0, 122, 0.3);
}

.btn-danger:hover {
  background: #e0006c;
}

/* About Us Section */
.about-section {
  padding: 5rem 2rem;
  text-align: center;
}

.about-title {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.about-box {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 3rem 2rem;
  max-width: 850px;
  margin: 0 auto;
  box-shadow: 0 8px 32px rgba(189, 0, 255, 0.05);
  backdrop-filter: blur(16px);
  transition: background-color 0.3s ease;
}

body.light-theme .about-box {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.03);
}

.about-box p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-main);
  margin-bottom: 2rem;
}

.about-slogan {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
  letter-spacing: 1px;
}

body.light-theme .about-slogan {
  text-shadow: none;
}

/* Inner Layout */
.container-inner {
  max-width: 99% !important;
  width: 99% !important;
  margin: 0 auto;
  padding: 1.5rem 1rem !important;
}

.section-header-title {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 2rem;
  border-left: 5px solid var(--accent-cyan);
  padding-left: 1.2rem;
  text-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

body.light-theme .section-header-title {
  text-shadow: none;
}

.section-view {
  display: none;
  animation: fadeIn 0.4s ease;
}

.section-view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(189, 0, 255, 0.03);
  backdrop-filter: blur(12px);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.light-theme .card {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
}

/* Audio Player */
.audio-player-wrapper {
  margin: 1.5rem 0;
  background: rgba(0, 242, 254, 0.03);
  padding: 1.2rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 242, 254, 0.2);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.05);
}

body.light-theme .audio-player-wrapper {
  background: rgba(2, 132, 199, 0.02);
  border: 1px solid rgba(2, 132, 199, 0.15);
  box-shadow: none;
}

audio {
  width: 100%;
}

/* Options */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.option-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 1.2rem 1.8rem;
  text-align: left;
  color: var(--text-main);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

body.light-theme .option-card {
  background: rgba(0, 0, 0, 0.01);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.option-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 242, 254, 0.3);
  transform: translateX(5px);
}

body.light-theme .option-card:hover {
  background: rgba(0, 0, 0, 0.03);
}

.option-card.selected {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.08);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

.option-card.active {
  border: 2px solid var(--accent-amber) !important;
  background: rgba(245, 158, 11, 0.2) !important;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.4), inset 0 0 10px rgba(245, 158, 11, 0.2) !important;
  color: #fff !important;
  font-weight: 800;
  transform: scale(1.02);
}

body.light-theme .option-card.active {
  border: 2px solid #f59e0b !important;
  background: rgba(245, 158, 11, 0.15) !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3) !important;
  color: #92400e !important;
}

.option-card.correct {
  border-color: var(--success);
  background: rgba(0, 242, 254, 0.12);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.option-card.incorrect {
  border-color: var(--accent-pink);
  background: rgba(255, 0, 122, 0.12);
  box-shadow: 0 0 15px rgba(255, 0, 122, 0.3);
}

/* Reading Layout */
.reading-text {
  font-size: 1.15rem;
  line-height: 1.9;
  background: rgba(255, 255, 255, 0.01);
  padding: 2rem;
  border-radius: 16px;
  border-left: 4px solid var(--accent-purple);
  margin-bottom: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

body.light-theme .reading-text {
  background: rgba(0, 0, 0, 0.01);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--accent-purple);
}

/* Vocab */
.topic-tabs {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-dim);
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

body.light-theme .tab-btn {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--accent-cyan);
  color: white;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

body.light-theme .tab-btn.active {
  box-shadow: none;
}

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

.vocab-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.vocab-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-cyan);
  box-shadow: 0 10px 25px rgba(0, 242, 254, 0.15);
}

body.light-theme .vocab-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
}

.vocab-word {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-amber);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

body.light-theme .vocab-word {
  text-shadow: none;
}

.vocab-meaning {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.vocab-example {
  color: var(--text-dim);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
}

/* ==========================================
   LESEN MOCK WORKFLOW STYLING (New Screen Mockups)
   ========================================== */
.lesen-header {
  text-align: center;
  margin-bottom: 3rem;
}

.lesen-header-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
  color: var(--accent-cyan);
  font-size: 2rem;
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.lesen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

@keyframes card-neon-pulse {
  0% {
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.25), inset 0 0 8px rgba(255, 255, 255, 0.02);
    border-color: rgba(139, 92, 246, 0.35);
  }
  50% {
    box-shadow: 0 0 25px rgba(255, 0, 122, 0.45), inset 0 0 12px rgba(255, 0, 122, 0.1);
    border-color: rgba(255, 0, 122, 0.55);
  }
  100% {
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.25), inset 0 0 8px rgba(255, 255, 255, 0.02);
    border-color: rgba(139, 92, 246, 0.35);
  }
}

.lesen-card {
  background: linear-gradient(135deg, rgba(22, 22, 54, 0.6) 0%, rgba(12, 12, 35, 0.8) 100%);
  backdrop-filter: blur(16px);
  border: 1.5px solid rgba(139, 92, 246, 0.22);
  border-radius: 24px;
  padding: 1.8rem;
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: card-neon-pulse 3s infinite ease-in-out;
}

.lesen-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

@keyframes lightning-flash {
  0%, 100% {
    border-color: rgba(0, 242, 254, 0.45);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.35), 0 0 5px rgba(139, 92, 246, 0.2), inset 0 0 8px rgba(0, 242, 254, 0.15);
  }
  15% {
    border-color: #ff007a;
    box-shadow: 0 0 28px rgba(255, 0, 122, 0.8), 0 0 12px rgba(139, 92, 246, 0.5), inset 0 0 10px rgba(255, 0, 122, 0.3);
  }
  30% {
    border-color: #ffd700;
    box-shadow: 0 0 35px rgba(255, 215, 0, 0.95), 0 0 15px rgba(255, 0, 122, 0.6), inset 0 0 12px rgba(255, 215, 0, 0.4);
  }
  45% {
    border-color: #00f2fe;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.75), inset 0 0 8px rgba(0, 242, 254, 0.3);
  }
  60% {
    border-color: #fff;
    box-shadow: 0 0 45px rgba(255, 255, 255, 1), 0 0 20px rgba(0, 242, 254, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.5);
  }
  80% {
    border-color: #7928ca;
    box-shadow: 0 0 30px rgba(121, 40, 202, 0.85), inset 0 0 10px rgba(121, 40, 202, 0.4);
  }
}

.lesen-card:hover::before {
  opacity: 1;
}

.lesen-card:hover {
  transform: translateY(-12px) scale(1.035);
  animation: lightning-flash 0.5s infinite linear;
}

.lesen-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.lesen-card-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.lesen-card-time {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.lesen-card-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.lesen-card-subtags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.lesen-card-tag {
  background: rgba(0, 242, 254, 0.06);
  border: 1px solid rgba(0, 242, 254, 0.22);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #00f2fe;
  letter-spacing: 0.3px;
  box-shadow: inset 0 0 5px rgba(0, 242, 254, 0.1);
}

/* Mode Selection Screen */
.mode-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.mode-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.mode-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 10px 25px rgba(0, 242, 254, 0.15);
}

.mode-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.mode-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.mode-description {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  min-height: 50px;
}

.mode-badge-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.mode-badge {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-main);
  font-weight: 600;
}

/* Overview Screen */
.overview-card-inner {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.overview-list {
  text-align: left;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0 2rem 0;
  list-style: none;
}

.overview-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 0.95rem;
}

.overview-list li:last-child {
  border-bottom: none;
}

/* Test Area */
.test-subnavigation {
  background: #0f1624;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  display: flex;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

body.light-theme .test-subnavigation {
  background: #ffffff;
  border-color: rgba(0,0,0,0.08);
}

.test-subnav-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border-right: 1px solid rgba(255,255,255,0.05);
  white-space: nowrap;
  transition: all 0.2s ease;
}

body.light-theme .test-subnav-btn {
  border-right: 1px solid rgba(0,0,0,0.08);
}

.test-subnav-btn.active {
  background: var(--accent-cyan);
  color: var(--bg-dark);
}

.test-split-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .test-split-container {
    grid-template-columns: 1fr;
  }
}

.test-left-pane {
  background: rgba(12, 14, 33, 0.7);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(0, 242, 254, 0.2);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.test-right-pane {
  background: rgba(12, 14, 33, 0.7);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 0, 122, 0.2);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.test-left-pane:hover {
  border-color: rgba(0, 242, 254, 0.5);
  box-shadow: 0 10px 40px rgba(0, 242, 254, 0.15);
}

.test-right-pane:hover {
  border-color: rgba(255, 0, 122, 0.5);
  box-shadow: 0 10px 40px rgba(255, 0, 122, 0.15);
}

body.light-theme .test-left-pane, body.light-theme .test-right-pane {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Drag list (Lesen 1) */
.drag-text-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

body.light-theme .drag-text-box {
  background: #f8fafc;
  border-color: rgba(0,0,0,0.15);
}

.drag-zone {
  background: rgba(0, 242, 254, 0.05);
  border: 1px dashed var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 700;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  text-align: center;
  margin-top: 1rem;
  cursor: pointer;
}

.drag-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.drag-option-item {
  background: rgba(22, 22, 54, 0.65);
  border: 1.5px solid rgba(139, 92, 246, 0.3);
  border-radius: 12px;
  padding: 1.1rem 1.5rem;
  cursor: grab;
  font-weight: 800;
  font-size: 1.08rem;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.drag-option-item:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: #00f2fe;
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.3);
  transform: translateY(-2px);
}

body.light-theme .drag-option-item {
  background: #f1f5f9;
  border-color: rgba(0,0,0,0.06);
}

/* Multiple choice (Lesen 2) */
.test-question-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

body.light-theme .test-question-item {
  background: #f8fafc;
  border-color: rgba(0,0,0,0.06);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.1rem;
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  padding: 1rem 1.4rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  width: 100%;
}

.radio-label:hover {
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.5);
  transform: translateX(6px);
}

.radio-input {
  width: auto;
  cursor: pointer;
}

/* Bottom status bar (Test environment) */
.test-bottom-bar {
  background: #0f1624;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 2rem;
  position: sticky;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 999;
}

body.light-theme .test-bottom-bar {
  background: #ffffff;
  border-top-color: rgba(0,0,0,0.08);
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.progress-track {
  width: 200px;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

body.light-theme .progress-track {
  background: rgba(0, 0, 0, 0.05);
}

.progress-fill {
  height: 100%;
  width: 15%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  border-radius: 4px;
}

/* Admin Dashboard CSS */
.admin-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  background-color: rgba(189, 0, 255, 0.05);
  border-color: rgba(189, 0, 255, 0.3);
  box-shadow: 0 0 20px rgba(189, 0, 255, 0.1);
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 2.5rem;
}

.admin-tab {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 0.8rem 1.8rem;
  font-weight: 700;
  cursor: pointer;
  font-size: 1.05rem;
  transition: all 0.2s ease;
}

.admin-tab.active {
  color: var(--accent-cyan);
  border-bottom: 3px solid var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

body.light-theme .admin-tab.active {
  text-shadow: none;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dim);
}

input, textarea, select {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.85rem 1.2rem;
  font-size: 1rem;
  color: white;
  outline: none;
  transition: border-color 0.2s ease;
}

body.light-theme input, body.light-theme textarea, body.light-theme select {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #0f172a;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

.admin-table th, .admin-table td {
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.light-theme .admin-table th, body.light-theme .admin-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.admin-table th {
  color: var(--text-dim);
  font-weight: 700;
}

/* Responsiveness */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1.2rem;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero-title {
    font-size: 2.8rem;
  }
  .about-slogan {
    font-size: 1.6rem;
  }
}

/* GIAO DIỆN BÀI LÀM ĐỌC / NGHE / VIẾT / NÓI SIÊU RÕ NÉT VÀ ĐỈNH CAO */
.drag-text-box {
  background: linear-gradient(145deg, rgba(20, 22, 45, 0.8), rgba(12, 14, 30, 0.9)) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(0, 242, 254, 0.25) !important;
  border-left: 4px solid #00f2fe !important;
  border-radius: 16px !important;
  padding: 2rem !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
  margin-bottom: 2rem !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.drag-text-box:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 242, 254, 0.6) !important;
  box-shadow: 0 15px 45px rgba(0, 242, 254, 0.2) !important;
}

/* Các đoạn văn văn bản đề thi Đức (Đọc/Nghe/Nói/Viết) */
.drag-text-box p, 
.drag-text-box div,
.test-left-pane p,
.exercise-text,
.text-pane p,
.writing-prompt-text,
.speaking-prompt-text {
  font-size: 1.15rem !important;
  line-height: 1.85 !important;
  color: #f8fafc !important;
  text-align: justify !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

/* Các ô thả đáp án (Drop Targets) - Style Neon Cyberpunk */
.drop-target, .drag-zone {
  border: 2px dashed rgba(255, 0, 122, 0.6) !important;
  background: rgba(255, 0, 122, 0.05) !important;
  color: #ff007a !important;
  font-weight: 800 !important;
  font-size: 1.1rem !important;
  padding: 1.2rem !important;
  border-radius: 12px !important;
  transition: all 0.3s ease !important;
  text-shadow: 0 0 8px rgba(255, 0, 122, 0.4) !important;
  box-shadow: inset 0 0 10px rgba(255, 0, 122, 0.1) !important;
  text-align: center;
  cursor: pointer;
}

/* Kiểu dáng Pill Button cho ô điền từ trong đoạn văn (Teil 4, Teil 5) */
span.text-fill-blank.drop-target {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 60px !important;
  padding: 6px 16px !important; /* Padding nhỏ hơn để không phá vỡ dòng chữ */
  border-radius: 20px !important; /* Bo tròn dạng viên thuốc */
  margin: 0 4px !important;
  vertical-align: middle !important;
  box-shadow: 0 4px 10px rgba(255, 0, 122, 0.15), inset 0 0 8px rgba(255, 0, 122, 0.1) !important;
  border-style: solid !important;
}

.drop-target:hover, .drag-zone:hover {
  background: rgba(255, 0, 122, 0.15) !important;
  box-shadow: 0 0 20px rgba(255, 0, 122, 0.4), inset 0 0 15px rgba(255, 0, 122, 0.2) !important;
  border-color: #ff007a !important;
  transform: scale(1.02);
}

.drag-option-item {
  background: linear-gradient(135deg, rgba(22, 22, 54, 0.8), rgba(30, 30, 70, 0.9)) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-left: 4px solid #ff007a !important;
  border-radius: 12px !important;
  padding: 1.2rem 1.5rem !important;
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  color: #fff !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.drag-option-item:hover {
  background: rgba(255, 0, 122, 0.15) !important;
  border-color: #ff007a !important;
  box-shadow: 0 8px 25px rgba(255, 0, 122, 0.3) !important;
  transform: translateY(-3px) scale(1.01) !important;
}

/* Các câu trắc nghiệm (Multiple Choice) */
.test-question-item {
  background: linear-gradient(145deg, rgba(15, 18, 40, 0.7), rgba(10, 12, 25, 0.8)) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 16px !important;
  padding: 1.8rem !important;
  margin-bottom: 2rem !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3) !important;
  transition: all 0.3s ease;
}

.test-question-item:hover {
  border-color: rgba(139, 92, 246, 0.4) !important;
  box-shadow: 0 10px 40px rgba(139, 92, 246, 0.15) !important;
}

.radio-label {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 1.2rem 1.5rem !important;
  border-radius: 12px !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: #e2e8f0 !important;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.radio-label:hover {
  background: rgba(139, 92, 246, 0.1) !important;
  border-color: rgba(139, 92, 246, 0.6) !important;
  transform: translateX(10px) !important;
  box-shadow: 0 5px 15px rgba(139, 92, 246, 0.2) !important;
  color: #fff !important;
}

.radio-input:checked + .radio-label, .radio-label:has(.radio-input:checked) {
  background: rgba(0, 242, 254, 0.15) !important;
  border-color: #00f2fe !important;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.3), inset 0 0 10px rgba(0, 242, 254, 0.1) !important;
  color: #00f2fe !important;
  font-weight: 800 !important;
}

/* Custom Premium Dropdown */
.premium-select-wrapper { position: relative; width: 100%; user-select: none; }
.premium-select-trigger { padding: 0.8rem 1.2rem; background: rgba(0,0,0,0.4); border: 1px solid rgba(0,242,254,0.3); border-radius: 8px; color: #fff; font-size: 0.95rem; font-weight: bold; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: all 0.3s; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.premium-select-trigger:hover { border-color: #00f2fe; box-shadow: 0 4px 20px rgba(0,242,254,0.2); }
.premium-select-options { position: absolute; top: 110%; left: 0; width: 100%; background: #1a1a2e; border: 1px solid rgba(0,242,254,0.2); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 100; max-height: 250px; overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s; }
.premium-select-wrapper.open .premium-select-options { opacity: 1; visibility: visible; transform: translateY(0); }
.premium-select-option { padding: 0.8rem 1.2rem; color: #ccc; cursor: pointer; transition: all 0.2s; border-bottom: 1px solid rgba(255,255,255,0.05); }
.premium-select-option:last-child { border-bottom: none; }
.premium-select-option:hover { background: rgba(0,242,254,0.1); color: #00f2fe; padding-left: 1.5rem; }
.premium-select-option.selected { background: rgba(0,242,254,0.15); color: #00f2fe; font-weight: bold; border-left: 3px solid #00f2fe; }

/* ==========================================================================
   GIAO DIỆN TỐI ƯU CHO THIẾT BỊ DI ĐỘNG (MOBILE DRAFT)
   ========================================================================== */

/* Tối ưu hóa khoảng cách và cỡ chữ trên mobile */
@media (max-width: 768px) {
  .test-left-pane, .test-right-pane {
    padding: 0.9rem !important;
    border-radius: 12px !important;
  }
  
  .drag-text-box {
    padding: 1rem !important;
  }

  .drag-text-box p, 
  .drag-text-box div,
  .test-left-pane p,
  .exercise-text,
  .text-pane p,
  .writing-prompt-text,
  .speaking-prompt-text {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }

  .radio-label, .drag-option-item {
    font-size: 0.95rem !important;
    padding: 0.8rem 1rem !important;
  }
  
  .test-bottom-bar {
    padding: 1rem !important;
    flex-direction: column;
    gap: 1rem;
  }
  
  .test-bottom-bar div {
    width: 100%;
    justify-content: center;
  }

  /* Cập nhật Ultimate Mobile UX: Chia đôi màn hình 50/50 */
  .test-split-container {
    display: flex !important;
    flex-direction: column !important;
    height: 85vh !important; /* Chiếm 85% chiều cao màn hình */
    max-height: 85vh !important;
    overflow: hidden !important;
    gap: 0 !important;
    border-radius: 12px;
    border: 1px solid rgba(0, 242, 254, 0.3);
  }

  /* Nửa trên: Đề bài / Văn bản */
  .test-left-pane {
    display: block !important;
    flex: 45 !important; /* Chiếm 45% không gian */
    overflow-y: auto !important;
    padding: 1rem !important;
    border-right: none !important;
    border-bottom: 2px solid var(--accent-cyan) !important;
    background: rgba(10, 12, 30, 0.95) !important;
  }

  /* Nửa dưới: Câu hỏi / Đáp án */
  .test-right-pane {
    display: block !important;
    flex: 55 !important; /* Chiếm 55% không gian */
    overflow-y: auto !important;
    padding: 1rem !important;
    background: rgba(10, 12, 30, 0.95) !important;
  }
  
  /* Thanh Bottom Bar dính đáy trên mobile */
  .test-bottom-bar {
    position: sticky;
    bottom: 0;
    z-index: 999;
    background: rgba(10, 12, 30, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 15px rgba(0,0,0,0.5);
    border-top: 1px solid rgba(0, 242, 254, 0.3);
    padding: 1rem !important;
    border-radius: 12px 12px 0 0;
    margin-top: 1rem;
  }

  .test-split-container.show-only-left .test-right-pane {
    display: none !important;
  }
}

/* ==========================================================================
   TỐI ƯU HÓA MENUS CUỘN NGANG & LAYOUT TRÊN MOBILE DRAFT
   ========================================================================== */
@media (max-width: 768px) {
  /* Menu chính cuộn ngang thay vì xếp chồng nhiều dòng */
  .nav-links {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    width: 100% !important;
    justify-content: flex-start !important;
    gap: 0.5rem !important;
    padding: 0.5rem 0 !important;
    -webkit-overflow-scrolling: touch;
  }
  .nav-btn {
    flex: 0 0 auto !important;
    padding: 0.5rem 0.8rem !important;
    font-size: 0.85rem !important;
  }

  /* Menu các phần Teil 1, 2, 3 cuộn ngang */
  .test-subnavigation {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    gap: 0.5rem !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px !important;
    margin-bottom: 1.2rem !important;
  }
  .test-subnav-btn {
    flex: 0 0 auto !important;
    padding: 0.5rem 0.8rem !important;
    font-size: 0.8rem !important;
  }

  /* Ngăn nút Zurück và tiêu đề bị đè lên nhau */
  #reading-content > div:first-child, 
  #listening-content > div:first-child,
  main > div:has(> .btn-secondary) {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.8rem !important;
  }
  #reading-content > div:first-child > div,
  #listening-content > div:first-child > div {
    font-size: 1rem !important;
    text-align: left !important;
  }

  /* Tối ưu hóa Mode Card trên Home Screen */
  .mode-selection-grid {
    grid-template-columns: 1fr !important;
    gap: 1.2rem !important;
  }
  .mode-card {
    padding: 1.5rem !important;
  }
  .mode-title {
    font-size: 1.4rem !important;
  }
  .mode-badge-row {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  /* Sửa lỗi tràn khung Donate trên mobile */
  .donation-alert-wrapper {
    padding: 0 1rem !important;
  }
  .donation-alert {
    padding: 1.5rem 1.2rem !important;
  }
  .donation-alert-text {
    min-width: 0 !important;
    flex-basis: 100% !important;
  }
}


