/* Global CSS Design System for Gesture Zone */
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&display=swap');

:root {
  --bg-color: #080808;
  --surface-color: #0d0d0d;
  --surface-hover: #121212;
  --border-color: #1a1a1a;
  --border-glow: rgba(192, 57, 43, 0.4);
  
  --primary-accent: #c0392b; /* Blood Red */
  --secondary-accent: #e74c3c; /* Lighter Red */
  --text-primary: #eeeeee;
  --text-muted: #666666;
  
  --success: #27ae60;
  --warning: #f39c12;
  --info: #3498db;
  
  --glow-shadow: 0 0 15px rgba(192, 57, 43, 0.6);
  --glow-shadow-strong: 0 0 25px rgba(231, 76, 60, 0.85);
  --glass-bg: rgba(13, 13, 13, 0.7);
  --glass-border: rgba(255, 255, 255, 0.03);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Courier Prime', 'Courier New', monospace;
  line-height: 1.6;
  letter-spacing: 1px;
  overflow-x: hidden;
  position: relative;
}

/* scanline scan grid background */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
  z-index: 999;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border: 1px solid var(--primary-accent);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-accent);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
  letter-spacing: 8px;
  text-shadow: 0 0 10px rgba(192, 57, 43, 0.4);
}

h2 {
  font-size: 2rem;
  letter-spacing: 6px;
  border-left: 3px solid var(--primary-accent);
  padding-left: 15px;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--secondary-accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--text-primary);
  text-shadow: 0 0 5px var(--secondary-accent);
}

/* Layout Utilities */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Navbar */
#lobby-canvas-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background-color: #060606;
}

header {
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(13, 13, 13, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: padding 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

header nav {
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1), max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), margin 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 100px;
  opacity: 1;
  visibility: visible;
}

header.scrolled {
  padding: 0.8rem 0;
  background-color: rgba(13, 13, 13, 0.9);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

header.scrolled nav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  max-height: 0;
  margin: 0 !important;
  overflow: hidden;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
}

.logo {
  font-weight: bold;
  font-size: 1.5rem;
  letter-spacing: 4px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo span {
  color: var(--primary-accent);
  text-shadow: 0 0 8px var(--primary-accent);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

nav a {
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 2px;
  color: var(--text-muted);
}

nav a.active, nav a:hover {
  color: var(--text-primary);
  border-bottom: 1px solid var(--primary-accent);
  padding-bottom: 5px;
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 70vh;
  background: radial-gradient(circle, rgba(192, 57, 43, 0.08) 0%, rgba(8, 8, 8, 0) 70%);
  border-bottom: 1px solid var(--border-color);
  padding: 4rem 1rem;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 4rem;
  letter-spacing: 12px;
  margin-bottom: 0.5rem;
  animation: pulse 4s infinite alternate;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.2rem;
  max-width: 600px;
  margin-bottom: 2.5rem;
  letter-spacing: 2px;
}

/* Buttons */
.btn {
  display: inline-block;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--primary-accent);
  padding: 12px 30px;
  font-family: inherit;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(192, 57, 43, 0.2), transparent);
  transition: 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  background: var(--primary-accent);
  box-shadow: var(--glow-shadow);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  border-color: var(--text-muted);
}

