/* ==========================================
   Vibe Code Arcade CSS Design System
   ========================================== */

/* Design Tokens */
:root {
  --bg-primary: #050508;
  --bg-secondary: #0d0e15;
  --bg-tertiary: #161722;
  --bg-glass: rgba(13, 14, 21, 0.7);
  --border-glass: rgba(255, 255, 255, 0.08);
  
  --text-main: #f0f1f7;
  --text-muted: #8d92b0;
  --text-dark: #5c607a;
  
  /* Neon Lights */
  --neon-cyan: #00f3ff;
  --neon-purple: #bd00ff;
  --neon-pink: #ff007f;
  --neon-gold: #ffb700;
  --neon-green: #39ff14;
  
  /* Glow Shadows */
  --glow-cyan: 0 0 15px rgba(0, 243, 255, 0.4);
  --glow-purple: 0 0 15px rgba(189, 0, 255, 0.4);
  --glow-pink: 0 0 15px rgba(255, 0, 127, 0.4);
  --glow-gold: 0 0 15px rgba(255, 183, 0, 0.4);
  --glow-green: 0 0 15px rgba(57, 255, 20, 0.4);
  
  /* Fonts */
  --font-display: 'Space Grotesk', sans-serif;
  --font-sans: 'Outfit', sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --radius-lg: 16px;
  --radius-md: 8px;
  --radius-sm: 4px;
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

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

/* Base Styles & Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
}

button, input {
  font-family: inherit;
}

.text-glow-cyan { text-shadow: var(--glow-cyan); color: var(--neon-cyan); }
.text-glow-purple { text-shadow: var(--glow-purple); color: var(--neon-purple); }
.text-glow-pink { text-shadow: var(--glow-pink); color: var(--neon-pink); }
.text-glow-gold { text-shadow: var(--glow-gold); color: var(--neon-gold); }

.w-100 { width: 100%; }

/* Background Glow Elements */
.background-glow {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(150px);
  opacity: 0.15;
  z-index: 0;
}

.background-glow.top-left {
  top: -10%;
  left: -10%;
  background: var(--neon-purple);
}

.background-glow.bottom-right {
  bottom: -10%;
  right: -10%;
  background: var(--neon-cyan);
}

/* Navigation Bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: rgba(5, 5, 8, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
}

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

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-accent {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-item {
  font-weight: 400;
  color: var(--text-muted);
  transition: var(--transition-smooth);
  position: relative;
  padding: 0.25rem 0;
}

.nav-item:hover, .nav-item.active {
  color: var(--text-main);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  transition: var(--transition-smooth);
}

.nav-item:hover::after {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 0.95rem;
  border: none;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-neon-fill {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  color: #fff;
  box-shadow: 0 4px 15px rgba(189, 0, 255, 0.3);
  position: relative;
  z-index: 1;
}

.btn-neon-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  border-radius: var(--radius-md);
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: -1;
}

.btn-neon-fill:hover::before {
  opacity: 1;
}

.btn-neon-fill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 243, 255, 0.5);
}

.btn-neon-outline {
  background: transparent;
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
  box-shadow: inset 0 0 4px rgba(0, 243, 255, 0.1);
}

.btn-neon-outline:hover {
  background: rgba(0, 243, 255, 0.08);
  color: #fff;
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

/* Hero Section */
.hero-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem 2rem 5rem 2rem;
  gap: 4rem;
  position: relative;
  z-index: 1;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-badge {
  font-family: var(--font-display);
  background: rgba(189, 0, 255, 0.1);
  border: 1px solid rgba(189, 0, 255, 0.3);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: var(--neon-purple);
  margin-bottom: 1.5rem;
  box-shadow: inset 0 0 10px rgba(189, 0, 255, 0.1);
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 540px;
}

.hero-buttons {
  display: flex;
  gap: 1.2rem;
}

/* 3D Cube Viewport Styles */
.cube-viewport-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cube-instruction {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  animation: pulseInstruction 2s infinite ease-in-out;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@keyframes pulseInstruction {
  0%, 100% { color: var(--text-dark); }
  50% { color: var(--text-muted); text-shadow: 0 0 5px rgba(255, 255, 255, 0.2); }
}

.cube-viewport {
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(189, 0, 255, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  position: relative;
}

.cube-scene {
  width: 200px;
  height: 200px;
  perspective: 600px;
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-20deg) rotateY(30deg);
  transition: transform 0.1s linear; /* Smooth mouse drag */
  cursor: grab;
}

.cube:active {
  cursor: grabbing;
}

.cube.auto-spinning {
  animation: spinCube 25s infinite linear;
}

@keyframes spinCube {
  0% { transform: rotateX(-15deg) rotateY(0deg); }
  100% { transform: rotateX(-15deg) rotateY(360deg); }
}

.cube-face {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(13, 14, 21, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: visible;
  transition: var(--transition-smooth);
}

.cube-face:hover {
  background: rgba(13, 14, 21, 0.95);
  border-color: var(--face-accent-color);
  box-shadow: 0 0 30px var(--face-glow-color);
}

/* Individual Face Rotations */
.cube-face-front  { transform: rotateY(0deg) translateZ(100px); --face-accent-color: var(--neon-cyan); --face-glow-color: rgba(0, 243, 255, 0.2); }
.cube-face-back   { transform: rotateY(180deg) translateZ(100px); --face-accent-color: var(--neon-purple); --face-glow-color: rgba(189, 0, 255, 0.2); }
.cube-face-right  { transform: rotateY(90deg) translateZ(100px); --face-accent-color: var(--neon-pink); --face-glow-color: rgba(255, 0, 127, 0.2); }
.cube-face-left   { transform: rotateY(-90deg) translateZ(100px); --face-accent-color: var(--neon-gold); --face-glow-color: rgba(255, 183, 0, 0.2); }
.cube-face-top    { transform: rotateX(90deg) translateZ(100px); --face-accent-color: var(--neon-cyan); --face-glow-color: rgba(0, 243, 255, 0.2); }
.cube-face-bottom { transform: rotateX(-90deg) translateZ(100px); --face-accent-color: var(--neon-green); --face-glow-color: rgba(57, 255, 20, 0.2); }

/* Face Content styling */
.cube-face-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  width: 100%;
  height: 100%;
  user-select: none;
}

.cube-face-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  transition: transform 0.3s ease;
}

.cube-face:hover .cube-face-icon {
  transform: scale(1.15) translateY(-5px);
}

.cube-face h3 {
  font-size: 1.1rem;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.cube-face-category {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.btn-face-action {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--face-accent-color);
  border: 1px solid var(--face-accent-color);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  background: transparent;
  transition: var(--transition-smooth);
}

.cube-face:hover .btn-face-action {
  background: var(--face-accent-color);
  color: #000;
  box-shadow: 0 0 10px var(--face-accent-color);
}

/* Face specific colors */
.font-wzrd { color: var(--neon-cyan); }
.font-chess { color: var(--neon-purple); }
.font-adam { color: var(--neon-pink); }
.font-club { color: var(--neon-gold); }
.font-ark { color: var(--neon-cyan); }
.font-aegis { color: var(--neon-green); }

/* Cube controllers */
.cube-nav-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.cube-control-btn {
  background: var(--bg-tertiary);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.cube-control-btn:hover {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow-cyan);
}

/* Section Common Header */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem auto;
  padding: 0 1rem;
}

.section-header .badge {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--neon-cyan);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-header .section-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-header .section-subtitle {
  color: var(--text-muted);
}

/* Arcade Section */
.arcade-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  gap: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-glass);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  flex: 1;
  max-width: 320px;
  transition: var(--transition-smooth);
}

