:root {
  --primary: #17365d;
  --primary-light: #24548c;
  --primary-dark: #0f2540;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --gold: #f59e0b;
  --bg: #eef4fb;
  --card: #ffffff;
  --text: #142133;
  --muted: #5f6f82;
  --border: #d7e2ee;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 12px 28px rgba(15, 37, 64, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 32%),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.support-shell { min-height: 100vh; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  box-shadow: 0 8px 20px rgba(15, 37, 64, 0.18);
}

.site-header-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.4rem;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.support-strip {
  background: rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.support-strip-inner,
.game-nav-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.support-strip-inner a,
.game-nav-inner a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  padding: 11px 14px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  font-weight: 600;
}

.support-strip-inner a:hover,
.game-nav-inner a:hover,
.support-strip-inner a.active,
.game-nav-inner a.active {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
}

.page-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
}

.hero-card,
.panel,
.content-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 28px;
  margin-bottom: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}

.hero-card h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  color: var(--primary-dark);
}

.hero-card p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 820px;
}

.metrics-grid,
.support-card-grid,
.steps-grid,
.faq-grid,
.draw-card-grid,
.frequency-grid {
  display: grid;
  gap: 16px;
}

.metrics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

.metric-card {
  padding: 18px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.metric-label {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.content-card {
  padding: 24px;
  margin-bottom: 24px;
}

.section-title {
  margin: 0 0 10px;
  font-size: 1.45rem;
  color: var(--primary-dark);
}

.section-copy {
  margin: 0 0 18px;
  color: var(--muted);
}

.draw-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.draw-card {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.draw-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.draw-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.draw-card-meta {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.ball-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ball {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #60a5fa 100%);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.18);
}

.ball.star {
  background: linear-gradient(135deg, var(--gold) 0%, #fbbf24 100%);
  color: #5b3700;
}

.frequency-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.frequency-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
}

.frequency-bar-wrap {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #e7eef7;
}

.frequency-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, #7dd3fc 100%);
}

.frequency-count {
  font-weight: 800;
  color: var(--primary-dark);
}

.support-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.support-link-card {
  display: block;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.support-link-card:hover {
  transform: translateY(-2px);
  text-decoration: none;
  border-color: #9fc3f7;
  box-shadow: 0 10px 20px rgba(15, 37, 64, 0.08);
}

.support-link-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
}

.support-link-card span {
  color: var(--muted);
  font-size: 0.94rem;
}

.steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.step-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  background: #fbfdff;
}

.step-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 1rem;
}

.rule-list,
.latest-results-list,
.sidebar-link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rule-list li,
.latest-results-list li,
.sidebar-link-list li {
  padding: 12px 0;
  border-bottom: 1px solid #edf2f8;
}

.rule-list li:last-child,
.latest-results-list li:last-child,
.sidebar-link-list li:last-child {
  border-bottom: 0;
}

.rule-list strong { color: var(--primary-dark); }

.panel {
  padding: 22px;
  margin-bottom: 22px;
}

.panel h3 {
  margin: 0 0 14px;
  font-size: 1.25rem;
  color: var(--primary-dark);
}

.last-updated {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f4f8fd;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.latest-results-list a,
.sidebar-link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
}

.latest-results-list small,
.sidebar-link-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 500;
}

.checker-form {
  display: grid;
  gap: 14px;
}

.checker-form label {
  font-weight: 700;
  color: var(--primary-dark);
}

.checker-input,
.checker-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--text);
  background: #fff;
}

.checker-button {
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
  cursor: pointer;
}

.checker-result {
  border-radius: 16px;
  padding: 16px;
  background: #f8fbff;
  border: 1px solid var(--border);
}

.checker-hit { color: var(--success); font-weight: 800; }
.checker-miss { color: var(--danger); font-weight: 800; }

.faq-grid details {
  background: #fbfdff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
}

.faq-grid summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--primary-dark);
}

.faq-grid p {
  margin: 12px 0 0;
  color: var(--muted);
}

.site-footer {
  margin-top: 30px;
  background: linear-gradient(180deg, var(--primary-dark) 0%, #0a1a2d 100%);
  color: rgba(255, 255, 255, 0.82);
}

.site-footer-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 28px 20px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
}

.site-footer h4 {
  margin: 0 0 12px;
  color: #fff;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li { margin-top: 8px; }

.site-footer a { color: rgba(255, 255, 255, 0.85); }

.site-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 20px 26px;
  max-width: 1380px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

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

@media (max-width: 820px) {
  .metrics-grid,
  .support-card-grid,
  .steps-grid,
  .draw-card-grid,
  .frequency-grid,
  .site-footer-inner {
    grid-template-columns: 1fr;
  }

  .site-header-inner { padding: 12px 16px; }
  .page-shell { padding: 22px 16px 32px; }
  .hero-card,
  .content-card,
  .panel { padding: 20px; }
}