.btn-secondary:hover {
  background: var(--text-muted);
  border-color: var(--text-muted);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

/* How It Works Section */
.features {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 2;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background: rgba(13, 13, 13, 0.55);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.feature-card:hover {
  border-color: var(--primary-accent);
  box-shadow: 0 5px 20px rgba(192, 57, 43, 0.05);
  transform: translateY(-5px);
}

.feature-num {
  font-size: 3rem;
  font-weight: bold;
  color: rgba(192, 57, 43, 0.15);
  position: absolute;
  top: 15px;
  right: 20px;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

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

/* Games Lobby Section */
.lobby {
  padding: 5rem 0;
  position: relative;
  z-index: 2;
}

.lobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  margin-top: 3rem;
}

.game-card {
  background: rgba(13, 13, 13, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
              border-color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
              box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.game-card:hover {
  transform: translateY(-4px) scale(1.02);
}

/* Individual Custom Theme Glows */
.game-card.theme-deadzone:hover {
  border-color: #c0392b;
  box-shadow: 0 0 25px rgba(192, 57, 43, 0.65);
}
.game-card.theme-ninja:hover {
  border-color: #2ecc71;
  box-shadow: 0 0 25px rgba(46, 204, 113, 0.65);
}
.game-card.theme-mouth:hover {
  border-color: #ff8c00;
  box-shadow: 0 0 25px rgba(255, 140, 0, 0.65);
}
.game-card.theme-snake:hover {
  border-color: #00ff88;
  box-shadow: 0 0 25px rgba(0, 255, 136, 0.65);
}
.game-card.theme-breaker:hover {
  border-color: #00e5ff;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.65);
}
.game-card.theme-pong:hover {
  border-color: #ff00cc;
  box-shadow: 0 0 25px rgba(255, 0, 204, 0.65);
}
.game-card.theme-laser:hover {
  border-color: #00e5ff;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.65);
}
.game-card.theme-keepy:hover {
  border-color: #ff00ff;
  box-shadow: 0 0 25px rgba(255, 0, 255, 0.65);
}
.game-card.theme-strike:hover {
  border-color: #ffd700;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.65);
}
.game-card.theme-doors:hover {
  border-color: #ff3300;
  box-shadow: 0 0 25px rgba(255, 51, 0, 0.65);
}
.game-card.theme-shadow:hover {
  border-color: #ff5500;
  box-shadow: 0 0 25px rgba(255, 85, 0, 0.65);
}
.game-card.theme-skribbl:hover {
  border-color: #ff00cc;
  box-shadow: 0 0 25px rgba(255, 0, 204, 0.65);
}
.game-card.theme-charades:hover {
  border-color: #9d00ff;
  box-shadow: 0 0 25px rgba(157, 0, 255, 0.65);
}
.game-card.theme-saber:hover {
  border-color: #ff007f;
  box-shadow: 0 0 25px rgba(255, 0, 127, 0.65);
}
.game-card.theme-scream:hover {
  border-color: #ff0055;
  box-shadow: 0 0 25px rgba(255, 0, 85, 0.65);
}
.game-card.theme-surfer:hover {
  border-color: #ff0055;
  box-shadow: 0 0 25px rgba(255, 0, 85, 0.65);
}
.game-card.theme-luffy:hover {
  border-color: #ff3b30;
  box-shadow: 0 0 25px rgba(255, 59, 48, 0.65);
}


.game-preview {
  height: 180px;
  background: #0d0d0d;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.game-card.coming-soon .game-preview {
  opacity: 0.5;
}

.game-cover-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), filter 0.5s ease;
  filter: brightness(0.85) contrast(1.05);
}

.game-card:hover .game-cover-art {
  transform: scale(1.08);
  filter: brightness(1) contrast(1.1);
}

.game-glass-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(8, 8, 8, 0.2) 0%, transparent 55%, rgba(13, 13, 13, 0.95) 100%);
  pointer-events: none;
  z-index: 2;
}

.game-icon {
  font-size: 3rem;
  color: var(--primary-accent);
}

.badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(13, 13, 13, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 0.7rem;
  padding: 4px 10px;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 2.2px;
  border-radius: 4px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 3;
}

.badge.coming-soon {
  background: #333;
  color: #888;
  border-color: transparent;
}

.game-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.game-content h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
}

.game-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--primary-accent);
  margin-bottom: 12px;
  font-weight: bold;
}

.game-content p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.game-card .btn {
  width: 100%;
  text-align: center;
}

.game-card.coming-soon {
  opacity: 0.7;
}

.game-card.coming-soon:hover {
  border-color: var(--border-color);
  box-shadow: none;
  transform: none;
}