.search-box:focus-within {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.search-icon {
  color: var(--text-dark);
}

.search-box input {
  background: transparent;
  border: none;
  color: var(--text-main);
  outline: none;
  font-size: 0.9rem;
  width: 100%;
}

.search-box input::placeholder {
  color: var(--text-dark);
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-tab {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-tab:hover {
  color: var(--text-main);
}

.filter-tab.active {
  background: linear-gradient(135deg, rgba(189, 0, 255, 0.2), rgba(0, 243, 255, 0.2));
  color: #fff;
  border: 1px solid rgba(0, 243, 255, 0.3);
  box-shadow: inset 0 0 5px rgba(0, 243, 255, 0.1);
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

/* Game Card */
.game-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--card-color-1, var(--neon-cyan)), var(--card-color-2, var(--neon-purple)));
  opacity: 0.8;
}

.game-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 
              0 0 15px rgba(189, 0, 255, 0.1);
}

.game-card-media {
  height: 180px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(45deg, #0d0f1a 0%, #171b30 100%);
}

/* SVG Patterns for Game Visuals */
.game-media-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.45;
  transition: transform 0.5s ease;
}

.game-card:hover .game-media-pattern {
  transform: scale(1.1) rotate(2deg);
}

.game-media-icon {
  font-size: 3.5rem;
  color: var(--card-color-1, var(--neon-cyan));
  z-index: 1;
  text-shadow: 0 0 20px rgba(var(--card-color-rgb), 0.5);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-card:hover .game-media-icon {
  transform: scale(1.2) rotate(-5deg);
}

.game-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-card-category {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--card-color-1, var(--neon-cyan));
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.game-card-title {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.game-card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

.game-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.game-tag {
  font-size: 0.7rem;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--border-glass);
}

.game-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
  padding-top: 1rem;
}

