:root {
  --bg: #0b1020;
  --card: rgba(15, 23, 42, 0.9);
  --accent: #f7d23e;
  --accent-strong: #ff9500;
  --text-main: #f8fafc;
  --text-muted: #cbd5f5;
  --border: rgba(255, 255, 255, 0.1);
}

* {
  box-sizing: border-box;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("./battle-start-bg.png") center/cover fixed, #050811;
  color: var(--text-main);
  padding: 1.5rem;
}

.panel {
  width: min(520px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

h1 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

p {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

select,
input[type="number"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.8rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

select:focus,
input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(247, 210, 62, 0.2);
}

.field + .field {
  margin-top: 1.25rem;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  color: var(--text-muted);
}

.checkbox-field input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

.hidden {
  display: none;
}

.output {
  margin-top: 2rem;
  background: rgba(247, 210, 62, 0.12);
  border: 1px solid rgba(247, 210, 62, 0.35);
  border-radius: 1rem;
  padding: 1.25rem;
}

.metric {
  margin: 0 0 1rem;
}

.metric-label {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.lifespan-value {
  font-size: clamp(2rem, 5vw, 2.7rem);
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

.lifespan-value.secondary {
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--text-main);
}

.stage-details {
  margin-top: 0.7rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.meter {
  position: relative;
  margin-top: 1.5rem;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.meter-fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  transition: width 0.3s ease;
}

@media (max-width: 480px) {
  .panel {
    padding: 1.5rem;
  }
}
