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

body {
  font-family: 'Special Elite', cursive;
  background: linear-gradient(135deg, #1a1209 0%, #2d1f14 50%, #1a1209 100%);
  min-height: 100vh;
  color: #d4a574;
  overflow: hidden;
}

/* Scanlines overlay */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.1) 0px,
    rgba(0, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 2px
  );
}

/* Vignette effect */
.vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

/* Splash Screen */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  background: #0d0907;
}

#splash-screen.hidden {
  display: none !important;
}

.splash-content {
  text-align: center;
  animation: fadeIn 1s ease-out;
  position: relative;
}

.film-flicker {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 250, 220, 0.02);
  animation: flicker 0.1s infinite;
  pointer-events: none;
}

@keyframes flicker {
  0%, 100% { opacity: 0.02; }
  50% { opacity: 0.05; }
}

.splash-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 900;
  color: #d4a574;
  text-shadow: 
    4px 4px 0 #8b4513,
    8px 8px 20px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.1em;
  animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from { text-shadow: 4px 4px 0 #8b4513, 8px 8px 20px rgba(0, 0, 0, 0.8); }
  to { text-shadow: 4px 4px 0 #8b4513, 8px 8px 30px rgba(212, 165, 116, 0.3); }
}

.splash-subtitle {
  font-size: clamp(1rem, 4vw, 1.5rem);
  color: #8b7355;
  margin: 1rem 0 2rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

/* CRITICAL: Start button styles with enhanced visibility and clickability */
.start-button,
#start-btn {
  font-family: 'Special Elite', cursive;
  font-size: 1.4rem;
  padding: 1.2rem 2.5rem;
  background: linear-gradient(180deg, #8b4513 0%, #5c2d0e 100%);
  border: 4px solid #d4a574;
  color: #d4a574;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 69, 19, 0.3);
  position: relative;
  z-index: 200;
  display: inline-block;
  min-width: 280px;
  min-height: 60px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.start-button:hover,
#start-btn:hover {
  background: linear-gradient(180deg, #a0522d 0%, #8b4513 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 40px rgba(212, 165, 116, 0.4);
  border-color: #ffd700;
  color: #ffd700;
}

.start-button:active,
#start-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#new-game-btn, #restart-btn {
  font-family: 'Special Elite', cursive;
  font-size: 1.2rem;
  padding: 1rem 2rem;
  background: linear-gradient(180deg, #8b4513 0%, #5c2d0e 100%);
  border: 3px solid #d4a574;
  color: #d4a574;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#new-game-btn:hover, #restart-btn:hover {
  background: linear-gradient(180deg, #a0522d 0%, #8b4513 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

/* Game Container */
#game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
}

#game-container.hidden {
  display: none !important;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 500px;
}

.game-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 8vw, 3rem);
  font-weight: 900;
  color: #d4a574;
  text-shadow: 3px 3px 0 #8b4513;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.stats-container {
  display: flex;
  justify-content: space-around;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.stat-box {
  background: linear-gradient(180deg, #2d1f14 0%, #1a1209 100%);
  border: 2px solid #5c3d2e;
  padding: 0.5rem 1rem;
  min-width: 100px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  color: #8b7355;
  letter-spacing: 0.2em;
}

.stat-value {
  display: block;
  font-size: 1.3rem;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Canvas Container */
main {
  position: relative;
}

#canvas-container {
  position: relative;
  border: 4px solid #5c3d2e;
  box-shadow: 
    0 0 20px rgba(0, 0, 0, 0.8),
    inset 0 0 30px rgba(0, 0, 0, 0.5);
  background: #2d1f14;
}

#canvas {
  display: block;
}

#smoke-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.3;
}

#message-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 
    2px 2px 0 #8b4513,
    0 0 20px rgba(255, 215, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}

#message-display.show {
  opacity: 1;
  animation: messagePopup 0.3s ease-out;
}

@keyframes messagePopup {
  0% { transform: translate(-50%, -50%) scale(0.5); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Footer */
footer {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.speakeasy-card {
  font-family: 'Special Elite', cursive;
  color: #8b7355;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid #5c3d2e;
  background: rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.speakeasy-card:hover {
  color: #d4a574;
  border-color: #d4a574;
}

/* Game Over Screen */
#game-over-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
  z-index: 200;
}

#game-over-screen.hidden {
  display: none !important;
}

.newspaper {
  background: #f5e6c8;
  padding: 2rem;
  max-width: 90%;
  width: 400px;
  text-align: center;
  transform: rotate(-2deg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.newspaper-header {
  font-family: 'Playfair Display', serif;
  font-size: 0.8rem;
  color: #333;
  border-bottom: 2px solid #333;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  letter-spacing: 0.3em;
}

.headline {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: #1a1a1a;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.subheadline {
  font-family: 'Special Elite', cursive;
  font-size: 1rem;
  color: #444;
  margin-bottom: 1.5rem;
}

.final-score {
  font-family: 'Special Elite', cursive;
  font-size: 1.5rem;
  color: #1a1a1a;
  margin-bottom: 1.5rem;
}

.final-score span:last-child {
  display: block;
  font-size: 2.5rem;
  color: #8b0000;
}

#restart-btn {
  background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
  border-color: #333;
  color: #f5e6c8;
}

#restart-btn:hover {
  background: linear-gradient(180deg, #444 0%, #333 100%);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 500px) {
  .stat-box {
    min-width: 80px;
    padding: 0.3rem 0.5rem;
  }
  
  .stat-value {
    font-size: 1rem;
  }
  
  #message-display {
    font-size: 1.5rem;
  }
  
  .start-button,
  #start-btn {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    min-width: 240px;
  }
}