.btn-card-launch {
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.btn-card-launch i {
  transition: transform 0.3s ease;
}

.game-card:hover .btn-card-launch {
  color: var(--card-color-1);
}

.game-card:hover .btn-card-launch i {
  transform: translateX(4px);
}

.devlog-pulse-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-dark);
  font-weight: 600;
}

.devlog-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--neon-green);
  box-shadow: var(--glow-green);
  animation: pulseGreen 1.5s infinite ease-in-out;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Pillars Section */
.pillars-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  padding: 5rem 2rem;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.pillar-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.pillar-icon {
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

.pillar-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

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

/* Immersive Portal Drawer Overlay */
.portal-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0.4s;
}

.portal-drawer.active {
  visibility: visible;
  pointer-events: auto;
}

.portal-drawer-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 3, 5, 0.75);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.portal-drawer.active .portal-drawer-backdrop {
  opacity: 1;
}

.portal-drawer-container {
  width: 90%;
  max-width: 1200px;
  height: 100%;
  background: var(--bg-primary);
  border-left: 1px solid var(--border-glass);
  position: relative;
  z-index: 2;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.portal-drawer.active .portal-drawer-container {
  transform: translateX(0);
}

.portal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
}

.portal-close-btn:hover {
  background: var(--neon-pink);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow-pink);
  transform: rotate(90deg);
}

/* Portal Grid Layout */
.portal-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  height: 100%;
  overflow: hidden;
}

