html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  color: #fff;
  font-family: 'Roboto', 'Open Sans', 'Noto Sans', Arial, sans-serif;
}

/* Fixed background layer */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../img/npk-background.png') no-repeat center center;
  background-size: cover;
  z-index: -1;
}

/* First smoke layer */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../img/smoke.png') no-repeat center top;
  background-size: 100% 200%;
  z-index: 1;
  animation: driftSmoke 80s ease-in-out infinite;
  will-change: transform, background-position;
}

/* Second smoke layer */
.smoke-layer-2 {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../img/smoke2.png') no-repeat center top;
  background-size: 100% 200%;
  z-index: 2;
  animation: driftSmokeSecondary 100s ease-in-out infinite;
  will-change: transform, background-position;
}

/* Smoke animations */
@keyframes driftSmoke {
  0% { background-position: center 0%; transform: scale(1) translateX(0); opacity: 0.6; }
  25% { background-position: center 25%; transform: scale(1.1) translateX(-5px); opacity: 0.5; }
  50% { background-position: center 50%; transform: scale(1.2) translateX(5px); opacity: 0.4; }
  75% { background-position: center 75%; transform: scale(1.3) translateX(-3px); opacity: 0.3; }
  100% { background-position: center 100%; transform: scale(1.4) translateX(0); opacity: 0.1; }
}

@keyframes driftSmokeSecondary {
  0% { background-position: center 0%; transform: scale(1.2) translateX(0); opacity: 0.4; }
  25% { background-position: center 20%; transform: scale(1.3) translateX(5px); opacity: 0.35; }
  50% { background-position: center 40%; transform: scale(1.4) translateX(-5px); opacity: 0.3; }
  75% { background-position: center 60%; transform: scale(1.5) translateX(3px); opacity: 0.2; }
  100% { background-position: center 80%; transform: scale(1.6) translateX(0); opacity: 0.05; }
}

/* Game UI Styling */
.game-ui {
  z-index: 3;
  min-height: 100vh;
  padding: 10px 0;
  box-sizing: border-box;
}

/* Spacer to push options down */
.spacer {
  flex-grow: 1;
}

/* Title */
h1 {
  font-size: 48px;
  color: #00ff00;
  text-shadow: 0 0 10px #00ff00;
}

/* Lifelines Buttons */
.lifelines .btn {
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  border: 2px solid;
  padding: 6px 10px;
  font-size: 14px;
}

#call-jesse { border-color: #ff0000; }
#ask-gus { border-color: #00ff00; }
#poll-cartel { border-color: #00b7eb; }

.lifelines .btn:hover { background: rgba(255, 255, 255, 0.2); }
.lifelines .btn:disabled { background: rgba(0, 0, 0, 0.2); color: #666; border-color: #666; cursor: not-allowed; }

/* Timer */
.timer {
  font-size: 36px;
  color: #ff0000;
  text-shadow: 0 0 5px #ff0000;
  font-family: 'Courier New', monospace;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 15px;
  border-radius: 5px;
  opacity: 0.7;
  width: fit-content;
}

/* Question */
.question {
  font-size: 24px;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px;
  border-radius: 5px;
  max-width: 600px;
}

/* Prize */
.prize {
  font-size: 20px;
  color: #ff0000;
  text-shadow: 0 0 5px #ff0000;
}

/* Options */
.options {
  margin-bottom: 10px;
}

.options .btn {
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  border: 2px solid #00b7eb;
  border-radius: 5px;
  font-size: 18px;
  padding: 8px;
}

.options .btn:hover { background: rgba(255, 255, 255, 0.2); }
.options .btn:disabled { background: rgba(0, 0, 0, 0.2); color: #666; border-color: #666; cursor: not-allowed; }

/* Poll Results */
.poll-results {
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  border-radius: 5px;
  width: 300px;
  z-index: 5000;
}

.poll-results h3 { font-size: 20px; margin-bottom: 10px; }
.poll-bar span { width: 30px; text-align: right; margin-right: 10px; }
.poll-bar div { height: 20px; background: #00b7eb; transition: width 0.5s ease-in-out; }

/* Sound Toggle */
.sound-toggle {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 2px solid;
  border-radius: 5px;
  font-size: 24px;
  width: 50px;
  height: 50px;
}

.sound-off { border-color: #ff0000; }
.sound-on { border-color: #00ff00; }
.sound-toggle:hover { background: rgba(255, 255, 255, 0.2); }

/* Safe area inset for modern mobile devices */
.safe-area-inset {
  padding-top: env(safe-area-inset-top, 10px);
  padding-bottom: env(safe-area-inset-bottom, 10px);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  h1 { font-size: 36px; margin-bottom: 8px; }
  .timer { font-size: 28px; padding: 3px 10px; }
  .question { font-size: 20px; max-width: 90%; padding: 8px; }
  .prize { font-size: 16px; }
  .options .btn { font-size: 16px; padding: 6px; }
  .poll-results { width: 90%; max-width: 250px; padding: 15px; }
}

@media (max-width: 576px) {
  .game-ui { padding: 20px 10px; }
  h1 { font-size: 28px; margin-bottom: 5px; }
  .lifelines .btn { font-size: 12px; padding: 4px 6px; }
  .sound-toggle { width: 35px; height: 35px; font-size: 18px; margin-top: 5px; margin-right: 5px; }
  .timer { font-size: 24px; padding: 2px 8px; }
  .question { font-size: 16px; padding: 5px; }
  .prize { font-size: 14px; }
  .options .btn { font-size: 14px; padding: 4px; }
}