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

/* --- DESIGN SYSTEM & VARIABLES --- */
:root {
  --bg-darker: #080c14;
  --bg-dark: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.65);
  --bg-card-hover: rgba(30, 41, 59, 0.5);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.2);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  
  /* Theme Accents (Dynamically overridden by body class) */
  --accent-color: #06b6d4; /* Default: Cyan (Basic) */
  --accent-color-rgb: 6, 182, 212;
  --accent-hover: #22d3ee;
  --accent-glow: rgba(6, 182, 212, 0.3);
}

/* Theme overrides */
body.theme-basic {
  --accent-color: #06b6d4;
  --accent-color-rgb: 6, 182, 212;
  --accent-hover: #22d3ee;
  --accent-glow: rgba(6, 182, 212, 0.3);
}

body.theme-intermediate {
  --accent-color: #10b981;
  --accent-color-rgb: 16, 185, 129;
  --accent-hover: #34d399;
  --accent-glow: rgba(16, 185, 129, 0.3);
}

body.theme-advanced {
  --accent-color: #8b5cf6;
  --accent-color-rgb: 139, 92, 246;
  --accent-hover: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.3);
}

/* --- GENERAL STYLES & RESET --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-darker);
  background-image: 
    radial-gradient(at 0% 0%, rgba(var(--accent-color-rgb), 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(30, 41, 59, 0.4) 0px, transparent 50%),
    radial-gradient(at 50% 50%, #0b0f19 0px, var(--bg-darker) 100%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-image 0.5s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(var(--accent-color-rgb), 0.3);
}

/* --- HEADER --- */
header {
  position: relative;
  z-index: 1000;
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  background: rgba(8, 12, 20, 0.4);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px var(--accent-glow);
  transition: var(--transition-smooth);
}

.logo-icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.logo-text h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* --- TABS SYSTEM --- */
.tabs-container {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  padding: 6px;
  border-radius: 30px;
  gap: 4px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 10px 24px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.tab-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}

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

/* Theme-specific active tabs */
body.theme-basic #tab-basic,
body.theme-intermediate #tab-intermediate,
body.theme-advanced #tab-advanced {
  background: var(--accent-color);
  color: #04080f;
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* --- MAIN CONTAINER --- */
main {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Dashboard Panel (Active Level View) */
/* Dashboard Panel (Active Level View) */
.level-panel {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  min-height: 580px;
  transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1), gap 0.3s ease;
}

.level-panel.active {
  display: grid;
}

.level-panel.collapsed {
  grid-template-columns: 0px 1fr;
  gap: 0px;
}

.level-panel.collapsed .sidebar-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-30px);
}

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

/* Left Sidebar: Controls & Instructions */
.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
  transition: var(--transition-smooth);
}

.exercise-selector-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-color);
  margin-bottom: 8px;
}

.exercise-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exercise-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: var(--text-secondary);
  font-family: var(--font-main);
  text-align: left;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.exercise-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: rgba(var(--accent-color-rgb), 0.3);
}

.exercise-btn.active {
  background: rgba(var(--accent-color-rgb), 0.1);
  border-color: var(--accent-color);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: inset 0 0 10px rgba(var(--accent-color-rgb), 0.1);
}

.exercise-btn .status-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: var(--transition-smooth);
}

.exercise-btn.active .status-icon {
  background: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-color);
}

/* Info & Controls Card */
.info-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.exercise-info h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.exercise-info p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Control Buttons & Timers */
.control-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.timer-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timer-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.timer-display {
  font-size: 32px;
  font-family: monospace;
  font-weight: 700;
  color: var(--accent-color);
  text-shadow: 0 0 10px var(--accent-glow);
}

/* Progress bar */
.progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--accent-color), var(--accent-hover));
  transition: width 0.2s linear;
  box-shadow: 0 0 8px var(--accent-glow);
}

.btn-group {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.btn {
  font-family: var(--font-main);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent-color);
  color: #04080f;
  border: none;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

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

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-focus);
}

/* Custom Extra Option Settings (e.g. Tachistoscope WPM selector) */
.settings-group {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
}

