:root {
  --bg-dark: #070714;
  --neon-pink: #ff007f;
  --neon-cyan: #00f2fe;
  --neon-yellow: #ffee00;
  --neon-purple: #9d00ff;
  --text-main: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow: hidden;
  position: relative;
}

html {
  height: -webkit-fill-available;
}

/* Background Canvas */
#discoCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Entry Overlay */
.entry-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 7, 20, 0.95);
  backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.entry-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.overlay-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--neon-pink);
  box-shadow: 0 0 50px rgba(255, 0, 127, 0.4), inset 0 0 30px rgba(0, 242, 254, 0.2);
  border-radius: 24px;
  padding: 30px 40px;
  text-align: center;
  position: relative;
  max-width: 400px;
  width: 100%;
  animation: floatCard 3s ease-in-out infinite;
}

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

.disc-icon {
  font-size: 70px;
  animation: spinDisc 4s linear infinite;
  display: inline-block;
  margin-bottom: 10px;
}

@keyframes spinDisc {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.glitch-text {
  font-family: 'Press Start 2P', cursive;
  font-size: 36px;
  color: var(--neon-cyan);
  text-shadow: 3px 3px 0 var(--neon-pink), -3px -3px 0 var(--neon-yellow);
  letter-spacing: 3px;
  margin-bottom: 20px;
}

.start-btn {
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: #fff;
  border: none;
  font-size: 18px;
  font-weight: 900;
  padding: 16px 36px;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 0 30px var(--neon-pink);
  transition: all 0.2s ease;
  letter-spacing: 1px;
  width: 100%;
}

.start-btn:active, .start-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px var(--neon-cyan);
}

/* App Container */
.app-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 16px 20px;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1px;
}

.rat-logo {
  font-size: 32px;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

.highlight {
  color: var(--neon-pink);
  text-shadow: 0 0 10px var(--neon-pink);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-badge {
  background: rgba(255, 0, 127, 0.2);
  border: 1px solid var(--neon-pink);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--neon-pink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 6px;
  height: 6px;
  background-color: var(--neon-pink);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--neon-pink);
  animation: pulseDot 1s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.audio-control {
  background: rgba(0, 242, 254, 0.15);
  border: 1px solid var(--neon-cyan);
  padding: 6px 14px;
  border-radius: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--neon-cyan);
  transition: all 0.2s ease;
}

.audio-control:active, .audio-control:hover {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 15px var(--neon-cyan);
}

/* Main Stage */
.main-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  margin: 0 auto;
}

/* Speech Bubble */
.speech-bubble {
  position: absolute;
  top: 0px;
  background: #ffffff;
  color: #000;
  font-weight: 900;
  font-size: 15px;
  padding: 10px 18px;
  border-radius: 24px;
  box-shadow: 0 0 20px var(--neon-yellow);
  z-index: 20;
  animation: popBubble 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid #000;
  text-align: center;
  max-width: 90%;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 10px 0 10px;
  border-style: solid;
  border-color: #ffffff transparent transparent transparent;
}

/* Center Rat Stage */
.rat-stage-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

.disco-ball-wrapper {
  font-size: 40px;
  position: absolute;
  top: -45px;
  animation: swing 2s ease-in-out infinite alternate;
}

@keyframes swing {
  0% { transform: rotate(-10deg); }
  100% { transform: rotate(10deg); }
}

.rat-container {
  width: 260px;
  height: 260px;
  position: relative;
  z-index: 5;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rat-container:active {
  transform: scale(1.15);
}

.rat-gif {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 25px rgba(0, 242, 254, 0.8));
}

/* Pedestal */
.pedestal {
  width: 280px;
  height: 50px;
  position: absolute;
  bottom: -15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 3px solid transparent;
  transform: rotateX(75deg);
}

.ring-1 {
  width: 280px;
  height: 100px;
  border-color: var(--neon-pink);
  box-shadow: 0 0 25px var(--neon-pink);
  animation: pulseRing 1.5s infinite alternate;
}

.ring-2 {
  width: 220px;
  height: 75px;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px var(--neon-cyan);
  animation: pulseRing 1.5s infinite alternate 0.3s;
}

