:root {
  --bg-body: #050816;
  --bg-surface: #0b1020;
  --bg-surface-alt: #11172a;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --accent: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.16);
  --accent-strong: #7c3aed;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.9);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1f2937 0, #020617 55%, #000 100%);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.18), transparent 55%),
    rgba(2, 6, 23, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px;
  height: 32px;
}

.logo-text {
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 14px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 0;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
}

.nav-dropdown-toggle:hover {
  color: var(--text-primary);
}

.nav-dropdown-icon {
  font-size: 10px;
}

.nav-dropdown-menu {
  position: absolute;
  right: 0;
  margin-top: 10px;
  min-width: 260px;
  padding: 10px 0;
  background: rgba(15, 23, 42, 0.98);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-subtle);
  display: none;
}

.nav-dropdown-menu a {
  display: block;
  padding: 7px 14px;
  font-size: 14px;
  color: var(--text-secondary);
}

.nav-dropdown-menu a:hover {
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-primary);
}

.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.btn-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f9fafb;
  box-shadow: 0 12px 30px rgba(79, 70, 229, 0.4);
}

.btn-cta:hover {
  filter: brightness(1.05);
}

.btn-primary {
  background: rgba(79, 70, 229, 0.14);
  border-color: var(--accent);
  color: #e5e7eb;
}

.btn-primary:hover {
  background: rgba(79, 70, 229, 0.24);
}

.burger {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at top, rgba(79, 70, 229, 0.2), transparent 65%),
    rgba(15, 23, 42, 0.96);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 0;
}

.burger span {
  display: block;
  width: 16px;
  height: 2px;
  background: #e5e7eb;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.burger.open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  background: radial-gradient(circle at top, rgba(79, 70, 229, 0.22), transparent 55%),
    rgba(2, 6, 23, 0.98);
}

.mobile-menu.open {
  display: block;
}

.mobile-nav {
  padding: 10px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-section-title {
  margin-top: 4px;
  margin-bottom: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.mobile-nav-link {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}

.mobile-nav-link:hover {
  background: rgba(148, 163, 184, 0.16);
  color: var(--text-primary);
}

.mobile-nav-divider {
  height: 1px;
  margin: 10px 0;
  background: rgba(148, 163, 184, 0.22);
}

.mobile-cta {
  margin-top: 4px;
}

.site-main {
  padding-bottom: 48px;
}

.hero {
  padding: 32px 0 20px;
}

.hero h1 {
  font-size: clamp(26px, 4vw, 34px);
  margin: 0 0 14px;
}

.hero p {
  margin: 0 0 18px;
  max-width: 640px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.main-calculator {
  padding: 4px 0 26px;
}

.main-calculator-inner {
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.2), transparent 60%),
    rgba(15, 23, 42, 0.96);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 18px 16px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 18px;
}

.main-calculator-header h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.main-calculator-header p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.simple-bet-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

.form-row label {
  color: var(--text-secondary);
}

.input-with-suffix {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-suffix input {
  padding-right: 34px;
}

.input-suffix {
  position: absolute;
  right: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.simple-bet-form input[type="number"] {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.85);
  padding: 7px 12px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.simple-bet-form input[type="number"]:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.4);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.form-hint a {
  color: #c4b5fd;
}

.form-error {
  min-height: 16px;
  font-size: 12px;
  color: #fecaca;
  margin: 2px 0 0;
}

.simple-bet-result {
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.9);
  border: 1px dashed rgba(148, 163, 184, 0.7);
  padding: 10px 12px;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.result-row span {
  color: var(--text-secondary);
}

.result-row strong {
  font-weight: 600;
}

.result-note {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.calc-cta-wrap {
  margin-top: 16px;
  margin-bottom: 0;
}

.calc-cta-wrap .btn-cta {
  display: block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

.calc-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 14px;
}

.calc-table th,
.calc-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.calc-table th {
  color: var(--text-muted);
  font-weight: 600;
}

.calc-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.calculators-list {
  padding: 8px 0 32px;
}

.calculators-list h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.card {
  background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.12), transparent 60%),
    rgba(15, 23, 42, 0.96);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 14px 14px 12px;
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.card h3 a {
  color: var(--text-primary);
}

.card h3 a:hover {
  color: #bfdbfe;
}

.card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.about {
  padding: 0 0 32px;
}

.about h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.about p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 10px;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(2, 6, 23, 0.98);
  padding: 18px 0 24px;
  font-size: 13px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}

.footer-col {
  min-width: 220px;
}

.footer-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-text {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.footer-age {
  font-weight: 500;
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .burger {
    display: inline-flex;
  }

  .hero {
    padding-top: 22px;
  }

  .main-calculator-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
}