.game-card.coming-soon .btn {
  border-color: #333;
  color: #555;
  cursor: not-allowed;
}

.game-card.coming-soon .btn:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  background-color: rgba(13, 13, 13, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 3rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  position: relative;
  z-index: 2;
}

footer p {
  margin-bottom: 0.5rem;
}

/* Keyframes */
@keyframes pulse {
  0% {
    text-shadow: 0 0 10px rgba(192, 57, 43, 0.4);
  }
  100% {
    text-shadow: 0 0 25px rgba(231, 76, 60, 0.85);
  }
}

/* --- Authentication & Profile Modals (Glassmorphism) --- */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(2, 2, 2, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.modal-content.glass-modal {
  background: rgba(13, 13, 13, 0.85);
  border: 1px solid rgba(192, 57, 43, 0.3);
  box-shadow: 0 0 25px rgba(192, 57, 43, 0.15);
  border-radius: 12px;
  width: 90%;
  max-width: 440px;
  padding: 2.5rem;
  position: relative;
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  color: var(--text-primary);
  max-height: 90dvh;
  overflow-y: auto;
  scrollbar-width: thin;
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.modal-close-btn:hover {
  color: var(--secondary-accent);
  text-shadow: 0 0 5px var(--secondary-accent);
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  gap: 10px;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px;
  font-family: inherit;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-accent);
  transition: width 0.3s ease;
}

.tab-btn.active {
  color: var(--text-primary);
  text-shadow: 0 0 5px var(--secondary-accent);
}

.tab-btn.active::after {
  width: 100%;
}

.auth-form h3 {
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  letter-spacing: 3px;
  text-align: center;
}

.input-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.input-group label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.input-group input {
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-color: var(--secondary-accent);
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.4);
  background: rgba(28, 28, 28, 0.9);
}

.btn-block {
  width: 100%;
  text-align: center;
  margin-top: 0.5rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
  padding: 0 10px;
}

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-color: rgba(255, 255, 255, 0.15);
  background: transparent;
  color: var(--text-primary);
}

.google-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--text-primary);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.google-icon {
  flex-shrink: 0;
}

.auth-error {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid rgba(231, 76, 60, 0.3);
  padding: 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  margin-top: 1.5rem;
  text-align: center;
  word-break: break-word;
}

/* User profile nav bar widget */
.user-profile-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
  padding: 6px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--surface-color);
  transition: all 0.3s ease;
}

.user-profile-nav:hover {
  border-color: var(--secondary-accent);
  box-shadow: var(--glow-shadow);
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-accent);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.user-name-display {
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.logout-nav-btn {
  background: transparent;
  border: none;
  color: var(--primary-accent);
  font-family: inherit;
  font-size: 0.8rem;
  text-transform: uppercase;
  cursor: pointer;
  padding: 2px 4px;
  margin-left: 5px;
  transition: all 0.2s ease;
}

.logout-nav-btn:hover {
  color: var(--secondary-accent);
  text-shadow: 0 0 5px var(--secondary-accent);
}

/* --- Dashboard Modal --- */
.dashboard-modal-content {
  max-width: 850px !important;
  width: 95% !important;
}

.dashboard-header {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.dashboard-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--secondary-accent) 0%, var(--primary-accent) 100%);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  box-shadow: 0 0 15px rgba(192, 57, 43, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.dashboard-user-details h3 {
  font-size: 1.5rem;
  letter-spacing: 2px;
  margin: 0;
}

.dashboard-email-txt {
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 1px;
  margin: 0;
  text-transform: none;
}

.dashboard-body {
  display: flex;
  gap: 30px;
  margin-bottom: 1.5rem;
}

.dashboard-section {
  background: rgba(5, 5, 5, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 1.5rem;
}

.stats-section {
  flex: 4;
}

.achievements-section {
  flex: 6;
}

.section-subtitle {
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-bottom: 1.2rem;
  border-left: 2px solid var(--primary-accent);
  padding-left: 10px;
  text-transform: uppercase;
}

/* Stats list style */
.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 5px;
}

.stat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(30, 30, 30, 0.9);
}