.ring-3 {
  width: 170px;
  height: 55px;
  border-color: var(--neon-yellow);
  box-shadow: 0 0 15px var(--neon-yellow);
}

@keyframes pulseRing {
  0% { transform: rotateX(75deg) scale(0.95); opacity: 0.7; }
  100% { transform: rotateX(75deg) scale(1.05); opacity: 1; }
}

/* Laser Beams */
.laser-beam {
  position: absolute;
  top: -80px;
  width: 3px;
  height: 350px;
  opacity: 0.6;
  pointer-events: none;
}

.laser-1 {
  left: -80px;
  background: linear-gradient(to bottom, transparent, var(--neon-pink));
  transform: rotate(-35deg);
  animation: laserSweep1 3s ease-in-out infinite alternate;
}

.laser-2 {
  right: -80px;
  background: linear-gradient(to bottom, transparent, var(--neon-cyan));
  transform: rotate(35deg);
  animation: laserSweep2 3s ease-in-out infinite alternate;
}

@keyframes laserSweep1 {
  0% { transform: rotate(-45deg); }
  100% { transform: rotate(-15deg); }
}

@keyframes laserSweep2 {
  0% { transform: rotate(45deg); }
  100% { transform: rotate(15deg); }
}

/* Toolbar Controls - PERFECTLY CENTERED */
.controls-toolbar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 480px;
  margin: 20px auto 0 auto;
  justify-content: center;
  align-self: center;
}

.action-btn {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  min-height: 48px;
  width: 100%;
}

.action-btn:active, .action-btn:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px var(--neon-cyan);
}

.btn-cheese:active, .btn-cheese:hover { border-color: var(--neon-yellow); box-shadow: 0 0 15px var(--neon-yellow); }
.btn-speed:active, .btn-speed:hover { border-color: var(--neon-pink); box-shadow: 0 0 15px var(--neon-pink); }
.btn-strobe:active, .btn-strobe:hover { border-color: var(--neon-purple); box-shadow: 0 0 15px var(--neon-purple); }

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  width: 100%;
}

.stat-item {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}

.stat-val {
  color: var(--neon-yellow);
  font-size: 14px;
  margin-left: 4px;
  font-weight: 900;
}

/* Falling Cheese Items */
.cheese-particle {
  position: fixed;
  top: -50px;
  font-size: 28px;
  pointer-events: none;
  z-index: 99;
  animation: fallCheese linear forwards;
}

@keyframes fallCheese {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

/* Multiverse Cloned Rats */
.cloned-rat {
  position: fixed;
  width: 80px;
  height: 80px;
  z-index: 2;
  pointer-events: none;
  animation: floatRat 3s ease-in-out infinite alternate;
}

@keyframes floatRat {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-20px) scale(1.1); }
}

/* Strobe Flash Class */
body.strobe-mode {
  animation: strobeBg 0.15s infinite;
}

@keyframes strobeBg {
  0% { background-color: #ff007f; }
  25% { background-color: #00f2fe; }
  50% { background-color: #ffee00; }
  75% { background-color: #9d00ff; }
  100% { background-color: #070714; }
}

/* Responsive Media Queries */
@media (min-width: 768px) {
  .controls-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 600px;
    margin: 25px auto 0 auto;
  }
  .action-btn {
    font-size: 15px;
    padding: 14px 24px;
    width: auto;
  }
  .rat-container {
    width: 320px;
    height: 320px;
  }
  .pedestal {
    width: 340px;
  }
  .ring-1 { width: 340px; height: 120px; }
  .ring-2 { width: 280px; height: 90px; }
  .ring-3 { width: 220px; height: 70px; }
  .brand { font-size: 28px; }
  .rat-logo { font-size: 40px; }
  .stat-item { font-size: 14px; }
  .stat-val { font-size: 18px; }
}

@media (max-width: 400px) {
  .live-badge { display: none; }
  .brand-name { font-size: 20px; }
  .rat-container { width: 220px; height: 220px; }
  .pedestal { width: 240px; }
  .ring-1 { width: 240px; height: 90px; }
  .ring-2 { width: 190px; height: 65px; }
  .ring-3 { width: 140px; height: 50px; }
  .action-btn { font-size: 11px; padding: 10px; }
}
