/* ==========================================================================
   ScreennPlay Arcade - Global High-Performance Arcade Stylesheet
   Designed for Hostinger public_html static deployment & 60 FPS mobile play
   ========================================================================== */

:root {
  --bg-main: #070b14;
  --bg-card: #0f172a;
  --bg-card-hover: #1e293b;
  --bg-input: #0b1120;
  --border-card: rgba(255, 255, 255, 0.08);
  --border-focus: #06b6d4;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  
  --neon-cyan: #06b6d4;
  --neon-purple: #8b5cf6;
  --neon-pink: #ec4899;
  --neon-emerald: #10b981;
  --neon-amber: #f59e0b;
  --neon-red: #ef4444;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-neon: 0 0 20px rgba(6, 182, 212, 0.25);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.15), transparent 45%),
              radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.1), transparent 40%),
              radial-gradient(circle at 15% 70%, rgba(236, 72, 153, 0.08), transparent 40%),
              var(--bg-main);
  background-attachment: fixed;
  overflow-x: hidden;
  touch-action: manipulation;
}

/* Typography & Links */
a {
  color: var(--neon-cyan);
  text-decoration: none;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

a:hover {
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

h1, h2, h3, h4, h5 {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.25;
}

p {
  color: var(--text-muted);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  touch-action: manipulation;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  user-select: none;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 11, 20, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-card);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #06b6d4, #8b5cf6);
  padding: 2px;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.brand-icon img, .brand-icon svg {
  width: 100%;
  height: 100%;
}

.brand-text {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.brand-text span {
  background: linear-gradient(135deg, #06b6d4, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.nav-desktop::-webkit-scrollbar {
  display: none;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-icon {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 1.15rem;
  transition: all 0.15s ease;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Sound Indicator */
.sound-toggle.muted {
  color: var(--neon-red);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
  color: #ffffff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-card);
  color: #ffffff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-accent {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}

.btn-accent:hover {
  background: linear-gradient(135deg, #a855f7, #f43f5e);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
  color: #ffffff;
}

.btn-success {
  background: linear-gradient(135deg, var(--neon-emerald), #059669);
  color: #ffffff;
}

/* Hero Section */
.hero-section {
  padding: 3rem 0 2rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 9999px;
  color: var(--neon-cyan);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-title .glow-cyan {
  color: var(--neon-cyan);
  text-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
}

.hero-title .glow-pink {
  color: var(--neon-pink);
  text-shadow: 0 0 25px rgba(236, 72, 153, 0.4);
}

.hero-subtitle {
  font-size: 1.15rem;
  max-width: 680px;
  margin: 0 auto 2rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Quick Resume Bar */
.continue-bar {
  display: none;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin: 1.5rem auto 0;
  max-width: 720px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.continue-info {
  text-align: left;
}

.continue-title {
  font-size: 0.9rem;
  color: var(--neon-cyan);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.continue-game-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}

/* Arcade Games Grid */
.games-section {
  padding: 2.5rem 0 3.5rem;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 12px 30px -10px rgba(6, 182, 212, 0.25);
}

.card-banner {
  height: 160px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #090d19;
}

.card-banner svg, .card-banner canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.game-card:hover .card-banner svg {
  transform: scale(1.05);
}

.card-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-card);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--neon-cyan);
}

.card-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  flex-grow: 1;
  line-height: 1.45;
}

.card-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border-card);
  border-bottom: 1px solid var(--border-card);
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-label {
  color: var(--text-faint);
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.stat-value {
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
}

.card-stars {
  color: var(--neon-amber);
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-weight: 800;
}

/* Native Banner Advertisement Card */
.ad-slot-wrapper {
  margin: 2.5rem 0;
  display: flex;
  justify-content: center;
  width: 100%;
}

.ad-card {
  width: 100%;
  max-width: 970px;
  min-height: 110px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-lg);
  padding: 0.65rem 0.85rem 0.85rem;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(6, 182, 212, 0.1);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ad-card:hover {
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(6, 182, 212, 0.2);
}

.ad-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-bottom: 0.4rem;
  align-self: center;
}

.ad-container-target {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80px;
}

#container-f2050efe1ca93822447ce7971a14f1f6 {
  width: 100%;
  display: block;
}

/* Clickable Sponsored Fallback & Interactive Creative */
.ad-banner-link {
  display: block;
  width: 100%;
  text-decoration: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.14), rgba(139, 92, 246, 0.14));
  border: 1px solid rgba(6, 182, 212, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.ad-banner-link:hover {
  transform: translateY(-1px);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.35);
}

.ad-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  gap: 1rem;
}

.ad-banner-left {
  text-align: left;
  flex: 1;
}

.ad-badge-neon {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.ad-banner-headline {
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
}

.ad-banner-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.ad-banner-cta {
  flex-shrink: 0;
}

.ad-cta-btn {
  pointer-events: none;
  font-size: 0.88rem;
  padding: 0.45rem 1rem;
  min-height: 38px;
}

/* Floating Social Bar Fallback & Interactive Pill */
.social-bar-floating {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(11, 17, 32, 0.94);
  border: 1px solid rgba(6, 182, 212, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(6, 182, 212, 0.25);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  max-width: calc(100% - 32px);
  animation: slideUp 0.3s ease;
}

.social-bar-floating:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 30px rgba(6, 182, 212, 0.45);
}

.social-bar-pulse {
  color: #10b981;
  font-size: 0.9rem;
  animation: pulseDot 1.5s infinite;
}

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

.social-bar-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.social-bar-action {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--neon-cyan);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .ad-banner-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem;
  }
  .ad-banner-cta {
    align-self: flex-start;
    margin-top: 0.5rem;
  }
  .social-bar-text {
    font-size: 0.75rem;
    max-width: 200px;
  }
}

/* Community Comment Wall */
.community-section {
  padding: 3rem 0;
  background: rgba(11, 17, 32, 0.6);
  border-top: 1px solid var(--border-card);
  border-bottom: 1px solid var(--border-card);
}

.community-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 2rem;
}

.comment-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  height: fit-content;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #ffffff;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
}

.char-counter {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 0.25rem;
}

.rate-notice {
  font-size: 0.8rem;
  color: var(--neon-amber);
  margin-top: 0.5rem;
  display: none;
}

.comments-feed {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.comment-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: fadeIn 0.25s ease;
}

.comment-card.staff-post {
  border-color: rgba(6, 182, 212, 0.4);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), var(--bg-card));
}

.comment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.comment-author {
  font-weight: 800;
  color: #ffffff;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.author-badge {
  background: var(--neon-cyan);
  color: #070b14;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.comment-game-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--neon-purple);
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.25);
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
}

.comment-time {
  font-size: 0.75rem;
  color: var(--text-faint);
}

.comment-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.45;
  word-break: break-word;
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-faint);
}

/* Game Page Shell */
.game-page-container {
  padding: 1.5rem 0 3rem;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

.game-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.game-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.game-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.game-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.game-title-wrap h1 {
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffffff;
}

.game-level-tag {
  font-size: 0.8rem;
  color: var(--neon-cyan);
  font-weight: 700;
}

.game-hud-stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.hud-item {
  text-align: right;
}

.hud-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hud-value {
  font-size: 1.2rem;
  font-weight: 900;
  color: #ffffff;
}

/* Game Stage & Arena */
.game-stage {
  position: relative;
  background: #080c16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.8);
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 440px;
  user-select: none;
}

/* Floating Arcade Feedback Text (NO ALERT MODALS!) */
.arcade-floating-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 40;
}

.arcade-floating-text {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%) scale(0.6);
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  animation: arcadeFloatUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  text-shadow: 0 0 20px currentColor, 0 4px 8px rgba(0,0,0,0.8);
}

.arcade-score-popup {
  position: absolute;
  font-size: 1.35rem;
  font-weight: 900;
  color: #facc15;
  text-shadow: 0 0 12px rgba(250, 204, 21, 0.7);
  pointer-events: none;
  animation: scoreFloatUp 0.75s ease-out forwards;
}

@keyframes arcadeFloatUp {
  0% {
    opacity: 0;
    transform: translate(-50%, -30%) scale(0.7);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
  }
  40% {
    transform: translate(-50%, -55%) scale(1);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -75%) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -95%) scale(0.9);
  }
}

@keyframes scoreFloatUp {
  0% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50px) scale(1.3);
  }
}

/* Combos & FX */
.screen-shake {
  animation: screenShakeAnim 0.25s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes screenShakeAnim {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.combo-glow {
  animation: comboPulse 0.4s ease-out;
}

@keyframes comboPulse {
  0% { box-shadow: 0 0 0 rgba(236, 72, 153, 0); }
  50% { box-shadow: 0 0 35px rgba(236, 72, 153, 0.7); }
  100% { box-shadow: 0 0 0 rgba(236, 72, 153, 0); }
}

/* Level Completion / Game Over Overlay Modal */
.overlay-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 11, 20, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.overlay-modal-card {
  background: var(--bg-card);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(6, 182, 212, 0.2);
}

.overlay-title {
  font-size: 1.85rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}

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

.stars-rating-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
}

.star-icon {
  color: #334155;
  transition: transform 0.2s ease, color 0.2s ease;
}

.star-icon.earned {
  color: var(--neon-amber);
  transform: scale(1.1);
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
}

.overlay-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.overlay-stat-num {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
}

.overlay-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.overlay-more-games {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-card);
}