.stat-game-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-game-icon {
  font-size: 1.3rem;
}

.stat-game-name {
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.stat-game-score {
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 1px;
  font-family: monospace;
}

.stat-loading, .achievements-loading {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 2rem 0;
  text-transform: none;
}

/* Achievements Grid */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 5px;
}

.achievement-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 8px;
  background: rgba(20, 20, 20, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.achievement-card.locked {
  opacity: 0.3;
}

.achievement-card.locked .achievement-badge-icon {
  filter: grayscale(100%);
}

.achievement-card.unlocked {
  background: rgba(13, 13, 13, 0.9);
  cursor: pointer;
}

.achievement-card.unlocked:hover {
  transform: translateY(-4px);
}

.achievement-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

/* Dynamic glow borders/shadows for unlocked achievements */
.achievement-card.unlocked[data-color] {
  border-color: var(--badge-color);
  box-shadow: 0 0 10px var(--badge-glow-color);
}
.achievement-card.unlocked[data-color] .achievement-badge-icon {
  border-color: var(--badge-color);
  box-shadow: 0 0 8px var(--badge-glow-color);
}

.achievement-title {
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.achievement-desc {
  font-size: 0.6rem;
  color: var(--text-muted);
  line-height: 1.2;
  text-transform: none;
}

/* Tooltip on hover for achievements */
.achievement-card::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.55rem;
  width: 90%;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  text-transform: none;
  border: 1px solid rgba(255,255,255,0.05);
}

.achievement-card.unlocked:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dashboard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}

.sync-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: none;
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  box-shadow: 0 0 8px var(--success);
  animation: syncPulse 2s infinite alternate;
}

@keyframes syncPulse {
  0% { opacity: 0.4; }
  100% { opacity: 1; box-shadow: 0 0 12px var(--success); }
}

/* Responsive Overrides */
@media (max-width: 768px) {
  header {
    padding: 1rem 0 !important;
  }
  header .container {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: center !important;
    text-align: center !important;
  }
  .logo {
    font-size: 1.25rem !important;
    letter-spacing: 2px !important;
  }
  nav ul {
    gap: 15px !important;
    padding: 0 !important;
    margin: 5px 0 0 0 !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
  nav a {
    font-size: 0.75rem !important;
    letter-spacing: 1px !important;
  }
  
  .hero {
    min-height: 50vh !important;
    padding: 3rem 1rem !important;
  }
  .hero h1 {
    font-size: 2.2rem !important;
    letter-spacing: 3px !important;
  }
  .hero p {
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
  }
  
  .section-title {
    font-size: 1.6rem !important;
    margin-bottom: 2rem !important;
  }
  
  .features, .lobby {
    padding: 2.5rem 0 !important;
  }

  .dashboard-body {
    flex-direction: column;
    gap: 20px;
  }
  .dashboard-modal-content {
    padding: 1.5rem !important;
    max-height: 90vh;
    overflow-y: auto;
  }
  .stats-grid, .achievements-grid {
    max-height: 240px;
  }
}

/* Brand Mascot Logo Styles */
.logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(231, 76, 60, 0.7));
  animation: floatLogoMini 3s ease-in-out infinite;
}

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

