/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #07080f;
  --bg-secondary: #0d0f1a;
  --bg-card: rgba(15, 18, 35, 0.8);
  --bg-card-hover: rgba(25, 30, 55, 0.9);
  --accent: #5ebbff;
  --accent-glow: rgba(94, 187, 255, 0.3);
  --accent-secondary: #a78bfa;
  --text-primary: #e8eaf0;
  --text-secondary: #8b90a0;
  --text-muted: #5a5f73;
  --twitch: #9146ff;
  --youtube: #ff0000;
  --discord: #5865f2;
  --x-twitter: #e7e9ea;
  --border: rgba(94, 187, 255, 0.1);
  --border-hover: rgba(94, 187, 255, 0.25);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #8dd3ff;
}

img {
  max-width: 100%;
  display: block;
}

/* ===== SNOWFALL CANVAS ===== */
#snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition), padding var(--transition), backdrop-filter var(--transition);
}

.navbar.scrolled,
.navbar-solid {
  background: rgba(7, 8, 15, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.nav-logo:hover {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(94, 187, 255, 0.08);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 120px 24px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(94, 187, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(167, 139, 250, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(94, 187, 255, 0.04) 0%, transparent 40%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-greeting {
  display: block;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-name {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -2px;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent) 50%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-top: 16px;
  font-weight: 300;
  letter-spacing: 0.5px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.8rem;
  animation: float 3s ease-in-out infinite;
}

.hero-scroll-hint svg {
  width: 20px;
  height: 20px;
}

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-icon {
  width: 20px;
  height: 20px;
}

.btn-primary {
  background: var(--twitch);
  color: #fff;
  box-shadow: 0 4px 20px rgba(145, 70, 255, 0.3);
}

.btn-primary:hover {
  background: #a366ff;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(145, 70, 255, 0.4);
}

.btn-secondary {
  background: rgba(94, 187, 255, 0.1);
  color: var(--accent);
  border: 1px solid var(--border-hover);
}

.btn-secondary:hover {
  background: rgba(94, 187, 255, 0.18);
  color: #8dd3ff;
  transform: translateY(-2px);
}

.btn-twitch .btn-icon { color: #fff; }
.btn-youtube .btn-icon { color: var(--youtube); }

/* ===== SECTIONS ===== */
.section {
  padding: 80px 0;
  position: relative;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 48px;
  text-align: center;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== ABOUT ===== */
.about {
  background: var(--bg-secondary);
}

.about-content {
  display: flex;
  align-items: center;
  gap: 48px;
  max-width: 800px;
  margin: 0 auto;
}

.about-avatar {
  flex-shrink: 0;
}

.avatar-frame {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
  padding: 3px;
  box-shadow: 0 0 40px var(--accent-glow);
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.about-text p {
  margin-bottom: 14px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-text strong {
  color: var(--text-primary);
}

/* ===== LATEST VIDEO ===== */
.video-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
}

.video-placeholder svg {
  width: 64px;
  height: 64px;
  opacity: 0.3;
}

.video-cta {
  text-align: center;
  margin-top: 32px;
}

/* ===== QUICK LINKS ===== */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}

.link-card {
  display: block;
  padding: 40px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition);
  color: var(--text-primary);
}

.link-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(94, 187, 255, 0.08);
  color: var(--text-primary);
}

.link-card-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.link-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.link-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== SOCIALS ===== */
.socials {
  background: var(--bg-secondary);
}

.socials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  text-align: center;
}

.social-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.social-icon {
  width: 36px;
  height: 36px;
  transition: transform var(--transition);
}

.social-card:hover .social-icon {
  transform: scale(1.15);
}

.social-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.social-handle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Social card hover colors */
.social-twitch:hover {
  border-color: var(--twitch);
  box-shadow: 0 8px 32px rgba(145, 70, 255, 0.15);
}
.social-twitch .social-icon { color: var(--twitch); }

.social-youtube:hover {
  border-color: var(--youtube);
  box-shadow: 0 8px 32px rgba(255, 0, 0, 0.12);
}
.social-youtube .social-icon { color: var(--youtube); }

.social-discord:hover {
  border-color: var(--discord);
  box-shadow: 0 8px 32px rgba(88, 101, 242, 0.15);
}
.social-discord .social-icon { color: var(--discord); }

.social-x:hover {
  border-color: var(--x-twitter);
  box-shadow: 0 8px 32px rgba(231, 233, 234, 0.08);
}
.social-x .social-icon { color: var(--x-twitter); }

/* ===== PAGE HEADER (builds, skins) ===== */
.page-header {
  padding: 140px 0 60px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(94, 187, 255, 0.06) 0%, transparent 60%);
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -1px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  color: var(--text-secondary);
  margin-top: 12px;
  font-size: 1.05rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== BUILDS GRID ===== */
.builds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.build-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition);
}

.build-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(94, 187, 255, 0.1);
}

.build-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-secondary);
}

.build-card-image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--bg-secondary), rgba(94, 187, 255, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.build-card-body {
  padding: 20px;
}

.build-card-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.build-card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== SKINS GRID ===== */
.skins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

.skin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.skin-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(94, 187, 255, 0.1);
}

.skin-card img {
  width: 120px;
  height: auto;
  image-rendering: pixelated;
  margin-bottom: 16px;
}

.skin-card-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.skin-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal.open {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 900px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 1;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal.open .modal-content {
  transform: translateY(0);
}

.modal-content-skin {
  max-width: 500px;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.modal-description {
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.modal-gallery img {
  width: 100%;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--transition);
}

.modal-gallery img:hover {
  transform: scale(1.03);
}

.skin-modal-body img {
  max-width: 250px;
  margin: 20px auto;
  image-rendering: pixelated;
}

/* ===== NAMEMC LINK ===== */
.namemc-link {
  text-align: center;
  margin-top: 40px;
}

.namemc-link a {
  display: inline-block;
  padding: 14px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.namemc-link a:hover {
  background: rgba(94, 187, 255, 0.1);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ===== FOOTER ===== */
.footer {
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    background: rgba(7, 8, 15, 0.98);
    backdrop-filter: blur(20px);
    padding: 80px 32px 32px;
    gap: 4px;
    transition: right var(--transition);
    border-left: 1px solid var(--border);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.05rem;
    padding: 12px 16px;
  }

  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .builds-grid {
    grid-template-columns: 1fr;
  }

  .skins-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .socials-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-content {
    padding: 24px;
    width: 95%;
  }

  .modal-gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .socials-grid {
    grid-template-columns: 1fr;
  }

  .links-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }
