/**
 * MLSC Arcade & Games Section Stylesheet
 * Pure darkest black aesthetic with 100vh hero viewport and responsive cabinet
 */

:root {
  --games-bg-start: #000000;
  --games-bg-mid: #000000;
  --games-bg-end: #000000;
  --games-accent-yellow: #ffb900;
  --games-accent-glow: rgba(255, 185, 0, 0.2);
  --games-border-white: #ffffff;
  --games-border-glass: rgba(255, 255, 255, 0.12);
  --ms-red: #f25022;
  --ms-green: #7fba00;
  --ms-blue: #00a4ef;
  --ms-yellow: #ffb900;
}

/* Base Page Setup */
html,
body {
  background-color: #000000 !important;
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Games Section Container */
.games-page {
  position: relative;
  background: #000000 !important;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

/* Completely remove grid texture and glow overlays */
.games-grid-texture,
.games-ambient-glow {
  display: none !important;
}

/* ========================================================= */
/* 1. HERO & ARCADE LOBBY VIEWPORT (Strict 100vh Division)   */
/* ========================================================= */
.games-hero-viewport {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(75px, 11vh, 100px) 24px clamp(20px, 4vh, 40px);
  box-sizing: border-box;
  border-bottom: none;
  background: #000000 !important;
  overflow: hidden;
}

.event-glow {
  position: absolute;
  top: -10rem;
  left: 50%;
  height: clamp(24rem, 36vw, 32rem);
  width: clamp(24rem, 36vw, 32rem);
  transform: translateX(-50%);
  border-radius: 9999px;
  filter: blur(72px);
  -webkit-filter: blur(72px);
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

.games-title {
  position: relative;
  z-index: 2;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.3rem, 5.4vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.14;
  color: #ffffff;
  margin: 0 0 clamp(10px, 1.8vh, 18px);
  max-width: 880px;
}

/* Solid MLSC Yellow accent - No gradient */
.games-title .title-accent,
.games-title .title-gradient {
  color: var(--ms-yellow, #ffb900);
  display: inline-block;
  text-shadow: 0 0 28px rgba(255, 185, 0, 0.35);
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: var(--ms-yellow, #ffb900) !important;
}

.games-desc {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  font-weight: 400;
  color: #9ca3af;
  line-height: 1.65;
  max-width: 660px;
  margin: 0 auto clamp(18px, 3vh, 32px);
  opacity: 0.92;
}

/* Feature Spec Pill - Keeping only significant one */
.arcade-feature-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: clamp(22px, 3.5vh, 36px);
}

.arcade-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 185, 0, 0.06);
  border: 1px solid rgba(255, 185, 0, 0.28);
  border-radius: 9999px;
  padding: 7px 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: #f3f4f6;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 20px rgba(255, 185, 0, 0.08);
}

.arcade-feature-pill svg {
  color: var(--ms-yellow, #ffb900);
}

/* Call to Action Button */
.arcade-launch-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  color: #000000;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 13px 28px;
  border-radius: 9999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.2s ease;
  box-shadow: 0 10px 25px -5px rgba(255, 255, 255, 0.25);
}

.arcade-launch-cta:hover {
  transform: translateY(-2px);
  background: #f3f4f6;
  box-shadow: 0 16px 32px -6px rgba(255, 255, 255, 0.35);
}

.arcade-launch-cta svg {
  transition: transform 0.2s ease;
}

.arcade-launch-cta:hover svg {
  transform: translateY(3px);
}

/* Scroll indicator */
.games-scroll-hint {
  margin-top: clamp(16px, 2.6vh, 32px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  animation: floatHint 2.4s ease-in-out infinite;
}

@keyframes floatHint {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.6;
  }

  50% {
    transform: translateY(6px);
    opacity: 1;
  }
}

/* ========================================================= */
/* 2. ARCADE CHAMBER VIEWPORT & CABINET                      */
/* ========================================================= */
.games-arcade-viewport {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding: 80px 20px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-bottom: none;
  background: #000000 !important;
}

.arcade-cabinet {
  width: 100%;
  max-width: 1020px;
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.arcade-cabinet:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 1),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Top Console Header (Cleaned of colored dots and fake status info) */
.cabinet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cabinet-title-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: #f3f4f6;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 5px 12px;
  border-radius: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cabinet-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cabinet-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d1d5db;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cabinet-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.cabinet-btn.active {
  background: rgba(255, 185, 0, 0.15);
  color: #ffb900;
  border-color: rgba(255, 185, 0, 0.4);
}

/* Screen Wrapper & Iframe */
.cabinet-screen-wrapper {
  position: relative;
  width: 100%;
  height: 680px;
  background: #000000;
  overflow: hidden;
}

.cabinet-screen-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #000000;
}

/* Bottom Console Deck */
.cabinet-deck {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: #080808;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: #9ca3af;
}

.cabinet-keybinds {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.keybind-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.key-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  color: #f3f4f6;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

.cabinet-storage-hint {
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ========================================================= */
/* 3. ROBUST FULLSCREEN STYLES (Separated for compatibility) */
/* ========================================================= */

/* Hide fixed navbar and elevate container when cabinet is in fullscreen */
body.cabinet-fullscreen #glass-navbar,
body.cabinet-fullscreen .glass-navbar,
:has(#arcade-cabinet.is-fullscreen) #glass-navbar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.cabinet-fullscreen .games-arcade-viewport,
.games-arcade-viewport:has(#arcade-cabinet.is-fullscreen) {
  z-index: 999999 !important;
}

/* Fallback & Class-based Fullscreen */
#arcade-cabinet.is-fullscreen,
.arcade-cabinet.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 999999 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #000000 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

#arcade-cabinet.is-fullscreen .cabinet-header,
.arcade-cabinet.is-fullscreen .cabinet-header {
  flex-shrink: 0;
  background: #050505 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 10px 20px;
}

#arcade-cabinet.is-fullscreen .cabinet-screen-wrapper,
.arcade-cabinet.is-fullscreen .cabinet-screen-wrapper {
  flex: 1 1 0% !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  background: #000000 !important;
}

#arcade-cabinet.is-fullscreen iframe,
.arcade-cabinet.is-fullscreen iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: none !important;
  background: #000000 !important;
}

#arcade-cabinet.is-fullscreen .cabinet-deck,
.arcade-cabinet.is-fullscreen .cabinet-deck {
  flex-shrink: 0;
  background: #050505 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 10px 20px;
}

/* Native W3C Standard Fullscreen */
#arcade-cabinet:fullscreen,
.arcade-cabinet:fullscreen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 999999 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #000000 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

#arcade-cabinet:fullscreen .cabinet-header,
.arcade-cabinet:fullscreen .cabinet-header {
  flex-shrink: 0;
  background: #050505 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 10px 20px;
}

#arcade-cabinet:fullscreen .cabinet-screen-wrapper,
.arcade-cabinet:fullscreen .cabinet-screen-wrapper {
  flex: 1 1 0% !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  background: #000000 !important;
}

#arcade-cabinet:fullscreen iframe,
.arcade-cabinet:fullscreen iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: none !important;
  background: #000000 !important;
}

#arcade-cabinet:fullscreen .cabinet-deck,
.arcade-cabinet:fullscreen .cabinet-deck {
  flex-shrink: 0;
  background: #050505 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 10px 20px;
}

/* WebKit Native Fullscreen */
#arcade-cabinet:-webkit-full-screen,
.arcade-cabinet:-webkit-full-screen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 999999 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #000000 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

#arcade-cabinet:-webkit-full-screen .cabinet-header,
.arcade-cabinet:-webkit-full-screen .cabinet-header {
  flex-shrink: 0;
  background: #050505 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 10px 20px;
}

#arcade-cabinet:-webkit-full-screen .cabinet-screen-wrapper,
.arcade-cabinet:-webkit-full-screen .cabinet-screen-wrapper {
  flex: 1 1 0% !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  background: #000000 !important;
}

#arcade-cabinet:-webkit-full-screen iframe,
.arcade-cabinet:-webkit-full-screen iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: none !important;
  background: #000000 !important;
}

#arcade-cabinet:-webkit-full-screen .cabinet-deck,
.arcade-cabinet:-webkit-full-screen .cabinet-deck {
  flex-shrink: 0;
  background: #050505 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 10px 20px;
}

/* Responsive Adjustments */
@media (max-width: 860px) {
  .cabinet-screen-wrapper {
    height: 560px;
  }

  .cabinet-deck {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 580px) {
  .games-hero-viewport {
    padding: 100px 16px 40px;
  }

  .cabinet-screen-wrapper {
    height: 480px;
  }

  .cabinet-keybinds {
    justify-content: center;
  }
}