.settings-control {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 6px;
  font-family: var(--font-main);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.settings-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* --- MAIN DISPLAY PANEL (CANVAS & EXERCISE WRAPPERS) --- */
.display-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.arena-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.4) 0%, rgba(8, 12, 20, 0.9) 100%);
  border: 1px solid var(--border-color);
  min-height: 520px;
}

/* The interactive visual layers */
.exercise-arena {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.exercise-arena.active {
  display: flex;
}

/* Canvas Element for high refresh eye exercises */
canvas.exercise-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Guided Blink Exercise Overlay (HTML/CSS Based) */
.blink-guide-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.blink-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: transparent;
  border: 4px solid var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 20px rgba(var(--accent-color-rgb), 0.1), inset 0 0 20px rgba(var(--accent-color-rgb), 0.1);
  transition: var(--transition-smooth);
}

.blink-circle::before {
  content: '';
  position: absolute;
  top: -8px; left: -8px; right: -8px; bottom: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(var(--accent-color-rgb), 0.4);
  animation: rotateClockwise 20s linear infinite;
}

@keyframes rotateClockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.blink-core {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 30px var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.8);
  transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.5s ease;
}

.blink-text {
  font-size: 24px;
  font-weight: 800;
  color: #04080f;
  text-transform: uppercase;
  pointer-events: none;
  animation: pulseText 1.5s infinite alternate;
}

/* Animations for blink cycle */
.blink-core.breathe-in {
  transform: scale(1.1);
  background-color: var(--accent-color);
}

.blink-core.breathe-out {
  transform: scale(0.2);
  background-color: var(--text-muted);
}

.blink-instruction {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  min-height: 24px;
  letter-spacing: 0.5px;
}

/* Peripheral Flash DOM Overlay */
.peripheral-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10%;
  box-sizing: border-box;
}

.peripheral-element {
  font-size: 56px;
  font-weight: 800;
  font-family: monospace;
  color: var(--accent-color);
  text-shadow: 0 0 20px var(--accent-glow);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.05s ease-out, transform 0.05s ease-out;
}

.peripheral-element.flash {
  opacity: 1;
  transform: scale(1.1);
}

.peripheral-center-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981; /* Emerald green target */
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.8);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
}

/* Tachistoscope Display */
.tachistoscope-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 40px;
}

.tachi-box {
  width: 90%;
  max-width: 680px;
  height: 160px;
  background: rgba(8, 12, 20, 0.8);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.6);
  position: relative;
  transition: var(--transition-smooth);
}

.tachi-box::before, .tachi-box::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 30px;
  background: rgba(var(--accent-color-rgb), 0.4);
  left: 50%;
  transform: translateX(-50%);
}
.tachi-box::before { top: 0; }
.tachi-box::after { bottom: 0; }

.tachi-words {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-align: center;
  color: var(--text-primary);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.05s ease-out, transform 0.05s ease-out;
  padding: 0 20px;
}

.tachi-words.visible {
  opacity: 1;
  transform: scale(1.0);
}

.tachi-words span {
  display: inline-block;
  margin: 0 8px;
}

.tachi-words span.highlight {
  color: var(--accent-color);
  text-shadow: 0 0 15px var(--accent-glow);
}

/* Start Overlay Placeholder */
.arena-placeholder {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 8;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.arena-placeholder.hidden {
  opacity: 0;
  pointer-events: none;
}

.placeholder-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(var(--accent-color-rgb), 0.1);
  border: 2px solid var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-color);
  box-shadow: 0 0 20px var(--accent-glow);
  margin-bottom: 8px;
  animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
  from { box-shadow: 0 0 10px rgba(var(--accent-color-rgb), 0.2); }
  to { box-shadow: 0 0 25px rgba(var(--accent-color-rgb), 0.5); }
}

