:root {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #111;
  color: #f5f5f5;
  --panel-bg: #1f1f2a;
  --button-bg: #28284a;
  --button-hover: #3b3b68;
  --accent: #6c8cff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at top, #2b2b4a 0%, #0c0c13 50%, #050508 100%);
}

.game-shell {
  display: flex;
  width: 100%;
  max-width: 1160px;
  min-height: 560px;
  margin: 20px;
  gap: 16px;
}

.game-area {
  flex: 1;
  background: #10101c;
  border: 2px solid #3a3a66;
  border-radius: 18px;
  padding: 14px;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

.game-header h1 {
  margin: 0;
  font-size: 1.6rem;
}

.game-header p {
  margin: 0;
  color: #b8b8d1;
}

.back-link {
  color: #6c8cff;
  text-decoration: none;
  border: 1px solid rgba(108, 140, 255, 0.45);
  padding: 10px 14px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.back-link:hover {
  background: rgba(108, 140, 255, 0.08);
}

.status-bar {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #d7e7ff;
  font-size: 1rem;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.race-controls {
  margin-top: 16px;
}

.info-panel {
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--panel-bg);
  border: 2px solid #3b3b68;
  border-radius: 20px;
  padding: 18px;
}

#gameCanvas {
  width: 100%;
  height: calc(100% - 52px);
  border-radius: 12px;
  background: linear-gradient(180deg, #12122a 0%, #151530 100%);
  display: block;
}

.attack-panel {
  width: 240px;
  background: var(--panel-bg);
  border: 2px solid #3b3b68;
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #dae1ff;
}

.attack-button {
  border: none;
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--button-bg);
  color: #e9e9ff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  text-align: left;
}

.attack-button:hover {
  background: var(--button-hover);
  transform: translateY(-1px);
}

.attack-button:active {
  transform: translateY(1px);
}

.info-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px;
  color: #cad0ff;
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .game-shell {
    flex-direction: column;
  }

  .attack-panel {
    width: 100%;
  }
}
