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

html, body {
  height: 100%;
  background: #050810;
  color: #e6d6a8;
  font-family: "Trajan Pro", "Cinzel", Georgia, "Times New Roman", serif;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#stage {
  position: relative;
  width: 540px;
  height: 960px;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(20, 30, 50, 0.55), transparent 70%),
    radial-gradient(ellipse at 50% 0%, rgba(80, 70, 40, 0.20), transparent 60%),
    linear-gradient(180deg, #1a2238 0%, #0d1326 45%, #050912 100%);
  border: 6px solid #5a3a1c;
  border-radius: 6px;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    inset 0 0 80px rgba(0,0,0,0.55),
    inset 0 0 0 2px #2a1a0a,
    inset 0 0 0 4px #c89744;
  overflow: hidden;
}

/* Knotwork frame edges */
#stage::before, #stage::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 14px;
  background:
    repeating-linear-gradient(90deg,
      #8c6a30 0px, #c89744 6px, #f0c878 10px, #c89744 14px, #8c6a30 20px),
    #5a3a1c;
  z-index: 9;
  pointer-events: none;
  opacity: 0.85;
}
#stage::before { top: 84px;
  box-shadow: 0 1px 0 #2a1a0a, 0 -1px 0 #2a1a0a, 0 2px 6px rgba(0,0,0,0.6); }
#stage::after  { bottom: 0;
  box-shadow: 0 1px 0 #2a1a0a, 0 -1px 0 #2a1a0a, 0 -2px 6px rgba(0,0,0,0.6); }

#scoreboard {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background:
    repeating-linear-gradient(0deg,
      rgba(40, 25, 10, 0.85) 0px, rgba(40, 25, 10, 0.85) 2px,
      rgba(60, 35, 15, 0.85) 2px, rgba(60, 35, 15, 0.85) 4px),
    linear-gradient(180deg, rgba(20,12,5,0.85), rgba(40,25,10,0.65));
  border-bottom: 3px solid #8c6a30;
  z-index: 10;
  pointer-events: none;
  box-shadow: inset 0 -8px 12px rgba(0,0,0,0.4);
}

/* iron rivets in scoreboard corners */
#scoreboard::before, #scoreboard::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #aaa, #555 60%, #222 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
#scoreboard::before { left: 8px; }
#scoreboard::after  { right: 8px; }

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

.team .label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 5px;
  opacity: 0.95;
}

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

.team.red .label, .team.red .score {
  color: #f0c878;
  text-shadow:
    0 0 12px rgba(240, 200, 120, 0.65),
    0 0 2px rgba(240, 200, 120, 0.95),
    1px 1px 0 #2a1a0a;
}

.team.blue .label, .team.blue .score {
  color: #c8e6f0;
  text-shadow:
    0 0 12px rgba(200, 230, 240, 0.65),
    0 0 2px rgba(200, 230, 240, 0.95),
    1px 1px 0 #1a2235;
}

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

.meta { text-align: center; }

.meta .title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 5px;
  color: #f0c878;
  text-shadow: 0 0 10px rgba(240, 200, 120, 0.55), 1px 1px 0 #2a1a0a;
}

.meta .subtitle {
  font-size: 11px;
  letter-spacing: 3px;
  opacity: 0.7;
  margin-top: 4px;
  color: #d6b888;
}

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

.ticker {
  position: absolute;
  left: 0; right: 0;
  bottom: 18px;
  text-align: center;
  font-family: "Cinzel", "Trajan Pro", Georgia, serif;
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.7;
  color: #d6b888;
  pointer-events: none;
  text-shadow: 0 0 6px rgba(0,0,0,0.85);
  z-index: 8;
}

/* Rune wheel HUD floats in top-right area below the scoreboard */
#rune-hud {
  position: absolute;
  right: 10px;
  top: 96px;
  width: 130px;
  z-index: 8;
  pointer-events: none;
  text-align: center;
}
#rune-hud .rune-label {
  font-family: "Cinzel", Georgia, serif;
  font-size: 9px;
  letter-spacing: 3px;
  color: #f0c878;
  margin-bottom: 2px;
  text-shadow: 0 0 6px rgba(240, 200, 120, 0.6), 1px 1px 0 #2a1a0a;
}
#rune-canvas {
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 6px rgba(0,0,0,0.7));
}

/* Storm/quake (storm surge) shake */
@keyframes storm {
  0%   { transform: translate(0, 0) rotate(0); }
  10%  { transform: translate(-3px, 2px) rotate(0.25deg); }
  20%  { transform: translate(4px, -3px) rotate(-0.3deg); }
  30%  { transform: translate(-4px, 1px) rotate(0.2deg); }
  40%  { transform: translate(3px, -2px) rotate(-0.25deg); }
  50%  { transform: translate(-2px, 3px) rotate(0.3deg); }
  60%  { transform: translate(3px, -1px) rotate(-0.2deg); }
  70%  { transform: translate(-3px, -2px) rotate(0.15deg); }
  80%  { transform: translate(4px, 2px) rotate(-0.15deg); }
  90%  { transform: translate(-2px, -1px) rotate(0.2deg); }
  100% { transform: translate(0, 0) rotate(0); }
}

#stage.shaking {
  animation: storm 0.32s linear infinite;
  box-shadow:
    0 30px 80px rgba(0,0,0,0.7),
    inset 0 0 80px rgba(0,0,0,0.55),
    inset 0 0 0 2px #2a1a0a,
    inset 0 0 0 4px #c89744,
    0 0 50px rgba(100, 140, 200, 0.65);
}

/* Valhalla Strike — pulsing gold border */
@keyframes valhalla {
  0%   { box-shadow:
           0 30px 80px rgba(0,0,0,0.7),
           inset 0 0 80px rgba(0,0,0,0.55),
           inset 0 0 0 2px #2a1a0a,
           inset 0 0 0 4px #f0c878,
           0 0 60px rgba(240, 200, 120, 0.9); }
  50%  { box-shadow:
           0 30px 80px rgba(0,0,0,0.7),
           inset 0 0 80px rgba(0,0,0,0.55),
           inset 0 0 0 2px #2a1a0a,
           inset 0 0 0 4px #fff0c0,
           0 0 100px rgba(255, 230, 160, 1); }
  100% { box-shadow:
           0 30px 80px rgba(0,0,0,0.7),
           inset 0 0 80px rgba(0,0,0,0.55),
           inset 0 0 0 2px #2a1a0a,
           inset 0 0 0 4px #f0c878,
           0 0 60px rgba(240, 200, 120, 0.9); }
}

#stage.valhalla {
  animation: valhalla 0.8s ease-in-out infinite;
}
