:root {
  --neon: #00f0ff;
  --bg-dark: #050508;
  --bg-light: #ffffff;
  --text-dark: #ffffff;
  --text-light: #222222;
  --card-dark: rgba(255, 255, 255, 0.04);
  --card-light: rgba(0, 0, 0, 0.04);
  --border-dark: rgba(255, 255, 255, 0.05);
  --border-light: rgba(0, 0, 0, 0.05);
}

* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #0b0f18, var(--bg-dark));
  color: var(--text-dark);
  font-family: 'Inter', sans-serif;
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
}

body.light-mode {
  background: radial-gradient(circle at top, #f0f4f8, var(--bg-light));
  color: var(--text-light);
}

canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  image-rendering: pixelated;
  opacity: 0.7;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  z-index: 999;
  color: white;
  font-size: 20px;
  transition: all 0.3s;
}

.light-mode .theme-toggle {
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: #222;
}

.theme-toggle:hover {
  transform: scale(1.05);
}

.light-icon { display: none; }
.light-mode .dark-icon { display: none; }
.light-mode .light-icon { display: inline; }

/* ===== HEADER & NAVIGATION ===== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  position: relative;
  z-index: 100;
  padding-right: 100px;
}

.logo {
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 2px;
  font-size: 24px;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  transition: color 0.3s;
  position: relative;
  z-index: 101;
}

.logo:hover {
  color: var(--neon);
}

.nav-desktop {
  display: flex;
  gap: 24px;
  position: relative;
  z-index: 101;
}

.nav-desktop a {
  color: #aaa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
  padding: 8px 0;
}

.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--neon);
  transition: width 0.3s;
}

.nav-desktop a:hover::after,
.nav-desktop a.active::after {
  width: 100%;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--neon);
}

.light-mode .nav-desktop a {
  color: #666;
}

.nav-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 5px;
  position: relative;
  z-index: 101;
  margin-left: auto;
}

.nav-mobile {
  display: none;
  position: absolute;
  top: 70px;
  right: 20px;
  background: rgba(10, 12, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(12px);
  z-index: 1000;
  min-width: 180px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.light-mode .nav-mobile {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-mobile.show {
  display: flex !important;
}

.nav-mobile a {
  color: #aaa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  padding: 8px 0;
}

.nav-mobile a:hover,
.nav-mobile a.active {
  color: var(--neon);
}

.light-mode .nav-mobile a {
  color: #666;
}

@media (max-width: 900px) {
  .nav-desktop {
    display: none;
  }
  
  .nav-toggle {
    display: block;
    margin-left: auto;
  }
  
  header {
    padding: 20px 80px 20px 40px;
  }
  
  .theme-toggle {
    top: 20px;
    right: 20px;
  }
  
  .nav-mobile {
    top: 80px;
    right: 20px;
    z-index: 1001;
  }
}

@media (max-width: 768px) {
  header {
    padding: 20px 70px 20px 20px;
  }
  
  .page-header h1 {
    font-size: 32px;
  }
  
  section {
    padding: 20px;
  }
  
  .card {
    padding: 20px;
  }
  
  /* Stream responsive */
  .stream-container iframe {
    height: 360px;
  }
  
  .stream-widgets {
    margin: 30px auto;
    max-width: 100%;
  }
  
  /* Community widgets responsive */
  .community-widgets {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 40px auto;
  }
  
  .widget-card {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .theme-toggle {
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    font-size: 18px;
  }
  
  header {
    padding: 15px 70px 15px 20px;
  }
  
  .nav-mobile {
    top: 75px;
    right: 15px;
    min-width: 160px;
    padding: 15px;
  }
  
  /* Stream responsive */
  .stream-container iframe {
    height: 280px;
    border-radius: 12px;
  }
  
  /* Community widgets responsive */
  #boxart {
    height: 150px;
  }
}

/* ===== MAIN CONTENT ===== */
main {
  min-height: calc(100vh - 200px);
}

section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-header {
  text-align: center;
  margin: 60px 0 40px;
}

.page-header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 42px;
  color: var(--neon);
  margin-bottom: 10px;
}

.page-header p {
  color: #bbb;
  max-width: 600px;
  margin: 0 auto;
}

.light-mode .page-header p {
  color: #666;
}

/* ===== CARDS ===== */
.card {
  background: var(--card-dark);
  border: 1px solid var(--border-dark);
  border-radius: 16px;
  padding: 24px;
  margin: 20px 0;
  transition: transform 0.3s, box-shadow 0.3s;
}

.light-mode .card {
  background: var(--card-light);
  border: 1px solid var(--border-light);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.1);
}

.card h2 {
  font-family: 'Orbitron', sans-serif;
  color: var(--neon);
  margin-bottom: 15px;
  font-size: 22px;
}

.card h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--neon);
  margin-bottom: 10px;
  font-size: 18px;
}

/* ===== LISTS ===== */
ul, ol {
  padding-left: 20px;
  color: #bbb;
  margin: 15px 0;
}

.light-mode ul,
.light-mode ol {
  color: #666;
}

li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  border-top: 1px solid var(--border-dark);
  margin-top: 60px;
}

.light-mode footer {
  border-top: 1px solid var(--border-light);
}

.footer-links {
  margin-bottom: 20px;
}

.footer-links a {
  color: #666;
  margin: 0 10px;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--neon);
}

/* ===== STREAM WIDGETS STYLING - CENTERED VERSION ===== */

/* Center the stream widget */
.stream-widgets {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px auto;
  width: 100%;
  max-width: 1000px;
  padding: 0 20px;
}

/* Stream container - wider and centered */
.stream-container {
  width: 100%;
  max-width: 900px;
}

.stream-container iframe {
  width: 100%;
  height: 506px;
  border-radius: 16px;
  border: 2px solid rgba(145, 70, 255, 0.4);
  box-shadow: 0 10px 40px rgba(145, 70, 255, 0.25);
  transition: all 0.3s ease;
}

.stream-container iframe:hover {
  border-color: var(--neon);
  box-shadow: 0 15px 50px rgba(145, 70, 255, 0.35);
  transform: translateY(-3px);
}

/* Stream status indicator */
.stream-status {
  text-align: center;
  margin-bottom: 15px;
}

.stream-status .live-badge {
  display: inline-block;
  background: #ff2b2b;
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* ===== COMMUNITY WIDGETS STYLING ===== */
.community-widgets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin: 60px auto 40px;
  max-width: 1000px;
  width: 100%;
  padding: 0 20px;
}

.widget-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s, border-color 0.3s;
}

.widget-card:hover {
  transform: translateY(-5px);
  border-color: var(--neon);
}

.widget-card h3 {
  margin-bottom: 20px;
  font-size: 20px;
  color: var(--neon);
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
}

#gameInfo {
  height: 100%;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#boxart {
  width: 100%;
  max-width: 300px;
  height: 180px;
  border-radius: 8px;
  object-fit: cover;
  display: none;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#gameName {
  font-size: 16px;
  color: #bbb;
  font-weight: 500;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  width: 100%;
}

.offline-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 180px;
  color: #888;
  font-size: 16px;
}

.offline-state span {
  font-size: 48px;
  margin-bottom: 10px;
  opacity: 0.5;
}

.discord-widget {
  width: 100%;
  height: 250px;
  border-radius: 8px;
  border: none;
}

.light-mode .widget-card {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
}

.light-mode #gameName {
  background: rgba(0, 0, 0, 0.05);
  color: #666;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* ===== HELPER CLASSES ===== */
.text-center {
  text-align: center;
}

.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0;
}