.placeholder-icon svg {
  width: 32px;
  height: 32px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.arena-placeholder h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.arena-placeholder p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* --- CONGRATS / MODAL VIEW --- */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(4, 6, 10, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 90%;
  max-width: 480px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(var(--accent-color-rgb), 0.15);
  transform: scale(0.9);
  transition: var(--transition-smooth);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.congrats-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(var(--accent-color-rgb), 0.1);
  border: 3px solid var(--accent-color);
  color: var(--accent-color);
  box-shadow: 0 0 30px var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 36px;
  animation: popScale 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popScale {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.modal-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.modal-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
}

/* --- FOOTER --- */
footer {
  padding: 24px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: auto;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1024px) {
  .level-panel {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  header {
    padding: 20px;
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  main {
    padding: 16px;
  }
  
  .arena-card {
    min-height: 380px;
  }
  
  .tachi-box {
    height: 120px;
  }
  
  .tachi-words {
    font-size: 24px;
  }
  
  .peripheral-element {
    font-size: 40px;
  }
}

/* --- LOGIN SCREEN STYLES --- */
.hidden {
  display: none !important;
}

.login-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1000;
  background-color: var(--bg-darker);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 45%),
    radial-gradient(at 50% 50%, #0b0f19 0%, var(--bg-darker) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.login-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 
    0 24px 50px rgba(0, 0, 0, 0.5), 
    0 0 40px rgba(6, 182, 212, 0.05),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  animation: loginIntro 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes loginIntro {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px var(--accent-glow);
  margin: 0 auto 24px;
}

.login-logo svg {
  width: 32px;
  height: 32px;
  fill: #fff;
}

.login-card h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.5;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

.form-group input {
  background: rgba(8, 12, 20, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
  transition: var(--transition-smooth);
}

.form-group input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-glow);
  background: rgba(8, 12, 20, 0.9);
}

.login-error {
  display: none;
  font-size: 13px;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-weight: 500;
  margin-bottom: 8px;
  animation: shakeError 0.4s ease-in-out;
}

.login-error.visible {
  display: block;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.btn-login {
  width: 100%;
  padding: 14px;
  font-size: 14px;
}

.login-help {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.login-help code {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent-hover);
  font-family: monospace;
  font-size: 12px;
}

/* --- USER PROFILE (HEADER) --- */
.user-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-left: 20px;
  border-left: 1px solid var(--border-color);
}

.user-greeting {
  font-size: 13px;
  color: var(--text-secondary);
}

.user-greeting strong {
  color: var(--accent-color);
  font-weight: 700;
}

.btn-logout {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
  transform: scale(1.05);
}

@media (max-width: 1024px) {
  .user-profile {
    border-left: none;
    padding-left: 0;
    margin-top: 8px;
  }
}

/* --- INTERMEDIATE: SCHULTE TABLE STYLES --- */
.schulte-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 20px;
}

.schulte-instructions {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.schulte-badge {
  background: var(--accent-color);
  color: #04080f;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  box-shadow: 0 0 10px var(--accent-glow);
  display: inline-block;
  min-width: 28px;
  text-align: center;
}

.schulte-grid {
  display: grid;
  grid-template-columns: repeat(3, min(100px, 22vw));
  grid-template-rows: repeat(3, min(100px, 22vw));
  gap: 16px;
  margin-bottom: 24px;
}

.schulte-cell {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.schulte-cell:hover {
  border-color: var(--accent-color);
  box-shadow: 0 0 15px var(--accent-glow);
  color: var(--text-primary);
  background: rgba(var(--accent-color-rgb), 0.05);
}

.schulte-cell:active {
  transform: scale(0.95);
}

.schulte-cell.correct {
  background: #10b981 !important;
  color: #04080f !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.schulte-cell.incorrect {
  background: #ef4444 !important;
  color: #f8fafc !important;
  border-color: #f87171 !important;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
  animation: cellShake 0.3s ease-in-out;
}

@keyframes cellShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.schulte-score {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#schulte-score-val {
  color: var(--accent-color);
  font-weight: 700;
}

/* --- ADVANCED: GUIDED READING STYLES --- */
.guided-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 40px;
  overflow-y: auto;
  box-sizing: border-box;
}

.guided-text-box {
  max-width: 680px;
  font-size: 18px;
  line-height: 2.0;
  color: var(--text-secondary);
  text-align: justify;
  background: rgba(8, 12, 20, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.4);
  max-height: 380px;
  overflow-y: auto;
}

.guided-word {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 4px;
  border-radius: 4px;
  transition: background-color 0.1s ease, color 0.1s ease;
  user-select: none;
}

.guided-word.highlight {
  background-color: rgba(var(--accent-color-rgb), 0.25);
  color: var(--text-primary);
  border-bottom: 2px solid var(--accent-color);
  font-weight: 600;
  text-shadow: 0 0 8px var(--accent-glow);
}

/* --- BASIC: LUMINAL CONTRAST STYLES --- */
.luminal-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-darker);
  transition: background-color 2s ease-in-out;
  border-radius: var(--radius-sm);
}

.luminal-container.light-bg {
  background-color: #f1f5f9 !important;
}

.luminal-target {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.luminal-shape {
  width: 100%;
  height: 100%;
}

.luminal-circle {
  fill: none;
  stroke: var(--accent-color);
  stroke-width: 4;
  transition: stroke 0.5s ease;
}

.luminal-container.light-bg .luminal-circle {
  stroke: #0f172a;
}

.luminal-cross {
  stroke: var(--accent-color);
  stroke-width: 2;
  transition: stroke 0.5s ease;
}

.luminal-container.light-bg .luminal-cross {
  stroke: #0f172a;
}

/* --- INTERMEDIATE: PERIPHERAL VERTICAL STYLES --- */
.peripheral-vertical-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 8%;
  box-sizing: border-box;
}

.p-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 90%;
  width: 180px;
}

.p-col-left {
  text-align: right;
}

.p-col-right {
  text-align: left;
}

.p-word-item {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.15;
  transform: scale(0.95);
  transition: opacity 0.1s ease-out, transform 0.1s ease-out, color 0.1s ease;
}

.p-word-item.flash {
  opacity: 1;
  color: var(--accent-color);
  transform: scale(1.1);
  text-shadow: 0 0 10px var(--accent-glow);
}

.p-rail {
  position: relative;
  width: 4px;
  height: 90%;
  display: flex;
  justify-content: center;
}

.p-rail-line {
  position: absolute;
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.06);
}

.p-rail-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
  top: 0%;
  transform: translate(-50%, -50%);
  z-index: 5;
}

/* --- ADVANCED: PYRAMID TEXT STYLES --- */
.pyramid-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 30px;
  box-sizing: border-box;
}

.pyramid-text-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 580px;
}

.pyramid-line {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  width: 100%;
  transition: color 0.2s ease, font-weight 0.2s ease;
}

.pyramid-left-block {
  flex: 1;
  text-align: right;
  padding-right: 40px;
  white-space: nowrap;
}

.pyramid-right-block {
  flex: 1;
  text-align: left;
  padding-left: 40px;
  white-space: nowrap;
}

.pyramid-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  top: 50%;
  transition: all 0.2s ease;
}

.pyramid-line.active {
  color: var(--text-primary);
  font-weight: 700;
}

.pyramid-line.active .pyramid-dot {
  background: var(--accent-color);
  box-shadow: 0 0 15px var(--accent-glow);
  transform: translate(-50%, -50%) scale(1.4);
}

/* --- ADVANCED: STROOP GAME STYLES --- */
.stroop-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  height: 100%;
  padding: 20px;
}

.stroop-card {
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 36px 64px;
  box-shadow: inset 0 4px 20px rgba(0, 0, 0, 0.4);
  min-width: 260px;
  text-align: center;
}

.stroop-word {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 2px;
  user-select: none;
}

.stroop-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  max-width: 360px;
}

.btn-stroop-opt {
  font-family: var(--font-main);
  font-weight: 700;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  border: 1px solid var(--border-color);
}

.btn-stroop-opt[data-color="red"] {
  color: #ef4444; background: rgba(239, 68, 68, 0.05); border-color: rgba(239, 68, 68, 0.2);
}
.btn-stroop-opt[data-color="red"]:hover {
  background: #ef4444; color: #04080f; box-shadow: 0 0 15px rgba(239, 68, 68, 0.4); border-color: #ef4444;
}

.btn-stroop-opt[data-color="blue"] {
  color: #3b82f6; background: rgba(59, 130, 246, 0.05); border-color: rgba(59, 130, 246, 0.2);
}
.btn-stroop-opt[data-color="blue"]:hover {
  background: #3b82f6; color: #04080f; box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); border-color: #3b82f6;
}