/* Landscape and Small Screen Height Tweaks */
@media (max-height: 550px) {
  header {
    padding: 0.5rem 0 !important;
  }
  header.scrolled {
    padding: 0.4rem 0 !important;
  }
  header nav {
    max-height: 50px !important;
  }
  .hero {
    min-height: 60vh !important;
    padding: 2rem 1rem !important;
  }
  .hero h1 {
    font-size: 2rem !important;
    letter-spacing: 4px !important;
  }
  .hero p {
    font-size: 0.9rem !important;
    margin-bottom: 1.5rem !important;
  }
  .features, .lobby {
    padding: 2rem 0 !important;
  }
  .section-title {
    margin-bottom: 2rem !important;
    font-size: 1.5rem !important;
  }
  .features-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  .feature-card {
    padding: 1.5rem !important;
  }
  .lobby-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 15px !important;
  }
  .game-card {
    border-radius: 6px !important;
  }
  .game-preview {
    height: 120px !important;
  }
  .game-content {
    padding: 1rem !important;
  }
  .game-content h3 {
    font-size: 1.05rem !important;
  }
  .game-content p {
    font-size: 0.8rem !important;
    margin-bottom: 1rem !important;
  }
  .dashboard-modal-content {
    padding: 1rem !important;
    max-height: 95vh !important;
  }
  .dashboard-header {
    padding-bottom: 1rem !important;
    margin-bottom: 1rem !important;
    gap: 15px !important;
  }
  .dashboard-avatar {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.5rem !important;
  }
  .dashboard-user-details h3 {
    font-size: 1.2rem !important;
  }
  .dashboard-body {
    flex-direction: column !important;
    gap: 15px !important;
    margin-bottom: 1rem !important;
  }
  .dashboard-section {
    padding: 1rem !important;
  }
  .stats-grid, .achievements-grid {
    max-height: 160px !important;
  }
  .achievements-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  nav ul {
    gap: 10px !important;
  }
  nav a {
    font-size: 0.7rem !important;
    padding: 4px 8px !important;
  }
  .user-profile-nav {
    padding: 4px 8px !important;
    gap: 6px !important;
  }
  .user-avatar {
    width: 20px !important;
    height: 20px !important;
    font-size: 0.7rem !important;
  }
  .user-name-display {
    font-size: 0.75rem !important;
  }
}

/* Lock Overlay styles */
.lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 8, 8, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.game-card.coming-soon .lock-overlay {
  opacity: 1;
  pointer-events: auto;
}

.lock-icon {
  font-size: 2.8rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-card.coming-soon:hover .lock-icon {
  transform: scale(1.18) rotate(-8deg);
}

.lock-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* Developer Unlock Panel Styles */
.developer-panel {
  padding: 4rem 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at bottom, rgba(192, 57, 43, 0.05) 0%, transparent 70%);
}

.dev-card {
  max-width: 600px;
  margin: 0 auto;
  padding: 2.5rem;
  text-align: center;
  border-radius: 12px;
  background: rgba(13, 13, 13, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.dev-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(192, 57, 43, 0.5), transparent);
}

.dev-card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 3px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  color: #eee;
}

.dev-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.dev-input-group {
  display: flex;
  gap: 12px;
  max-width: 450px;
  margin: 0 auto;
}

.dev-input-group input {
  flex-grow: 1;
  background: rgba(5, 5, 5, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 18px;
  border-radius: 6px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dev-input-group input:focus {
  outline: none;
  border-color: rgba(192, 57, 43, 0.5);
  box-shadow: 0 0 10px rgba(192, 57, 43, 0.2);
}

.dev-input-group .btn {
  background: transparent;
  border: 1px solid rgba(192, 57, 43, 0.5);
  color: #e74c3c;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.dev-input-group .btn:hover {
  background: #e74c3c;
  color: #fff;
  box-shadow: 0 0 15px rgba(231, 76, 60, 0.4);
}

.dev-msg {
  margin-top: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  min-height: 20px;
  transition: all 0.3s ease;
}

.dev-msg.success {
  color: #2ecc71;
  text-shadow: 0 0 8px rgba(46, 204, 113, 0.3);
}

.dev-msg.error {
  color: #e74c3c;
  text-shadow: 0 0 8px rgba(231, 76, 60, 0.3);
}

.game-card.coming-soon.shake {
  animation: lock-shake 0.4s ease-in-out;
}

@keyframes lock-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Active developer mode overrides */
.dev-active-banner {
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid #2ecc71;
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.dev-active-banner span {
  color: #2ecc71;
  font-weight: bold;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 1px;
}



