/* ===========================================
   OLYMPUS RISING - Main Styles
   Greek Mythology Theme
   =========================================== */

/* CSS Variables */
:root {
  /* Colors - Divine Palette */
  --color-olympus-gold: #D4AF37;
  --color-olympus-gold-light: #F4E4B5;
  --color-olympus-gold-dark: #A08020;
  --color-divine-purple: #4A0E4E;
  --color-divine-purple-light: #7B3F7E;
  --color-aegean-blue: #1E3A5F;
  --color-aegean-blue-dark: #0D1F33;
  --color-marble-white: #F5F5F5;
  --color-marble-cream: #FAF8F0;
  --color-ancient-bronze: #CD7F32;
  --color-blood-red: #8B0000;
  --color-laurel-green: #355E3B;
  --color-night-black: #0A0A0F;
  --color-shadow: rgba(0, 0, 0, 0.7);
  
  /* God-specific colors */
  --color-zeus: #FFD700;
  --color-poseidon: #00CED1;
  --color-hades: #4B0082;
  --color-athena: #C0C0C0;
  --color-ares: #DC143C;
  --color-apollo: #FFA500;
  --color-artemis: #98FB98;
  --color-aphrodite: #FF69B4;
  --color-hephaestus: #FF4500;
  --color-hermes: #00BFFF;
  --color-demeter: #228B22;
  --color-dionysus: #9400D3;
  
  /* Gradients */
  --gradient-olympus: linear-gradient(135deg, var(--color-divine-purple) 0%, var(--color-aegean-blue-dark) 50%, var(--color-night-black) 100%);
  --gradient-gold: linear-gradient(135deg, var(--color-olympus-gold-light) 0%, var(--color-olympus-gold) 50%, var(--color-olympus-gold-dark) 100%);
  --gradient-fire: linear-gradient(135deg, #FF6B35 0%, #FF4500 50%, #8B0000 100%);
  --gradient-divine: linear-gradient(180deg, rgba(212,175,55,0.3) 0%, transparent 50%);
  
  /* Typography */
  --font-display: 'Cinzel', serif;
  --font-body: 'Cormorant Garamond', serif;
  --font-accent: 'Spectral', serif;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-round: 50%;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(212, 175, 55, 0.5);
  --shadow-divine: 0 0 30px rgba(212, 175, 55, 0.3), 0 0 60px rgba(212, 175, 55, 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
  
  /* Z-Index Scale */
  --z-base: 1;
  --z-header: 100;
  --z-nav: 100;
  --z-overlay: 500;
  --z-modal: 1000;
  --z-toast: 1500;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

html {
  height: 100%;
  overflow: hidden; /* Prevent scrolling on html */
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-marble-cream);
  background: var(--color-night-black);
  height: 100%;
  max-height: 100vh;
  overflow: hidden; /* Prevent body scrolling */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.05em;
  color: var(--color-olympus-gold);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p {
  font-family: var(--font-body);
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-olympus-gold);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-olympus-gold-light);
  text-shadow: var(--shadow-glow);
}

/* Selection */
::selection {
  background: var(--color-olympus-gold);
  color: var(--color-night-black);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-aegean-blue-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--color-olympus-gold-dark);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-olympus-gold);
}

/* Greek Patterns */
.greek-pattern {
  position: absolute;
  left: 0;
  right: 0;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='20' viewBox='0 0 40 20'%3E%3Cpath d='M0 10 L5 10 L5 5 L10 5 L10 10 L15 10 L15 0 L20 0 L20 10 L25 10 L25 5 L30 5 L30 10 L35 10 L35 0 L40 0' fill='none' stroke='%23D4AF37' stroke-width='1.5'/%3E%3C/svg%3E") repeat-x;
  opacity: 0.6;
}

.greek-pattern.top {
  top: 0;
}

.greek-pattern.bottom {
  bottom: 0;
  transform: rotate(180deg);
}

/* Divine Background Textures */
.bg-marble {
  background: 
    linear-gradient(135deg, rgba(255,255,255,0.05) 25%, transparent 25%),
    linear-gradient(225deg, rgba(255,255,255,0.05) 25%, transparent 25%),
    linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%),
    linear-gradient(315deg, rgba(255,255,255,0.05) 25%, transparent 25%),
    var(--color-aegean-blue-dark);
  background-size: 20px 20px;
}

.bg-stars {
  background: 
    radial-gradient(2px 2px at 20px 30px, var(--color-olympus-gold-light), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 90px 40px, var(--color-olympus-gold), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 160px 30px, var(--color-olympus-gold-light), transparent);
  background-size: 200px 100px;
}