.btn-stroop-opt[data-color="green"] {
  color: #10b981; background: rgba(16, 185, 129, 0.05); border-color: rgba(16, 185, 129, 0.2);
}
.btn-stroop-opt[data-color="green"]:hover {
  background: #10b981; color: #04080f; box-shadow: 0 0 15px rgba(16, 185, 129, 0.4); border-color: #10b981;
}

.btn-stroop-opt[data-color="yellow"] {
  color: #f59e0b; background: rgba(245, 158, 11, 0.05); border-color: rgba(245, 158, 11, 0.2);
}
.btn-stroop-opt[data-color="yellow"]:hover {
  background: #f59e0b; color: #04080f; box-shadow: 0 0 15px rgba(245, 158, 11, 0.4); border-color: #f59e0b;
}

.stroop-scoreboard {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stroop-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
}

.stroop-badge.correct {
  color: #10b981;
}

.stroop-badge.incorrect {
  color: #ef4444;
}

/* --- SYSTEM OF PROGRESS STYLES --- */
.progress-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.level-progress-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.level-progress-bar-container {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.level-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-glow);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-color);
  font-family: monospace;
  min-width: 36px;
  text-align: right;
  text-shadow: 0 0 8px var(--accent-glow);
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.achievement-badge {
  aspect-ratio: 1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  cursor: help;
  transition: var(--transition-smooth);
  user-select: none;
}

.achievement-badge svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  margin-bottom: 2px;
}

.achievement-badge.unlocked {
  background: rgba(var(--accent-color-rgb), 0.06);
  border-color: var(--accent-color);
  color: var(--text-primary);
  box-shadow: 0 0 12px var(--accent-glow);
  transform: translateY(-2px);
}

/* Specific theme text color overrides for badges */
body.theme-basic .achievement-badge.unlocked {
  color: #22d3ee;
}
body.theme-intermediate .achievement-badge.unlocked {
  color: #34d399;
}
body.theme-advanced .achievement-badge.unlocked {
  color: #a78bfa;
}

.graph-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.graph-container {
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* --- SPLASH SCREEN STYLES --- */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0A192F;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 440px;
  padding: 20px;
}

.splash-logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.splash-logo .logo-svg {
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 0 15px rgba(0, 245, 212, 0.6));
  animation: splashLogoPulse 3s ease-in-out infinite alternate;
}

.splash-logo .logo-svg-small {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 0 10px rgba(0, 245, 212, 0.5));
}

@keyframes splashLogoPulse {
  0% {
    transform: scale(0.95);
    filter: drop-shadow(0 0 10px rgba(0, 245, 212, 0.4));
  }
  100% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 25px rgba(0, 245, 212, 0.8));
  }
}

.splash-title {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 3px;
  margin: 0 0 10px 0;
  font-family: var(--font-main);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.splash-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: #00F5D4;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 36px 0;
  text-shadow: 0 2px 8px rgba(0, 245, 212, 0.2);
}

.splash-loader-container {
  width: 240px;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.splash-loader-bar {
  height: 100%;
  width: 0%;
  background: #00F5D4;
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.9);
  transition: width 0.1s linear;
}

/* --- GENERAL SCREENS FLOW --- */
.app-screen {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.app-screen.hidden {
  display: none !important;
}

/* --- MAIN MENU DASHBOARD STYLES --- */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px var(--padding-container);
  background: rgba(8, 12, 20, 0.5);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  z-index: 100;
}

.main-header .logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.main-header .logo-icon {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 8px rgba(0, 245, 212, 0.5));
}

.main-header .logo-icon svg {
  width: 100%;
  height: 100%;
}

