:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --primary: #2563eb;
  --secondary: #10b981;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --bg-accent: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.05), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(16, 185, 129, 0.06), transparent 30%);
}

body[data-theme="dark"] {
  --bg: #0b0d10;
  --panel: #12161d;
  --text: #e9edf5;
  --muted: #9fb1cc;
  --primary: #ff4d6d;
  --secondary: #3ad29f;
  --border: #1e2633;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --bg-accent: radial-gradient(circle at 20% 20%, rgba(255, 77, 109, 0.07), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(58, 210, 159, 0.07), transparent 30%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-accent), var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
}

.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

main {
  width: min(960px, 96vw);
  margin: 32px auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: var(--shadow);
}

h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stat {
  background: rgba(255, 255, 255, 0.02);
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.value {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 700;
  word-break: break-all;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.action label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

input[type="number"] {
  flex: 1;
  min-width: 160px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  font-size: 15px;
}

button {
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  transition: transform 0.05s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button.primary {
  background: linear-gradient(135deg, var(--primary), #ff6b92);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--primary) 30%, transparent);
}

button.secondary {
  background: linear-gradient(135deg, var(--secondary), #63e6be);
  color: #05110e;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--secondary) 30%, transparent);
}

button.wide {
  width: 100%;
}

button:hover {
  transform: translateY(-1px);
}

button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

footer {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 600px) {
  header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .brand {
    font-size: 18px;
  }
}
