/* Root Variables */
:root {
  --bg1: 270deg;
  --accent: 165;
  --glow: 0 0 32px hsla(var(--accent), 100%, 60%, .35), 0 0 80px hsla(var(--accent), 100%, 60%, .2);
  --primary-gradient: linear-gradient(135deg, #00d4ff, #ff00aa, #ffaa00, #00ff88);
  --text-shadow-glow: 0 0 30px rgba(255,255,255,0.8), 0 0 60px rgba(0,255,255,0.6), 0 0 90px rgba(255,0,255,0.4);
}

/* Base Styles */
* { 
  box-sizing: border-box; 
}

html, body { 
  height: 100%; 
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  background: #0b0c10;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Navigation Styles */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 12, 16, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 2rem;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #00ffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: #00ffff;
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.nav-link.active {
  color: #00ffff;
  background: rgba(0, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

/* Background Effects */
.veil {
  position: fixed; 
  inset: 0;
  background: radial-gradient(120vmax 120vmax at 10% 10%, hsla(200,70%,60%,.10), transparent 60%),
              radial-gradient(120vmax 120vmax at 90% 20%, hsla(320,70%,60%,.10), transparent 60%),
              radial-gradient(120vmax 120vmax at 50% 90%, hsla(40,90%,60%,.10), transparent 60%);
  pointer-events: none;
  mix-blend-mode: screen;
  filter: blur(20px) saturate(120%);
  animation: drift 16s ease-in-out infinite alternate;
}

@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(0,-2%,0) scale(1.02); }
}

canvas#bg { 
  position: fixed; 
  inset: 0; 
  z-index: -2; 
  background: #05060a; 
}

.veil { 
  z-index: -1; 
}

/* Damage Effects */
.damage-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: radial-gradient(circle, rgba(255, 0, 0, 0.4), rgba(255, 0, 0, 0.1));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s ease-out;
}

.damage-overlay.active {
  animation: damageFlash 0.6s ease-out;
}

@keyframes damageFlash {
  0% {
    opacity: 0;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.6), rgba(255, 0, 0, 0.2));
  }
  15% {
    opacity: 1;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.8), rgba(255, 0, 0, 0.3));
  }
  30% {
    opacity: 0.7;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.6), rgba(255, 0, 0, 0.2));
  }
  50% {
    opacity: 0.9;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.7), rgba(255, 0, 0, 0.25));
  }
  70% {
    opacity: 0.4;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.4), rgba(255, 0, 0, 0.1));
  }
  100% {
    opacity: 0;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.2), rgba(255, 0, 0, 0.05));
  }
}

/* Modern Title Box */
.title-box {
  position: relative;
  margin: 8rem auto 2rem;
  text-align: center;
  padding: 2.5rem 4rem;
  border-radius: 32px;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 
    0 0 40px rgba(0,255,255,0.3), 
    0 0 80px rgba(255,0,255,0.2), 
    0 0 120px rgba(255,255,0,0.1),
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -1px 0 rgba(0,0,0,0.2);
  backdrop-filter: blur(20px) saturate(180%);
  overflow: hidden;
  animation: pulseBox 6s ease-in-out infinite;
  transform-style: preserve-3d;
}

.title-box::before {
  content: "";
  position: absolute;
  inset: -4px;
  background: conic-gradient(from 0deg, #00ffff, #ff00ff, #ffff00, #00ff88, #ff4444, #00ffff);
  filter: blur(12px);
  opacity: 0.6;
  z-index: -1;
  animation: spinGlow 8s linear infinite;
  border-radius: inherit;
}

.title-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: 
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.15), transparent 50%), 
    radial-gradient(circle at 80% 80%, rgba(0,255,255,0.1), transparent 50%),
    linear-gradient(135deg, rgba(255,255,255,0.05), transparent 50%, rgba(255,0,255,0.05));
  mix-blend-mode: overlay;
  animation: shimmer 4s ease-in-out infinite alternate;
}

@keyframes pulseBox {
  0%, 100% { 
    transform: scale(1) rotateX(0deg); 
    box-shadow: 
      0 0 40px rgba(0,255,255,0.3), 
      0 0 80px rgba(255,0,255,0.2), 
      0 0 120px rgba(255,255,0,0.1);
  }
  50% { 
    transform: scale(1.03) rotateX(2deg); 
    box-shadow: 
      0 0 60px rgba(0,255,255,0.5), 
      0 0 120px rgba(255,0,255,0.4), 
      0 0 180px rgba(255,255,0,0.2);
  }
}

@keyframes spinGlow { 
  to { transform: rotate(360deg); } 
}

@keyframes shimmer {
  0% { opacity: 0.3; transform: translateX(-10px); }
  100% { opacity: 0.9; transform: translateX(10px); }
}

/* Modern Typography for Title */
.title-box h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  background: var(--primary-gradient);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: var(--text-shadow-glow);
  animation: gradientShift 8s ease-in-out infinite, textFloat 6s ease-in-out infinite alternate;
  position: relative;
  z-index: 1;
}

.title-box h1::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(0,255,255,0.7));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  z-index: -1;
  filter: blur(2px);
  opacity: 0.5;
}

@keyframes gradientShift {
  0%, 100% { 
    background-position: 0% 50%; 
    filter: hue-rotate(0deg) brightness(1.2);
  }
  25% { 
    background-position: 100% 50%; 
    filter: hue-rotate(90deg) brightness(1.4);
  }
  50% { 
    background-position: 50% 100%; 
    filter: hue-rotate(180deg) brightness(1.1);
  }
  75% { 
    background-position: 0% 100%; 
    filter: hue-rotate(270deg) brightness(1.3);
  }
}

@keyframes textFloat {
  0% { transform: translateY(0px) scale(1); }
  100% { transform: translateY(-8px) scale(1.01); }
}

/* Content Styles */
.content {
  max-width: 900px;
  margin: 6rem auto;
  padding: 2rem;
  line-height: 1.6;
  background: rgba(255,255,255,0.05);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 30px rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
}

h2, h3 {
  color: #90e0ef;
  margin-top: 1.5em;
}

strong { 
  color: #f07167; 
}

/* Image with Cross Effect */
.image-x-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
}

.image-x {
  position: relative;
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

.image-x img {
  display: block;
  width: 200px;
  height: auto;
  border-radius: 12px;
}

.image-x .cross {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.image-x .cross::before,
.image-x .cross::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 5px;
  background: rgba(255, 0, 0, 0.85);
  transform-origin: center;
  border-radius: 4px;
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.7);
}

.image-x .cross::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.image-x .cross::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Bottom Gallery */
.bottom-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 3rem 0;
}

.img-pair {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.img-pair img {
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 0 20px rgba(0,255,255,0.2);
}

.small-img {
  width: 320px;
}

.large-img {
  width: 500px;
}

.caption {
  text-align: center;
  font-size: 1.1rem;
  color: #ff6b6b;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(255,0,0,0.4);
}

/* Simple Vertical Layout */
.game-container {
  max-width: 1000px;
  margin: 8rem auto 2rem;
  padding: 2rem;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

.leaderboard-section {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 2rem;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.leaderboard-container {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 1.5rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  min-height: 400px;
}

.leaderboard-title {
  text-align: center;
  color: #00ffff;
  margin-bottom: 1rem;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.refresh-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.refresh-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #00ffff;
  color: #00ffff;
}

/* User Authentication Styles */
.user-section {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.discord-login-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #5865f2;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.discord-login-btn:hover {
  background: #4752c4;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.discord-login-btn svg {
  width: 20px;
  height: 20px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.user-name {
  color: #00ffff;
  font-weight: 600;
  font-size: 0.9rem;
}

.logout-btn {
  background: rgba(255, 68, 68, 0.2);
  color: #ff4444;
  border: 1px solid rgba(255, 68, 68, 0.3);
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: rgba(255, 68, 68, 0.3);
  border-color: rgba(255, 68, 68, 0.5);
}

.login-required {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-required p {
  margin-bottom: 1rem;
  color: #90e0ef;
}

.authenticated-submission {
  text-align: center;
  padding: 1rem;
}

.authenticated-submission p {
  margin-bottom: 1rem;
  color: #00ff88;
  font-weight: 600;
}

/* Leaderboard Avatar Styles */
.user-avatar-small {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.leaderboard-entry .name {
  display: flex;
  align-items: center;
}

.name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-header {
  margin-bottom: 3rem;
}

.game-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  margin: 0 0 1rem 0;
  background: linear-gradient(135deg, #ff4444, #ff8800, #ffff00);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(255, 68, 68, 0.8);
  animation: gradientShift 4s ease-in-out infinite;
}

.game-subtitle {
  font-size: 1.2rem;
  color: #90e0ef;
  margin-bottom: 2rem;
  text-shadow: 0 0 10px rgba(144, 224, 239, 0.5);
}

.game-stats {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 4vw, 3rem);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  background: rgba(255, 255, 255, 0.1);
  padding: clamp(0.8rem, 2vw, 1rem) clamp(1.2rem, 4vw, 2rem);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
  min-width: clamp(80px, 20vw, 120px);
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #00ffff;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.start-btn {
  background: linear-gradient(135deg, #00ff88, #00ffff);
  border: none;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #000;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 30px rgba(0, 255, 136, 0.6);
}

.start-btn:active {
  transform: translateY(0);
}

/* Difficulty Selection */
.difficulty-selection {
  margin: 2rem 0;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.difficulty-title {
  font-size: 1.5rem;
  color: #90e0ef;
  margin-bottom: 1.5rem;
  text-align: center;
  text-shadow: 0 0 10px rgba(144, 224, 239, 0.5);
}

.difficulty-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.difficulty-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 1.5rem 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  color: #fff;
  text-align: center;
  min-width: 160px;
  position: relative;
  overflow: hidden;
}

.difficulty-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 5px 20px rgba(0, 255, 255, 0.3);
}

.difficulty-btn.selected {
  background: rgba(0, 255, 255, 0.2);
  border-color: #00ffff;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.5);
}

.difficulty-btn.selected::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmerEffect 2s infinite;
}

.difficulty-name {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #00ffff;
}

.difficulty-desc {
  display: block;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

/* Difficulty-specific styling */
.difficulty-btn[data-difficulty="wellDone"] .difficulty-name {
  color: #00ff88;
}

.difficulty-btn[data-difficulty="wellDone"].selected {
  background: rgba(0, 255, 136, 0.2);
  border-color: #00ff88;
  box-shadow: 0 0 25px rgba(0, 255, 136, 0.5);
}

.difficulty-btn[data-difficulty="mediumRare"] .difficulty-name {
  color: #ffaa00;
}

.difficulty-btn[data-difficulty="mediumRare"].selected {
  background: rgba(255, 170, 0, 0.2);
  border-color: #ffaa00;
  box-shadow: 0 0 25px rgba(255, 170, 0, 0.5);
}

.difficulty-btn[data-difficulty="raw"] .difficulty-name {
  color: #ff4444;
}

.difficulty-btn[data-difficulty="raw"].selected {
  background: rgba(255, 68, 68, 0.2);
  border-color: #ff4444;
  box-shadow: 0 0 25px rgba(255, 68, 68, 0.5);
}

@keyframes shimmerEffect {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Game Area Container */
.game-area {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  isolation: isolate;
  z-index: 10;
}

/* Game Board */
.game-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 4vw, 2rem);
  max-width: 100%;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2rem);
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

/* Hammer Animation */
.hammer {
  position: absolute;
  font-size: clamp(2rem, 6vw, 3rem);
  z-index: 1000;
  display: none;
  transform-origin: bottom center;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(255, 255, 0, 0.8));
  width: clamp(32px, 8vw, 48px);
  height: clamp(32px, 8vw, 48px);
  line-height: clamp(32px, 8vw, 48px);
  text-align: center;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  top: 0;
  left: 0;
}

.hammer.swinging {
  animation: hammerSwing 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes hammerSwing {
  0% {
    transform: translateY(0) rotate(-45deg) scale(1.2);
    opacity: 0.9;
    filter: drop-shadow(0 0 10px rgba(255, 255, 0, 0.8));
  }
  15% {
    transform: translateY(20px) rotate(-30deg) scale(1.15);
    opacity: 1;
    filter: drop-shadow(0 0 15px rgba(255, 255, 0, 0.9));
  }
  40% {
    transform: translateY(60px) rotate(-10deg) scale(1.05);
    opacity: 1;
    filter: drop-shadow(0 0 20px rgba(255, 255, 0, 1));
  }
  70% {
    transform: translateY(100px) rotate(10deg) scale(1);
    opacity: 1;
    filter: drop-shadow(0 0 25px rgba(255, 255, 0, 1.2));
  }
  85% {
    transform: translateY(120px) rotate(20deg) scale(0.95);
    opacity: 0.9;
    filter: drop-shadow(0 0 30px rgba(255, 255, 0, 1.5));
  }
  100% {
    transform: translateY(130px) rotate(25deg) scale(0.9);
    opacity: 0.8;
    filter: drop-shadow(0 0 20px rgba(255, 255, 0, 1));
  }
}

.hole {
  position: relative;
  width: clamp(80px, 20vw, 120px);
  height: clamp(80px, 20vw, 120px);
  margin: 0 auto;
  background: radial-gradient(circle, #2a2a2a, #1a1a1a);
  border-radius: 50%;
  border: clamp(2px, 0.5vw, 4px) solid #444;
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.8),
    0 0 15px rgba(0, 255, 255, 0.2);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  touch-action: manipulation;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.hole.escape-highlight {
  animation: escapeHighlight 1s ease-out;
}

@keyframes escapeHighlight {
  0% {
    border-color: #ff0000;
    box-shadow: 
      inset 0 0 20px rgba(0, 0, 0, 0.8),
      0 0 30px rgba(255, 0, 0, 0.8),
      0 0 60px rgba(255, 0, 0, 0.6);
    transform: scale(1.1);
  }
  25% {
    border-color: #ff4444;
    box-shadow: 
      inset 0 0 20px rgba(0, 0, 0, 0.8),
      0 0 40px rgba(255, 0, 0, 1),
      0 0 80px rgba(255, 0, 0, 0.8);
    transform: scale(1.15);
  }
  50% {
    border-color: #ff6666;
    box-shadow: 
      inset 0 0 20px rgba(0, 0, 0, 0.8),
      0 0 35px rgba(255, 0, 0, 0.9),
      0 0 70px rgba(255, 0, 0, 0.7);
    transform: scale(1.1);
  }
  75% {
    border-color: #ff8888;
    box-shadow: 
      inset 0 0 20px rgba(0, 0, 0, 0.8),
      0 0 25px rgba(255, 0, 0, 0.6),
      0 0 50px rgba(255, 0, 0, 0.4);
    transform: scale(1.05);
  }
  100% {
    border-color: #444;
    box-shadow: 
      inset 0 0 20px rgba(0, 0, 0, 0.8),
      0 0 15px rgba(0, 255, 255, 0.2);
    transform: scale(1);
  }
}

.cull {
  position: absolute;
  bottom: -80px;
  left: 50%;
  transform: translateX(-50%);
  transition: bottom 0.3s ease-out;
  z-index: 1;
}

.cull.active {
  bottom: -20px;
  animation: bobUp 0.3s ease-out;
}

.cull.hit {
  animation: hitAnimation 0.3s ease-out;
}

.cull-head {
  width: clamp(50px, 15vw, 80px);
  height: clamp(50px, 15vw, 80px);
  image-rendering: pixelated;
  filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.5));
  transition: all 0.1s ease;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.cull:hover .cull-head {
  transform: scale(1.1);
  filter: drop-shadow(0 0 15px rgba(255, 0, 0, 0.8));
}

.hit-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 255, 0, 0.8), transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
  z-index: 2;
}

.hit-effect.active {
  animation: hitExplosion 0.3s ease-out;
}

.score-popup {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffff00;
  font-weight: 700;
  font-size: 1.2rem;
  text-shadow: 0 0 10px rgba(255, 255, 0, 0.8);
  animation: scoreFloat 1s ease-out forwards;
  pointer-events: none;
  z-index: 3;
}

/* Game Over Screen */
.game-over {
  display: none;
  background: rgba(0, 0, 0, 0.9);
  padding: 3rem;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(20px);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  margin-top: 2rem;
}

.game-over-title {
  font-size: 2.5rem;
  color: #ff4444;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(255, 68, 68, 0.8);
}

.final-score {
  font-size: 1.5rem;
  color: #00ffff;
  margin-bottom: 1rem;
}

.game-over-message {
  font-size: 1.1rem;
  color: #90e0ef;
  margin-bottom: 2rem;
}

/* Leaderboard Styles */
.score-submission {
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.score-submission h3 {
  color: #00ffff;
  margin-bottom: 1rem;
}

.score-submission input {
  width: 100%;
  max-width: 300px;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1rem;
  text-align: center;
}

.score-submission input:focus {
  outline: none;
  border-color: #00ffff;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.score-submission input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.submission-result {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.start-btn.secondary {
  background: linear-gradient(135deg, #666, #888);
  margin-left: 1rem;
}

.start-btn.secondary:hover {
  background: linear-gradient(135deg, #777, #999);
}

/* Prize Announcement */
.prize-announcement {
  background: linear-gradient(135deg, #ffd700, #ffed4e, #ffd700);
  border: 3px solid #ffb700;
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
  box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
  animation: prizeGlow 2s ease-in-out infinite alternate;
}

.prize-title {
  color: #b8860b;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  font-weight: 900;
  margin: 0 0 1rem 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.prize-tiers {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  flex-wrap: wrap;
}

.prize-tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.8rem;
  border-radius: 10px;
  min-width: 120px;
  transition: transform 0.3s ease;
}

.prize-tier:hover {
  transform: scale(1.05);
}

.prize-tier.first-place {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  border: 2px solid #ffb700;
}

.prize-tier.second-place {
  background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
  border: 2px solid #a0a0a0;
}

.prize-tier.third-place {
  background: linear-gradient(135deg, #cd7f32, #daa520);
  border: 2px solid #b8860b;
}

.prize-position {
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  font-weight: 700;
  color: #333;
  margin-bottom: 0.3rem;
}

.prize-amount {
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  font-weight: 900;
  color: #2c5530;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes prizeGlow {
  0% {
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
  }
  100% {
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.5);
  }
}

/* Mobile responsive for prizes */
@media (max-width: 600px) {
  .prize-tiers {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .prize-tier {
    min-width: auto;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }
  
  .prize-announcement {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
}

/* Leaderboard Modal */
.leaderboard-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.leaderboard-content {
  background: rgba(11, 12, 16, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 2rem;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  backdrop-filter: blur(20px);
  box-shadow: 0 0 50px rgba(0, 255, 255, 0.3);
}

.leaderboard-content h2 {
  text-align: center;
  color: #00ffff;
  margin-bottom: 1.5rem;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

.leaderboard-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.5rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.tab-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.15);
}

.tab-btn.active {
  border-color: #00ffff;
  background: rgba(0, 255, 255, 0.2);
  color: #00ffff;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.leaderboard-list {
  flex: 1;
  overflow-y: auto;
  min-height: 400px;
}

.leaderboard-header {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 1.5fr 1fr;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-bottom: 1rem;
  font-weight: 700;
  color: #00ffff;
  font-size: 0.9rem;
}

.leaderboard-entry {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr 1.5fr 1fr;
  gap: 1rem;
  padding: 0.8rem 1rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.leaderboard-entry:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.leaderboard-entry.top-three {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.3);
}

.leaderboard-entry .rank {
  font-weight: 700;
  color: #ffaa00;
}

.leaderboard-entry .name {
  color: #fff;
  font-weight: 600;
}

.leaderboard-entry .score {
  color: #00ff88;
  font-weight: 700;
}

.leaderboard-entry .difficulty {
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  text-align: center;
}

.leaderboard-entry .difficulty.raw {
  background: rgba(255, 68, 68, 0.3);
  color: #ff4444;
}

.leaderboard-entry .difficulty.mediumRare {
  background: rgba(255, 170, 0, 0.3);
  color: #ffaa00;
}

.leaderboard-entry .difficulty.wellDone {
  background: rgba(0, 255, 136, 0.3);
  color: #00ff88;
}

.leaderboard-entry .survival {
  color: #90e0ef;
}

.loading, .no-scores {
  text-align: center;
  color: #90e0ef;
  padding: 2rem;
  font-size: 1.1rem;
}

/* Animations */
@keyframes bobUp {
  0% { bottom: -80px; }
  100% { bottom: -20px; }
}

@keyframes hitAnimation {
  0% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(0.8) rotate(-10deg); }
  100% { transform: translateX(-50%) scale(1) rotate(0deg); }
}

@keyframes hitExplosion {
  0% { 
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  100% { 
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

@keyframes scoreFloat {
  0% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-50px);
    opacity: 0;
  }
}

/* Desktop Layout - Simple vertical layout, no special rules needed */

/* Mobile Layout */
@media (max-width: 600px) {
  .game-container {
    padding: 1rem;
    margin: 6rem auto 1rem;
  }
  
  .leaderboard-section {
    padding: 0 1rem;
    margin: 1rem auto;
  }
  
  .leaderboard-container {
    max-height: 500px;
  }
  
  .leaderboard-list {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .title-box {
    margin: 6rem auto 1rem;
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 24px;
  }
  
  .title-box h1 {
    font-size: clamp(1.8rem, 6vw, 3rem);
  }
  
  .main-container {
    margin: 6rem auto 1rem;
    padding: clamp(1rem, 3vw, 2rem);
  }
  
  .game-header {
    margin-bottom: clamp(2rem, 5vw, 3rem);
  }
  
  .nav-container {
    padding: 0 1rem;
  }
  
  .difficulty-selection {
    padding: clamp(1rem, 3vw, 2rem);
    margin: clamp(1rem, 3vw, 2rem) 0;
  }
  
  .leaderboard-container {
    padding: 1rem;
  }
  
  .leaderboard-header, .leaderboard-entry {
    grid-template-columns: 0.8fr 1.5fr 0.8fr 1fr 0.8fr;
    gap: 0.5rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 600px) {
  .content { 
    padding: 1rem; 
  }
  
  .title-box {
    padding: clamp(1rem, 3vw, 1.5rem);
    margin: 5rem auto 1rem;
  }
  
  .img-pair {
    flex-direction: column;
    align-items: center;
  }
  
  .small-img, .large-img {
    width: 100%;
    max-width: 400px;
  }
  
  .game-container {
    margin: 5rem auto 1rem;
    padding: 1rem;
  }
  
  .game-stats {
    gap: clamp(0.8rem, 3vw, 1.5rem);
  }
  
  .stat-item {
    padding: clamp(0.6rem, 2vw, 0.8rem) clamp(1rem, 3vw, 1.2rem);
    min-width: clamp(70px, 18vw, 100px);
  }
  
  .difficulty-buttons {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .difficulty-btn {
    width: 100%;
    max-width: 280px;
    min-width: 200px;
  }
  
  .start-btn {
    padding: clamp(0.8rem, 3vw, 1rem) clamp(1.5rem, 4vw, 2rem);
    font-size: clamp(1rem, 3vw, 1.2rem);
  }
  
  .game-over {
    padding: clamp(2rem, 5vw, 3rem);
    margin-top: 1rem;
  }
}