.menu-main-content {
  flex: 1;
  padding: 32px var(--padding-container);
  overflow-y: auto;
  background: radial-gradient(circle at top, rgba(10, 25, 47, 0.4) 0%, rgba(4, 8, 15, 0) 70%);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Level Cards custom themes */
.level-card {
  background: rgba(8, 12, 20, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.level-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
  box-shadow: 0 12px 30px rgba(var(--accent-color-rgb), 0.1);
}

.level-card-basic {
  --accent-color: #22d3ee;
  --accent-glow: rgba(6, 182, 212, 0.4);
  --accent-color-rgb: 34, 211, 238;
}
.level-card-intermediate {
  --accent-color: #34d399;
  --accent-glow: rgba(16, 185, 129, 0.4);
  --accent-color-rgb: 52, 211, 153;
}
.level-card-advanced {
  --accent-color: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.4);
  --accent-color-rgb: 167, 139, 250;
}
.level-card-stats {
  --accent-color: #a78bfa;
  --accent-glow: rgba(139, 92, 246, 0.4);
  --accent-color-rgb: 167, 139, 250;
  grid-column: span 1;
}

@media (min-width: 900px) {
  .level-card-stats {
    grid-column: span 2;
  }
}

.level-card-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.level-badge {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(var(--accent-color-rgb), 0.08);
  color: var(--accent-color);
  border: 1px solid rgba(var(--accent-color-rgb), 0.2);
}

.level-card-header h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.level-card-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.progress-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.progress-pct-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-color);
  font-family: monospace;
}

.menu-progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.menu-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-glow);
  transition: width 0.5s ease-out;
}

/* Accordion custom style */
.accordion-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-sizing: border-box;
}

.accordion-trigger:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent-color);
  color: var(--text-primary);
}

.accordion-trigger .chevron {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-trigger.active .chevron {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-content.active {
  max-height: 400px;
}

.exercise-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
}

.exercise-menu-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-sizing: border-box;
}

.exercise-menu-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-color);
  background: rgba(var(--accent-color-rgb), 0.04);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.exercise-menu-btn .menu-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition-smooth);
  flex-shrink: 0;
  margin-left: 12px;
}

.exercise-menu-btn.completed .menu-status-dot {
  background: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-glow);
}

.dashboard-graph-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-graph-container {
  background: rgba(8, 12, 20, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* --- EXERCISE ARENA SCREEN --- */
.arena-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--padding-container);
  background: rgba(8, 12, 20, 0.5);
  border-bottom: 1px solid var(--border-color);
  height: 64px;
  backdrop-filter: blur(10px);
  z-index: 100;
  box-sizing: border-box;
}

.arena-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn-back-menu {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  height: 38px;
}

.arena-level-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 8px var(--accent-glow);
}

.logo-container-small .logo-text-small {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 1.5px;
}

.arena-main-layout {
  display: flex;
  height: calc(100vh - 64px);
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.arena-sidebar-panel {
  width: 320px;
  background: rgba(8, 12, 20, 0.2);
  border-right: 1px solid var(--border-color);
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  flex-shrink: 0;
}

.arena-display-panel {
  flex: 1;
  background: var(--bg-darker);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
}

.arena-container-card {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 0;
}

/* Touch Friendly controls */
.info-card-tactile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(8, 12, 20, 0.4);
}