.portal-left-column {
  padding: 3rem 2.5rem;
  overflow-y: auto;
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.portal-right-column {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
}

/* Game Info Header inside Portal */
.portal-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.portal-game-category {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--neon-cyan);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.portal-game-title {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.portal-game-tagline {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Game Viewport and Canvas Container */
.game-viewport-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.game-canvas-container {
  width: 100%;
  aspect-ratio: 3/2;
  background-color: #020203;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
  position: relative;
  overflow: hidden;
}

#mini-game-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Game overlay for Standby/Play */
.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 5, 8, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.game-overlay-content {
  text-align: center;
  padding: 2rem;
  max-width: 400px;
}

.game-overlay-icon {
  font-size: 3rem;
  color: var(--neon-cyan);
  margin-bottom: 1rem;
  animation: floatPlayBtn 2s infinite ease-in-out;
}

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

.game-overlay h3 {
  font-size: 1.3rem;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.game-overlay-instructions {
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-glass);
  margin-top: 1rem;
  padding-top: 1rem;
}

.game-viewport-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-status-pill {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  color: var(--text-muted);
}

.game-status-pill.active {
  color: var(--neon-green);
  border-color: rgba(57, 255, 20, 0.3);
  background: rgba(57, 255, 20, 0.05);
  box-shadow: inset 0 0 5px rgba(57, 255, 20, 0.1);
}

/* Remix Sandbox Controls */
.remix-sandbox-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 0.5rem;
}

.remix-sandbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
}

.remix-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  color: var(--neon-purple);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.remix-code-sync {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.remix-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.remix-sandbox-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.remix-sliders-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.remix-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.control-label-wrapper {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
}

.control-label {
  color: var(--text-main);
}

.control-value {
  color: var(--neon-cyan);
}

.slider-input {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 5px;
  outline: none;
  border: 1px solid var(--border-glass);
  transition: var(--transition-smooth);
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 5px rgba(0, 243, 255, 0.5);
  transition: transform 0.1s ease;
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.remix-code-panel {
  background: #020204;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  max-height: 220px;
}

.code-panel-header {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.4rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dark);
}

.code-panel-body {
  padding: 1rem;
  overflow-y: auto;
  color: #c9d1d9;
}

/* Right Column Navigation Tabs */
.portal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(0, 0, 0, 0.15);
}

.portal-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 1.25rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-bottom: 2px solid transparent;
}

.portal-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.portal-tab-btn.active {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan);
  background: rgba(0, 243, 255, 0.03);
}

/* Tab Pane content */
.portal-tab-contents {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
}

.portal-tab-pane {
  display: none;
  height: 100%;
}

.portal-tab-pane.active {
  display: block;
}

.pane-header {
  margin-bottom: 2rem;
}

.pane-header h3 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.pane-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Timeline/Devlog */
.timeline {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--bg-tertiary);
  padding-left: 1.5rem;
  margin-left: 0.5rem;
  position: relative;
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.05rem;
  top: 0.25rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}

.timeline-phase {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.timeline-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Prompt Packs list */
.prompt-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.prompt-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.prompt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.prompt-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-copy-prompt {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-smooth);
}

.btn-copy-prompt:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.btn-copy-prompt.copied {
  background: rgba(57, 255, 20, 0.1);
  color: var(--neon-green);
  border-color: var(--neon-green);
}

.prompt-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.prompt-code-box {
  background: #020204;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-family: 'Consolas', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  max-height: 120px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  user-select: all;
}

/* Source Notes Code formatting */
.code-notes-wrapper {
  background: #020204;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
  font-family: 'Consolas', monospace;
  font-size: 0.75rem;
  color: #e6edf3;
  line-height: 1.5;
}

.code-notes-wrapper code {
  white-space: pre;
}

/* Support Tab inside Portal */
.support-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  height: 100%;
}

.support-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.support-tier-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.25rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.support-tier-card .tier-val {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  transition: var(--transition-smooth);
}

.support-tier-card .tier-name {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}

.support-tier-card p {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.support-tier-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.support-tier-card.active {
  border-color: var(--neon-gold);
  background: rgba(255, 183, 0, 0.05);
  box-shadow: inset 0 0 5px rgba(255, 183, 0, 0.1);
}

.support-tier-card.active .tier-val {
  color: var(--neon-gold);
  text-shadow: var(--glow-gold);
}

.checkout-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.custom-amount-input {
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  max-width: 110px;
}

.custom-amount-input span {
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.custom-amount-input input {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.1rem;
  width: 100%;
  outline: none;
}

/* Chrome/Safari input spinners */
.custom-amount-input input::-webkit-outer-spin-button,
.custom-amount-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.support-thank-you {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 5;
}

.support-thank-you.active {
  opacity: 1;
  pointer-events: auto;
}

.thank-you-content {
  text-align: center;
  padding: 2rem;
  max-width: 320px;
}

.thank-you-icon {
  font-size: 3.5rem;
  color: var(--neon-gold);
  margin-bottom: 1.25rem;
  animation: floatPlayBtn 2s infinite ease-in-out;
}

.thank-you-content h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.thank-you-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 3, 5, 0.8);
  backdrop-filter: blur(8px);
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 480px;
  position: relative;
  z-index: 2;
  padding: 2.5rem;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

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

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}

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

