/* ==========================================================================
   ELDERWAKE - BROWSER MMORPG REPLICA STYLESHEET FOR ROBINHOOD CHAIN
   Aesthetics: Dark Fantasy RPG (#0b0e0a), Gold Accents (#e5c07b),
               Retro Pixel Typography (Silkscreen / Press Start 2P),
               Floating Audio Widget, Interactive Game Portal
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Silkscreen:wght@400;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #0b0e0a;
  --bg-card: rgba(18, 24, 18, 0.85);
  --bg-card-hover: rgba(26, 36, 26, 0.95);
  --bg-input: #101510;
  --bg-modal: #121812;

  --accent-gold: #e5c07b;
  --accent-gold-hover: #f3d494;
  --accent-gold-bright: #eab308;
  --accent-green: #22c55e;
  --accent-green-bg: rgba(34, 197, 94, 0.15);

  --text-main: #f8fafc;
  --text-muted: #9ea89c;
  --text-dark: #0b0e0a;

  --border-light: rgba(229, 192, 123, 0.15);
  --border-active: rgba(229, 192, 123, 0.4);
  --border-gold: #e5c07b;

  --font-pixel: 'Silkscreen', 'Press Start 2P', monospace;
  --font-heading: 'Press Start 2P', 'Silkscreen', cursive;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;

  --shadow-gold: 0 10px 30px rgba(229, 192, 123, 0.15);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  background: var(--bg-dark);
}

/* Pixel Font Utility */
.pixel-font {
  font-family: var(--font-pixel);
  letter-spacing: 0.05em;
}

.text-gold { color: var(--accent-gold); }
.text-muted { color: var(--text-muted); }

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(11, 14, 10, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
}

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--accent-gold);
  font-family: var(--font-pixel);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.chain-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 200, 5, 0.12);
  border: 1px solid rgba(0, 200, 5, 0.35);
  color: #00c805;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

/* Button Styles */
.btn-gold {
  background: var(--accent-gold);
  color: var(--text-dark);
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-pixel);
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(229, 192, 123, 0.25);
}

.btn-gold:hover {
  background: var(--accent-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 192, 123, 0.4);
}

.btn-outline-dark {
  background: rgba(0, 0, 0, 0.6);
  color: var(--text-main);
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-pixel);
  font-size: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-outline-dark:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(229, 192, 123, 0.08);
}

/* Hero Section with Forest BG */
.hero-section {
  position: relative;
  min-height: calc(100vh - 76px);
  padding: 100px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: 
    linear-gradient(180deg, rgba(11, 14, 10, 0.75) 0%, rgba(11, 14, 10, 0.95) 100%),
    url('https://images.unsplash.com/photo-1518709268805-4e9042af9f23?q=80&w=2000&auto=format&fit=crop') center/cover no-repeat;
}

.hero-tag {
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  color: var(--accent-gold);
  letter-spacing: 0.15em;
  margin-bottom: 24px;
}

.hero-title-pixel {
  font-family: var(--font-heading);
  font-size: 4.8rem;
  color: var(--accent-gold);
  text-shadow: 4px 4px 0px #000, -2px -2px 0px #000, 2px -2px 0px #000, -2px 2px 0px #000;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.hero-subheading {
  font-family: var(--font-pixel);
  font-size: 1.8rem;
  color: var(--text-main);
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.6;
  margin-bottom: 40px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* Core Loop Section (4 Columns) */
.section-game {
  padding: 100px 60px;
  max-width: 1360px;
  margin: 0 auto;
}

.section-tag {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: var(--accent-gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title-pixel {
  font-family: var(--font-pixel);
  font-size: 2.8rem;
  color: var(--text-main);
  margin-bottom: 60px;
  line-height: 1.25;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  transition: all 0.3s ease;
}

.pillar-card:hover {
  border-color: var(--accent-gold);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

.pillar-num {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: var(--accent-gold);
  margin-bottom: 16px;
}

.pillar-name {
  font-family: var(--font-pixel);
  font-size: 1.35rem;
  color: var(--text-main);
  margin-bottom: 12px;
}

.pillar-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Feature Showcase Split Section */
.feature-showcase-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 80px 60px;
  max-width: 1360px;
  margin: 0 auto;
  border-top: 1px solid var(--border-light);
}

.showcase-media-box {
  background: rgba(16, 22, 16, 0.8);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.showcase-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
}

/* Interactive Robinhood Game Portal Section */
.section-dapp-portal {
  padding: 100px 60px;
  background: rgba(14, 20, 14, 0.6);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.dapp-game-card {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8), var(--shadow-gold);
}

.game-inv-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.inv-slot {
  aspect-ratio: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.inv-slot:hover {
  border-color: var(--accent-gold);
  background: rgba(229, 192, 123, 0.1);
}

.inv-slot-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.inv-slot-count {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--accent-gold);
}

/* Floating Sound Widget (Bottom Right) */
.floating-sound-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 300;
  background: rgba(11, 14, 10, 0.92);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
}

.sound-toggle-btn {
  background: transparent;
  border: none;
  color: var(--accent-gold);
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.volume-slider {
  width: 70px;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content-rpg {
  background: var(--bg-modal);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), var(--shadow-gold);
}

/* Toast */
.toast-rpg {
  position: fixed;
  bottom: 90px;
  right: 28px;
  z-index: 1000;
  background: #121812;
  border: 1px solid var(--border-gold);
  border-left: 4px solid var(--accent-gold);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 1024px) {
  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-showcase-split {
    grid-template-columns: 1fr;
  }
  .hero-title-pixel {
    font-size: 3.2rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 20px;
  }
  .nav-links {
    display: none;
  }
  .pillars-grid {
    grid-template-columns: 1fr;
  }
  .hero-section {
    padding: 60px 20px;
  }
  .game-inv-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