.exercise-info-tactile h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.exercise-info-tactile p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.settings-group-tactile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.settings-label-tactile {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.settings-control-tactile {
  height: 42px;
  background: rgba(8, 12, 20, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.settings-control-tactile:focus {
  border-color: var(--accent-color);
}

.controls-card-tactile {
  background: rgba(8, 12, 20, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.timer-wrapper-tactile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.timer-label-tactile {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.timer-display-tactile {
  font-size: 36px;
  font-weight: 800;
  font-family: monospace;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.arena-progress-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}

.arena-progress-bar {
  height: 100%;
  width: 100%;
  background: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-glow);
  transition: width 0.1s linear;
}

/* TACTILE OVERSIZED BUTTONS (50px+ Height) */
.btn-group-tactile {
  display: flex;
  gap: 12px;
  width: 100%;
}

.btn-tactile {
  height: 52px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-sizing: border-box;
  font-family: var(--font-main);
  transition: var(--transition-smooth);
  border: 1px solid var(--border-color);
  user-select: none;
}

.btn-tactile svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn-start-tactile {
  background: var(--accent-color);
  color: #04080f;
  border-color: var(--accent-color);
  flex: 2;
}

.btn-start-tactile:hover:not(:disabled) {
  box-shadow: 0 0 15px var(--accent-glow);
}

.btn-start-tactile:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-pause-tactile {
  flex: 1.5;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
}

.btn-pause-tactile:hover:not(:disabled) {
  border-color: var(--accent-color);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.btn-pause-tactile:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-reset-tactile {
  width: 52px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  padding: 0;
}

.btn-reset-tactile:hover {
  border-color: var(--accent-color);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.arena-placeholder-tactile {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-darker);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 80;
  text-align: center;
  padding: 24px;
  box-sizing: border-box;
}

.arena-placeholder-tactile.hidden {
  display: none !important;
}

.placeholder-icon-tactile {
  width: 64px;
  height: 64px;
  color: var(--accent-color);
  opacity: 0.7;
  filter: drop-shadow(0 0 10px var(--accent-glow));
  margin-bottom: 20px;
}

.placeholder-icon-tactile svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.arena-placeholder-tactile h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.arena-placeholder-tactile p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
  margin: 0;
}

/* --- BLOQUEO DE PESTAÑAS DE NIVEL --- */
.tab-btn.locked {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none !important;
  background: rgba(15, 23, 42, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.03) !important;
  color: var(--text-muted) !important;
  box-shadow: none !important;
  transform: none !important;
}

.tab-btn.locked::after {
  content: "🔒";
  font-size: 11px;
  margin-left: 8px;
  opacity: 0.7;
}

/* --- ESTILOS DE NUEVOS EJERCICIOS --- */

/* Parpadeo de Enfoque Alterno (Cerca/Lejos) */
.accommodation-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
}
.accommodation-target {
  font-size: 120px;
  font-weight: 800;
  color: var(--accent-color);
  text-shadow: 0 0 30px var(--accent-glow);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-main);
  user-select: none;
}
.accommodation-target.far {
  opacity: 0.15;
  transform: scale(0.4);
  filter: blur(2px);
}
.accommodation-instructions {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

/* Expansión Circular */
.expansion-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.expansion-center-text {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  background: rgba(8, 12, 20, 0.9);
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--accent-color);
  box-shadow: 0 0 20px var(--accent-glow);
  text-align: center;
  z-index: 10;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Lectura en Columna Estrecha */
.narrow-container {
  position: relative;
  width: 320px;
  height: 90%;
  margin: 0 auto;
  overflow: hidden;
  border-left: 1px dashed rgba(255, 255, 255, 0.08);
  border-right: 1px dashed rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.01);
  border-radius: var(--radius-sm);
}
.narrow-guide-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0;
  height: 100%;
  border-left: 2px dotted var(--accent-color);
  opacity: 0.45;
  z-index: 2;
  transform: translateX(-50%);
}
.narrow-text-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: absolute;
  top: 45%;
  transform: translateY(0);
  transition: transform 0.25s ease-out;
  z-index: 3;
}
.narrow-line {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 10px 16px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  transition: var(--transition-fast);
  line-height: 1.4;
}
.narrow-line.active {
  color: var(--text-primary);
  font-weight: 700;
  background: rgba(var(--accent-color-rgb), 0.15);
  text-shadow: 0 0 10px var(--accent-glow);
}

/* Flasheo de Números en Cadena */
.flashing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}
.flashing-number-display {
  font-size: 54px;
  font-family: monospace;
  font-weight: 800;
  color: var(--accent-color);
  letter-spacing: 5px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 0 20px var(--accent-glow);
  user-select: none;
}
.flashing-input-group {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
}
.flashing-input-group.hidden {
  display: none !important;
}
.flashing-input {
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid var(--border-color);
  color: #fff;
  padding: 12px 16px;
  font-size: 24px;
  font-weight: 700;
  font-family: monospace;
  border-radius: var(--radius-sm);
  flex: 1;
  text-align: center;
  outline: none;
  transition: var(--transition-smooth);
}
.flashing-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 15px var(--accent-glow);
}
.flashing-feedback {
  font-size: 15px;
  font-weight: 700;
  height: 24px;
  text-align: center;
  letter-spacing: 0.5px;
}
.flashing-feedback.correct {
  color: #34d399;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
}
.flashing-feedback.incorrect {
  color: #f87171;
  text-shadow: 0 0 10px rgba(248, 113, 113, 0.3);
}
.flashing-stats {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.flashing-badge {
  color: var(--accent-color);
  font-weight: 800;
}

/* --- ESTILOS DE RUTINAS Y MICRODESCANSO --- */

.routine-selector-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.routine-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
  text-align: left;
}
.routine-tab-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}
.routine-tab-btn.active {
  background: rgba(0, 245, 212, 0.06);
  border-color: var(--accent-color);
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.15);
}
.routine-tab-btn .routine-name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.routine-tab-btn.active .routine-name {
  color: var(--accent-color);
  text-shadow: 0 0 10px var(--accent-glow);
}
.routine-tab-btn .routine-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.routine-sub-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 700;
}
.routine-exercises-list-wrapper {
  margin-top: 15px;
  border-top: 1px dashed rgba(255, 255, 255, 0.05);
  padding-top: 15px;
}

