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

html, body {
  height: 100%;
  background: #1a0e06;
  color: #f3e2c4;
  font-family: "Georgia", "Times New Roman", "Garamond", serif;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#stage {
  position: relative;
  width: 540px;
  height: 960px;
  background:
    /* sun glow at horizon */
    radial-gradient(ellipse at 50% 8%, rgba(255, 190, 110, 0.35), transparent 55%),
    /* deeper dig pit at the bottom */
    radial-gradient(ellipse at 50% 100%, rgba(40, 18, 8, 0.85), transparent 70%),
    linear-gradient(180deg, #d2a26b 0%, #b07a44 38%, #7a4a25 70%, #3d2110 100%);
  border: 2px solid #5a3416;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), inset 0 0 80px rgba(40, 20, 5, 0.55);
  overflow: hidden;
}

#scoreboard {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: linear-gradient(180deg, rgba(30, 14, 4, 0.65), rgba(30, 14, 4, 0));
  z-index: 10;
  pointer-events: none;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
}

.team .label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 5px;
  opacity: 0.88;
  font-family: "Georgia", serif;
  font-variant: small-caps;
}

.team .score {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  margin-top: 2px;
  transition: transform 0.15s ease;
}

.team.red .label, .team.red .score {
  /* Crest = deep terracotta */
  color: #d96435;
  text-shadow: 0 0 14px rgba(217, 100, 53, 0.55), 0 1px 2px rgba(0, 0, 0, 0.65);
}

.team.blue .label, .team.blue .score {
  /* Claw = bone / amber */
  color: #e8c66a;
  text-shadow: 0 0 14px rgba(232, 198, 106, 0.55), 0 1px 2px rgba(0, 0, 0, 0.65);
}

.score.bump { transform: scale(1.35); }

.meta {
  text-align: center;
}

.meta .title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 6px;
  font-variant: small-caps;
  font-family: "Georgia", serif;
  color: #f3e2c4;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}

.meta .subtitle {
  font-size: 11px;
  letter-spacing: 3px;
  opacity: 0.65;
  margin-top: 4px;
  font-family: "Georgia", serif;
  font-style: italic;
  color: #e0c896;
}

#fossil-record {
  position: absolute;
  top: 88px;
  left: 12px;
  right: 12px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: linear-gradient(180deg, rgba(80, 45, 20, 0.78), rgba(50, 28, 12, 0.78));
  border: 1px solid rgba(245, 220, 165, 0.35);
  border-radius: 4px;
  z-index: 9;
  pointer-events: none;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.fr-label {
  font-family: "Georgia", serif;
  font-variant: small-caps;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 3px;
  color: #f3e2c4;
  opacity: 0.85;
  white-space: nowrap;
}

.fr-slots {
  display: flex;
  flex: 1;
  gap: 6px;
  justify-content: space-around;
}

.fr-slot {
  flex: 1;
  text-align: center;
  font-family: "Georgia", serif;
  font-variant: small-caps;
  font-size: 10px;
  letter-spacing: 1.2px;
  padding: 3px 4px;
  border: 1px dashed rgba(245, 220, 165, 0.35);
  color: rgba(245, 220, 165, 0.45);
  background: rgba(0,0,0,0.18);
  border-radius: 2px;
  transition: all 0.25s ease;
}

.fr-slot.collected {
  color: #fff5d6;
  background: rgba(232, 168, 80, 0.55);
  border-color: rgba(255, 230, 160, 0.95);
  box-shadow: 0 0 12px rgba(255, 200, 100, 0.7);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

#game {
  display: block;
  width: 100%;
  height: 100%;
}

.ticker {
  position: absolute;
  left: 0; right: 0;
  bottom: 6px;
  text-align: center;
  font-family: "Georgia", "Times New Roman", serif;
  font-style: italic;
  font-size: 12px;
  letter-spacing: 1.5px;
  opacity: 0.55;
  pointer-events: none;
  color: #f3e2c4;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

@keyframes quake {
  0%   { transform: translate(0, 0) rotate(0); }
  10%  { transform: translate(-4px, 3px) rotate(0.3deg); }
  20%  { transform: translate(5px, -4px) rotate(-0.35deg); }
  30%  { transform: translate(-5px, 2px) rotate(0.25deg); }
  40%  { transform: translate(4px, -3px) rotate(-0.3deg); }
  50%  { transform: translate(-3px, 4px) rotate(0.35deg); }
  60%  { transform: translate(4px, -2px) rotate(-0.25deg); }
  70%  { transform: translate(-4px, -3px) rotate(0.2deg); }
  80%  { transform: translate(5px, 3px) rotate(-0.2deg); }
  90%  { transform: translate(-3px, -2px) rotate(0.25deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

#stage.shaking {
  animation: quake 0.30s linear infinite;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7),
              inset 0 0 80px rgba(40, 20, 5, 0.55),
              0 0 50px rgba(220, 110, 40, 0.7);
}