/* Utility Classes */
.text-gold { color: var(--color-olympus-gold); }
.text-cream { color: var(--color-marble-cream); }
.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.1em; }

.hidden { display: none !important; }
.invisible { visibility: hidden; opacity: 0; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { justify-content: center; align-items: center; }
.flex-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px var(--color-olympus-gold),
                0 0 10px rgba(212, 175, 55, 0.5);
  }
  50% {
    box-shadow: 0 0 15px var(--color-olympus-gold),
                0 0 30px rgba(212, 175, 55, 0.5),
                0 0 45px rgba(212, 175, 55, 0.3);
  }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

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

@keyframes lightning {
  0%, 9%, 11%, 100% { opacity: 0; }
  10% { opacity: 1; }
}

@keyframes divineGlow {
  0%, 100% {
    text-shadow: 
      0 0 10px var(--color-olympus-gold),
      0 0 20px var(--color-olympus-gold-dark);
  }
  50% {
    text-shadow: 
      0 0 20px var(--color-olympus-gold),
      0 0 40px var(--color-olympus-gold),
      0 0 60px var(--color-olympus-gold-light);
  }
}

/* Animation Utilities */
.animate-fadeIn { animation: fadeIn var(--transition-normal) ease-out; }
.animate-fadeInUp { animation: fadeInUp var(--transition-normal) ease-out; }
.animate-fadeInDown { animation: fadeInDown var(--transition-normal) ease-out; }
.animate-scaleIn { animation: scaleIn var(--transition-normal) ease-out; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-shake { animation: shake 0.5s ease-in-out; }
.animate-spin { animation: spin 1s linear infinite; }

/* Stagger animations for lists */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Screen Base */
.screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-olympus);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.screen.active {
  display: flex;
}

.screen.overlay {
  background: var(--color-shadow);
  z-index: var(--z-overlay);
  backdrop-filter: blur(4px);
}

/* Divine Divider */
.divine-divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--color-olympus-gold) 20%, 
    var(--color-olympus-gold) 80%, 
    transparent
  );
  margin: var(--space-md) 0;
  position: relative;
}

.divine-divider::before {
  content: '⚜';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-aegean-blue-dark);
  padding: 0 var(--space-sm);
  color: var(--color-olympus-gold);
}

/* Loading State */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-aegean-blue);
  border-top-color: var(--color-olympus-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* God Symbol Colors */
.god-zeus { color: var(--color-zeus); }
.god-poseidon { color: var(--color-poseidon); }
.god-hades { color: var(--color-hades); }
.god-athena { color: var(--color-athena); }
.god-ares { color: var(--color-ares); }
.god-apollo { color: var(--color-apollo); }
.god-artemis { color: var(--color-artemis); }
.god-aphrodite { color: var(--color-aphrodite); }
.god-hephaestus { color: var(--color-hephaestus); }
.god-hermes { color: var(--color-hermes); }
.god-demeter { color: var(--color-demeter); }
.god-dionysus { color: var(--color-dionysus); }

/* ═══════════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY - Focus States
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Visible focus for keyboard navigation */
button:focus-visible,
.btn:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-olympus-gold);
  outline-offset: 2px;
}

/* Remove default focus for mouse users */
button:focus:not(:focus-visible),
.btn:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* Skip to main content link (screen readers) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-olympus-gold);
  color: var(--color-aegean-blue-dark);
  padding: var(--space-sm);
  z-index: 10000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* XP Bar Enhancements */
#xp-fill.near-levelup {
  background: linear-gradient(90deg, #27ae60, #f1c40f);
  animation: xp-glow-pulse 1s ease infinite;
}

@keyframes xp-glow-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(241, 196, 15, 0.5); }
  50% { box-shadow: 0 0 15px rgba(241, 196, 15, 0.8); }
}

.xp-bar {
  cursor: help;
}

/* Navigation Badge for Unspent Points */
.nav-btn {
  position: relative;
}

.nav-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border-radius: 9px;
  font-size: 0.7rem;
  font-weight: bold;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  animation: badge-pulse 2s ease infinite;
  z-index: 10;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Skill Tree Tooltip Stats */
.tooltip-stats {
  margin-top: 8px;
  padding: 8px;
  background: rgba(39, 174, 96, 0.15);
  border-radius: 6px;
  font-size: 0.8rem;
  color: #27ae60;
}

