* {
  box-sizing: border-box;
}

:root {
  --bg: #eef5ff;
  --bg2: #f9fbff;
  --text: #14213d;
  --muted: #5f6f89;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --card: rgba(255, 255, 255, 0.92);
  --line: rgba(37, 99, 235, 0.16);
  --shadow: 0 24px 70px rgba(31, 64, 135, 0.18);
  --radius: 28px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.28), transparent 34rem),
    radial-gradient(circle at top right, rgba(124, 92, 255, 0.20), transparent 34rem),
    linear-gradient(135deg, var(--bg), var(--bg2));
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}


.top-nav {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(31, 64, 135, 0.10);
}

.top-nav a:hover {
  transform: translateY(-1px);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero {
  padding: clamp(24px, 4vw, 46px);
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  right: -80px;
  top: -90px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.20), rgba(18, 184, 134, 0.20));
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: rgba(37, 99, 235, 0.10);
  font-weight: 700;
  font-size: 0.92rem;
}

h1, h2 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  max-width: 900px;
  font-size: clamp(2rem, 4vw, 4.3rem);
  letter-spacing: -0.05em;
}

h2 {
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  letter-spacing: -0.03em;
}

p {
  line-height: 1.65;
}

.lead {
  max-width: 920px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-hints span {
  padding: 10px 14px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  font-weight: 700;
  color: #284466;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(280px, 0.95fr);
  gap: 24px;
  margin-top: 24px;
}

.wheel-card,
.form-card,
.result-card {
  padding: clamp(20px, 3vw, 32px);
}

.wheel-wrap {
  width: min(100%, 560px);
  aspect-ratio: 1;
  position: relative;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

#wheel {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 38px rgba(24, 45, 95, 0.25));
  border-radius: 50%;
  will-change: transform;
}

.pointer {
  position: absolute;
  top: -4px;
  z-index: 3;
  width: 0;
  height: 0;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-top: 42px solid #111827;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.22));
}

.wheel-center {
  position: absolute;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  background: white;
  border: 8px solid rgba(37, 99, 235, 0.12);
  box-shadow: inset 0 0 0 1px var(--line), 0 16px 40px rgba(20, 33, 61, 0.18);
}

.wheel-center strong {
  font-size: 1.3rem;
}

.wheel-center span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.form-card p {
  color: var(--muted);
}

form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

label {
  font-weight: 800;
  color: #263b59;
}

input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 18px;
  font: inherit;
  outline: none;
  background: white;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

button {
  border: 0;
  border-radius: 18px;
  padding: 16px 18px;
  margin-top: 8px;
  font: inherit;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, var(--primary), #7c5cff);
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

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

button:disabled,
input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.message {
  min-height: 26px;
  margin-top: 18px;
  font-weight: 800;
}

.message.error {
  color: #be123c;
}

.message.success {
  color: #047857;
}

.message.info {
  color: #1d4ed8;
}

.hidden {
  display: none;
}

.result-card {
  margin-top: 24px;
}

.result-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(18, 184, 134, 0.12);
  color: #047857;
  font-weight: 900;
}

dl {
  display: grid;
  gap: 14px;
  margin: 22px 0 0;
}

dl div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(37, 99, 235, 0.055);
  border: 1px solid var(--line);
}

dt {
  font-weight: 900;
  color: #263b59;
  margin-bottom: 6px;
}

dd {
  margin: 0;
  color: #41516a;
  line-height: 1.55;
}

.important-note {
  margin: 20px 0 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 900;
}

.important-note.secondary {
  background: #eff6ff;
  color: #1d4ed8;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.result-actions-top {
  margin-top: 0;
  margin-bottom: 22px;
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, #047857, #12b886);
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(4, 120, 87, 0.22);
}

.download-link:hover {
  transform: translateY(-1px);
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 4px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

footer a {
  color: var(--primary-dark);
  font-weight: 900;
  text-decoration: none;
}

.admin-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.admin-header {
  padding: 32px;
  margin-bottom: 20px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.action-link,
.danger-link {
  display: inline-flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 900;
}

.action-link {
  background: rgba(37, 99, 235, 0.10);
  color: var(--primary-dark);
}

.danger-link {
  background: rgba(225, 29, 72, 0.10);
  color: #be123c;
}

.action-link.compact {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.88rem;
}

.table-wrap {
  overflow-x: auto;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #263b59;
  background: rgba(37, 99, 235, 0.08);
  font-size: 0.92rem;
}

td {
  color: #41516a;
}

.reset-form {
  display: grid;
  gap: 16px;
  padding: 28px;
}

.reset-form input {
  max-width: 320px;
}

@media (max-width: 860px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .pointer {
    border-left-width: 18px;
    border-right-width: 18px;
    border-top-width: 34px;
  }

  .top-nav {
    justify-content: center;
  }

  footer {
    display: block;
  }

  footer span {
    display: block;
    margin-top: 8px;
  }
}

.small-help {
    font-size: 0.92rem;
    color: #64748b;
    margin-top: 0.8rem;
}