.overlay-more-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.overlay-more-icons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.overlay-game-link {
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.overlay-game-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Mobile Controls & On-screen D-pad */
.mobile-dpad-container {
  display: none;
  margin: 1rem auto 0;
  width: 190px;
  height: 190px;
  position: relative;
}

.dpad-btn {
  position: absolute;
  width: 58px;
  height: 58px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  touch-action: manipulation;
  user-select: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: background-color 0.1s ease, transform 0.05s ease;
}

.dpad-btn:active {
  background: var(--neon-cyan);
  color: #070b14;
  transform: scale(0.92);
}

.dpad-up    { top: 0; left: 66px; }
.dpad-down  { bottom: 0; left: 66px; }
.dpad-left  { top: 66px; left: 0; }
.dpad-right { top: 66px; right: 0; }
.dpad-center {
  top: 66px;
  left: 66px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

/* Game Level Select Drawer / Bar */
.level-select-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.75rem 0;
  margin-bottom: 1.25rem;
  scrollbar-width: thin;
}

.level-pill {
  flex-shrink: 0;
  min-width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.15s ease;
}

.level-pill.unlocked {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.level-pill.active {
  background: linear-gradient(135deg, var(--neon-cyan), #2563eb);
  color: #ffffff;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.level-pill.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.level-pill .pill-stars {
  position: absolute;
  bottom: -6px;
  font-size: 0.6rem;
  color: var(--neon-amber);
}

/* ==========================================================================
   GAME SPECIFIC STYLES
   ========================================================================== */

/* 1. LexiQuest Word Puzzle */
.lexiquest-board {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 1.25rem;
  align-items: center;
}

.lexi-row {
  display: flex;
  gap: 8px;
}

.lexi-tile {
  width: 58px;
  height: 58px;
  border: 2px solid #334155;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.85);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.3s ease;
  user-select: none;
}

.lexi-tile.pop {
  animation: tilePop 0.1s ease;
  border-color: #64748b;
}

.lexi-tile.correct {
  background: var(--neon-emerald);
  border-color: var(--neon-emerald);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
}

.lexi-tile.present {
  background: var(--neon-amber);
  border-color: var(--neon-amber);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
}

.lexi-tile.absent {
  background: #1e293b;
  border-color: #1e293b;
  color: #64748b;
}

@keyframes tilePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.lexi-keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 500px;
  padding: 0.5rem;
  margin: 0 auto;
}

.key-row {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.lexi-key {
  height: 48px;
  flex: 1;
  max-width: 44px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #ffffff;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  transition: background 0.1s ease;
}

.lexi-key.wide {
  max-width: 66px;
  font-size: 0.8rem;
}

.lexi-key:active {
  background: #334155;
}

.lexi-key.correct {
  background: var(--neon-emerald);
  color: #ffffff;
}

.lexi-key.present {
  background: var(--neon-amber);
  color: #ffffff;
}

.lexi-key.absent {
  background: #0b1120;
  color: #475569;
}

/* 2. Snake Nexus */
.snake-canvas-wrapper {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#snakeCanvas {
  background: #080d1a;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(6, 182, 212, 0.3);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.15);
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* 3. GemBlast Match */
.gemblast-wrapper {
  position: relative;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gemblast-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  background: #0b1120;
  border: 2px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
  touch-action: none;
}

.gem-tile {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s ease, filter 0.12s ease;
  position: relative;
}

.gem-tile:active {
  transform: scale(0.92);
}

.gem-tile.selected {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
  transform: scale(1.08);
  z-index: 10;
  filter: brightness(1.25);
}

.gem-tile svg {
  width: 82%;
  height: 82%;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* 4. TypoSprint Velocity */
.typosprint-wrapper {
  width: 100%;
  max-width: 680px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.typo-track {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  font-size: 1.4rem;
  line-height: 2;
  letter-spacing: 0.04em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  position: relative;
  min-height: 140px;
  word-break: break-word;
  user-select: none;
}

.typo-char {
  color: #64748b;
  position: relative;
  transition: color 0.05s ease;
}

.typo-char.correct {
  color: var(--neon-emerald);
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.typo-char.wrong {
  color: var(--neon-red);
  background: rgba(239, 68, 68, 0.2);
  border-radius: 2px;
}

.typo-char.current {
  color: #ffffff;
  background: rgba(6, 182, 212, 0.3);
  border-bottom: 3px solid var(--neon-cyan);
}

.typo-hidden-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.typo-meters-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.meter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.meter-label {
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  font-weight: 800;
}

.meter-val {
  font-size: 1.75rem;
  font-weight: 900;
  color: #ffffff;
}

/* 5. Grandmaster Chess */
.chess-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  width: 100%;
}

.chessboard {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  border: 3px solid #334155;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  touch-action: none;
}

.chess-square {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.chess-square.light {
  background: #cbd5e1;
}

.chess-square.dark {
  background: #475569;
}

.chess-square.selected {
  background: #facc15 !important;
}

.chess-square.last-move {
  background: rgba(6, 182, 212, 0.5) !important;
}

.chess-square.in-check {
  background: rgba(239, 68, 68, 0.7) !important;
}

.chess-square.valid-target::after {
  content: '';
  position: absolute;
  width: 28%;
  height: 28%;
  background: rgba(16, 185, 129, 0.75);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
  pointer-events: none;
}

.chess-piece {
  width: 85%;
  height: 85%;
  object-fit: contain;
  transition: transform 0.1s ease;
  pointer-events: none;
}

.chess-shelf {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 32px;
  width: 100%;
  max-width: 480px;
  font-size: 1.1rem;
}

/* 6. CrossWord Labyrinth */
.crossword-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  max-width: 760px;
  padding: 1rem;
}

.crossword-main-grid {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cw-grid-table {
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: var(--radius-md);
  padding: 6px;
  display: grid;
  gap: 3px;
}

.cw-cell {
  width: 42px;
  height: 42px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
}

.cw-cell.block {
  background: #090d19;
  border-color: #090d19;
  cursor: default;
}

.cw-cell.active-word {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.5);
}

.cw-cell.selected {
  background: var(--neon-cyan);
  color: #070b14;
}

.cw-cell-num {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 0.65rem;
  color: var(--text-faint);
  font-weight: 700;
}

.cw-clues-box {
  flex: 1;
  min-width: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  max-height: 380px;
  overflow-y: auto;
}

.cw-clue-item {
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 0.25rem;
}

.cw-clue-item.active {
  background: rgba(6, 182, 212, 0.15);
  color: var(--neon-cyan);
  font-weight: 700;
}

/* Gameplay Help & Guide Section */
.game-guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
}

.game-guide-section h2 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.game-guide-section p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.controls-tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.tip-box {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.tip-box h3 {
  font-size: 1rem;
  color: var(--neon-cyan);
  margin-bottom: 0.5rem;
}

.tip-box ul {
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tip-box li {
  margin-bottom: 0.35rem;
}

/* More Games Row */
.more-games-section {
  margin: 3rem 0;
}

/* Static Content & Legal Pages */
.legal-page-wrap {
  padding: 3rem 0 4rem;
  max-width: 820px;
  margin: 0 auto;
}

.legal-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.legal-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.legal-date {
  color: var(--text-faint);
  font-size: 0.9rem;
}

.legal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  line-height: 1.7;
}

.legal-content h2 {
  font-size: 1.45rem;
  margin: 1.75rem 0 0.75rem;
  color: #ffffff;
  border-bottom: 1px solid var(--border-card);
  padding-bottom: 0.5rem;
}

.legal-content h3 {
  font-size: 1.15rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--neon-cyan);
}

.legal-content p, .legal-content ul {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.legal-content ul {
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.4rem;
}

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 23, 42, 0.96);
  border-top: 1px solid rgba(6, 182, 212, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem 1.5rem;
  z-index: 100;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
  display: none;
  animation: slideUp 0.3s ease;
}

.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 720px;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: #050811;
  border-top: 1px solid var(--border-card);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-col h4 {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 800;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-social-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--neon-cyan);
  transform: translateY(-2px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 1rem;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .header-inner {
    gap: 0.75rem;
  }
  .nav-desktop {
    gap: 0.4rem;
  }
  .nav-link {
    font-size: 0.84rem;
    padding: 0.35rem 0.5rem;
  }
}

@media (max-width: 900px) {
  .community-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 64px;
    gap: 0.5rem;
  }
  .brand-text {
    font-size: 1.15rem;
  }
  .brand-icon {
    width: 34px;
    height: 34px;
  }
  .nav-desktop {
    gap: 0.3rem;
  }
  .nav-link {
    font-size: 0.8rem;
    padding: 0.3rem 0.45rem;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 64px;
  }
  .nav-desktop {
    display: none;
  }
  .mobile-dpad-container {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .lexi-tile {
    width: 46px;
    height: 46px;
    font-size: 1.4rem;
  }
  .gem-tile {
    width: 38px;
    height: 38px;
  }
  .cw-cell {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }
  .game-header-bar {
    padding: 0.75rem 1rem;
  }
  .game-stage {
    min-height: 360px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