.modal-header h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.modal-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tip-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.newsletter-signup {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid var(--border-glass);
  padding-top: 1.5rem;
}

.newsletter-signup label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

.input-group input {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  outline: none;
  font-size: 0.9rem;
}

.input-group input:focus {
  border-color: var(--neon-cyan);
}

.success-message {
  font-size: 0.8rem;
  color: var(--neon-green);
  display: none;
}

/* ==========================================
   Responsive Breakpoints
   ========================================== */

@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 7rem 2rem 4rem 2rem;
    gap: 3rem;
  }
  
  .hero-content {
    align-items: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .portal-grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  
  .portal-left-column {
    border-right: none;
    border-bottom: 1px solid var(--border-glass);
    overflow-y: visible;
  }
  
  .portal-right-column {
    height: auto;
    overflow-y: visible;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
  }
  
  .search-box {
    max-width: none;
  }
  
  .filter-tabs {
    justify-content: center;
  }
  
  .support-tiers {
    grid-template-columns: 1fr;
  }
  
  .checkout-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .custom-amount-input {
    max-width: none;
  }
}

/* ==========================================
   Immersive Hero — Three.js beach world
   ========================================== */
.hero-immersive {
  display: block;
  max-width: none;
  height: 100svh;
  min-height: 580px;
  padding: 0;
  margin: 0;
  gap: 0;
  position: relative;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  touch-action: pan-y; /* keep page scroll working on mobile */
}

body.webgl-active #hero-canvas { display: block; }
body.webgl-active .hero-fallback { display: none; }

/* Fallback: center the original CSS cube when WebGL is unavailable */
.hero-fallback {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-top: 4rem;
}

/* Glass UI overlay */
.hero-glass-ui {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none; /* let clicks reach the canvas */
  display: block;
}

.hero-glass-panel {
  pointer-events: auto;
  position: absolute;
  left: clamp(1rem, 4vw, 4rem);
  bottom: clamp(4.5rem, 10vh, 7rem);
  max-width: 480px;
  padding: 1.75rem 2rem;
  border-radius: 20px;
  background: rgba(13, 14, 21, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.hero-glass-panel .hero-title { font-size: clamp(1.6rem, 3.2vw, 2.6rem); }
.hero-glass-panel .hero-description { font-size: 0.95rem; }

.hero-cube-hint {
  pointer-events: none;
  position: absolute;
  top: 6.2rem;
  right: clamp(1rem, 4vw, 4rem);
  padding: 0.55rem 1.1rem;
  border-radius: 50px;
  background: rgba(13, 14, 21, 0.4);
  border: 1px solid rgba(0, 243, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 1.5px;
  color: var(--neon-cyan);
  animation: pulseInstruction 3s infinite ease-in-out;
}
.hero-cube-hint i { margin-right: 0.5rem; }

.hero-scroll-cue {
  pointer-events: none;
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 3px;
  color: rgba(240, 241, 247, 0.55);
}
.hero-scroll-cue i { animation: scrollBob 1.8s infinite ease-in-out; }

@keyframes scrollBob {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(5px); opacity: 1; }
}

/* Navbar becomes glass over the scene */
body.webgl-active .navbar {
  background: rgba(5, 5, 8, 0.35);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
  .hero-glass-panel {
    left: 1rem;
    right: 1rem;
    bottom: 4rem;
    max-width: none;
    padding: 1.25rem 1.4rem;
  }
  .hero-cube-hint { top: 5.2rem; right: 1rem; font-size: 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-cube-hint,
  .hero-scroll-cue i,
  .cube.auto-spinning { animation: none; }
}