/* Overlay de microdescanso */
.break-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 12, 20, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.3s ease;
  border-radius: var(--radius-md);
}
.break-overlay.hidden {
  display: none !important;
}
.break-content {
  text-align: center;
  max-width: 400px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.break-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 15px var(--accent-glow);
}
.break-timer {
  font-size: 80px;
  font-weight: 800;
  font-family: monospace;
  color: #fff;
  line-height: 1;
}
.break-text {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.break-pulse-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 245, 212, 0.08);
  border: 2px solid var(--accent-color);
  animation: pulseBreak 2s infinite ease-in-out;
}

@keyframes pulseBreak {
  0% {
    transform: scale(0.85);
    opacity: 0.5;
    box-shadow: 0 0 0 0 rgba(0, 245, 212, 0.4);
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
    box-shadow: 0 0 20px 10px rgba(0, 245, 212, 0.2);
  }
  100% {
    transform: scale(0.85);
    opacity: 0.5;
    box-shadow: 0 0 0 0 rgba(0, 245, 212, 0);
  }
}

/* --- OPCIONES DE TEMAS SELECCIONABLES (SOBREESCRITURAS DE COLORES ACENTO) --- */
body.theme-opt-turquoise {
  --accent-color: #00F5D4 !important;
  --accent-color-rgb: 0, 245, 212 !important;
  --accent-hover: #5dfce8 !important;
  --accent-glow: rgba(0, 245, 212, 0.35) !important;
}
body.theme-opt-amethyst {
  --accent-color: #a855f7 !important;
  --accent-color-rgb: 168, 85, 247 !important;
  --accent-hover: #c084fc !important;
  --accent-glow: rgba(168, 85, 247, 0.35) !important;
}
body.theme-opt-amber {
  --accent-color: #f59e0b !important;
  --accent-color-rgb: 245, 158, 11 !important;
  --accent-hover: #fbbf24 !important;
  --accent-glow: rgba(245, 158, 11, 0.35) !important;
}
body.theme-opt-coral {
  --accent-color: #f43f5e !important;
  --accent-color-rgb: 244, 63, 94 !important;
  --accent-hover: #fb7185 !important;
  --accent-glow: rgba(244, 63, 94, 0.35) !important;
}

/* Contenedor del selector en cabecera */
.theme-switcher-container {
  position: relative;
  margin-right: 15px;
}
.theme-switcher-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.theme-switcher-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-color);
  border-color: var(--accent-color);
  box-shadow: 0 0 12px var(--accent-glow);
}
.theme-switcher-btn .theme-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.theme-dropdown {
  position: absolute;
  top: 48px;
  right: 0;
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  width: 190px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 210;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: themeSlideDown 0.2s ease-out;
}
.theme-dropdown.hidden {
  display: none !important;
}
.theme-dropdown-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 10px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 4px;
}
.theme-opt-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: var(--transition-fast);
}
.theme-opt-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}
.theme-opt-btn.active {
  background: rgba(var(--accent-color-rgb), 0.08);
  color: var(--accent-color);
}
.theme-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.theme-dot.dynamic {
  background: linear-gradient(135deg, #06b6d4, #10b981, #8b5cf6);
}
.theme-dot.turquoise {
  background: #00F5D4;
}
.theme-dot.amethyst {
  background: #a855f7;
}
.theme-dot.amber {
  background: #f59e0b;
}
.theme-dot.coral {
  background: #f43f5e;
}

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



