.game-shell {
  max-width: 1200px;
  position: relative;
}

.side-deco {
  position: absolute;
  width: 168px;
  height: 168px;
  top: 420px;
  opacity: 0.95;
  pointer-events: none;
  filter: drop-shadow(0 0 16px rgba(0, 220, 220, 0.28));
}
.side-left {
  left: 72px;
}
.side-right {
  right: 72px;
}

.back-link {
  display: block;
  width: fit-content;
  margin: 0 auto 16px;
}

.game-info {
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid #00cccc44;
  border-radius: 8px;
  padding: 12px 20px;
  margin: 0 auto 18px;
  text-align: center;
  max-width: 560px;
}
.game-info h3 {
  color: #00cccc;
  margin: 0 0 8px;
  font-size: 1em;
  text-shadow: 0 0 6px #00cccc;
}
.game-info ul {
  margin: 0;
  padding-left: 0;
  list-style-position: inside;
  font-size: 0.86em;
  color: #c0c0c0;
  line-height: 1.65;
}

#ui-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
#ui-bar input {
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid #00cccc;
  border-radius: 6px;
  color: #e0e0e0;
  font-family: "Cinzel", serif;
  font-size: 1em;
  padding: 8px 14px;
  outline: none;
  width: 180px;
}
#ui-bar input::placeholder { color: #555; }
#ui-bar input:focus { border-color: #00ffff; box-shadow: 0 0 8px #00ffff55; }

#ui-bar button,
#go-restart,
.upgrade-choice {
  background: rgba(0, 204, 204, 0.12);
  border: 2px solid #00cccc;
  border-radius: 6px;
  color: #00cccc;
  font-family: "Cinzel", serif;
  font-size: 1em;
  padding: 8px 22px;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
}
#ui-bar button:hover,
#go-restart:hover,
.upgrade-choice:hover {
  background: rgba(0, 204, 204, 0.25);
  box-shadow: 0 0 14px #00cccc88;
  color: #00ffff;
}

#game-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}
#game-area.pregame #hud {
  display: none;
}

#hud {
  display: flex;
  gap: 24px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid #00cccc55;
  border-radius: 8px;
  padding: 8px 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.hud-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 58px;
}
.hud-label {
  font-size: 0.65em;
  letter-spacing: 0.14em;
  color: #00cccc99;
}
.hud-value {
  font-size: 1.35em;
  color: #00cccc;
  text-shadow: 0 0 8px #00cccc;
  font-weight: bold;
}

#arena-wrap {
  position: relative;
  border: 2px solid #00cccc;
  border-radius: 10px;
  overflow: hidden;
  background: #030607;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.2), inset 0 0 20px rgba(0, 0, 0, 0.8);
}
#game-canvas {
  display: block;
}

#pregame-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.65));
  pointer-events: none;
}
#pregame-overlay.hidden { display: none; }
.pregame-title {
  color: #00ffff;
  font-size: 1.4em;
  text-shadow: 0 0 10px #00cccc;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.pregame-sub {
  margin-top: 6px;
  color: #cfeeee;
  font-size: 0.84em;
}

#upgrade-panel {
  width: 100%;
  max-width: 800px;
  background: rgba(0, 0, 0, 0.74);
  border: 1px solid #00cccc77;
  border-radius: 8px;
  padding: 14px 12px;
}
#upgrade-panel h3 {
  margin: 0 0 12px;
  color: #00cccc;
  text-shadow: 0 0 6px #00cccc;
}
#upgrade-cap-note {
  margin: -4px 0 10px;
  font-size: 0.78em;
  color: #9bd6d6;
  letter-spacing: 0.03em;
}
#upgrade-current {
  margin: -2px 0 12px;
  font-size: 0.82em;
  color: #b9ecec;
}
#upgrade-panel.hidden { display: none; }
#upgrade-choices {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.upgrade-choice {
  width: 240px;
  min-height: 82px;
  text-align: left;
  padding: 10px 12px;
}
.upgrade-choice strong {
  display: block;
  color: #00ffff;
  margin-bottom: 4px;
}
.upgrade-choice span {
  display: block;
  font-size: 0.86em;
  color: #e0e0e0;
}
.upgrade-choice:disabled {
  opacity: 0.45;
  filter: grayscale(0.25);
  box-shadow: none;
}

#touch-controls {
  display: none;
  margin: 10px auto 0;
}
.touch-middle {
  display: flex;
  gap: 6px;
}
#touch-controls button {
  width: 64px;
  height: 64px;
  border: 2px solid #00cccc;
  border-radius: 8px;
  background: rgba(1, 53, 53, 0.75);
  color: #00cccc;
  font: 700 1.1rem "Cinzel", serif;
}

#game-over-screen {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 250;
}
#game-over-screen.hidden { display: none; }
.go-inner {
  text-align: center;
  padding: 36px;
  background: rgba(0, 0, 0, 0.78);
  border: 2px solid #00cccc;
  border-radius: 12px;
  box-shadow: 0 0 26px rgba(0, 255, 255, 0.26);
  width: min(92vw, 520px);
}
.go-inner h2 {
  font-size: 2em;
  color: #00cccc;
  text-shadow: 0 0 20px #00cccc;
  margin-bottom: 8px;
}
.go-inner p {
  font-size: 1.05em;
  color: #e0e0e0;
  margin-bottom: 20px;
}

.section-title {
  color: #00cccc;
  text-shadow: 0 0 10px #00cccc;
  margin-top: 26px;
  font-size: 1.35em;
}
#lbTable {
  width: 100%;
  max-width: 560px;
  margin: 12px auto 34px;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: rgba(17, 17, 17, 0.92);
  border: 1px solid #00cccc;
}
#lbTable th,
#lbTable td {
  padding: 8px 10px;
  border: 1px solid #013535;
  text-align: center;
}
#lbTable th {
  background: #00cccc;
  color: #000;
  font-weight: 700;
}
#lbTable tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.04);
}
#lbTable tr:first-child td {
  color: #ffcc00;
}

@media (max-width: 920px) {
  .side-deco {
    display: none;
  }
  #game-canvas {
    width: 92vw;
    max-width: 800px;
    height: auto;
  }
  #touch-controls {
    display: block;
  }
}

@media (max-width: 600px) {
  #ui-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  #ui-bar input {
    width: 160px;
  }
  .upgrade-choice {
    width: 100%;
    max-width: 340px;
  }
}
