:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-subtle: #0f1419;
  --surface: #141a22;
  --surface-muted: #0e1218;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --muted: #8b9cb3;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-muted: rgba(59, 130, 246, 0.18);
  --focus-ring: rgba(96, 165, 250, 0.32);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md:
    0 16px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06);
  --rules-bg: #10161f;
  --ticket-row-bg: #10161f;
  --flash-bg: rgba(127, 29, 29, 0.28);
  --flash-border: rgba(248, 113, 113, 0.32);
  --flash-text: #fecaca;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 110% 70% at 50% -25%, rgba(59, 130, 246, 0.14), transparent 55%),
    linear-gradient(180deg, #0e131b 0%, var(--bg) 42%, #080a0e 100%);
  background-attachment: fixed;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem 2rem;
}

.brand {
  width: min(100%, 440px);
  margin-bottom: 1.25rem;
}

/* Gradient frame + inner panel: reads as one branded “product” tile */
.brand__shell {
  border-radius: calc(var(--radius-lg) + 2px);
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.35) 0%,
    rgba(148, 163, 184, 0.12) 45%,
    rgba(59, 130, 246, 0.08) 100%
  );
  box-shadow:
    0 4px 28px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04);
}

.brand__lockup {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1rem 1.25rem;
  padding: 0.85rem 0.85rem 0.85rem 1.2rem;
  border-radius: var(--radius-lg);
  background: rgba(10, 14, 20, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.brand__visual {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  align-self: stretch;
  margin: -0.15rem -0.15rem -0.15rem 0;
  padding: 0 0.15rem 0 0.25rem;
}

.brand__logo {
  display: block;
  height: clamp(6.5rem, 32vw, 9rem);
  width: auto;
  object-fit: contain;
  object-position: center right;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.4));
}

.brand__text {
  flex: 1;
  min-width: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.35rem 0;
}

.brand__title {
  margin: 0;
  font-size: clamp(1.15rem, 3.2vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.2;
}

.brand__title::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 3px;
  margin-top: 0.55rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-hover), var(--accent), transparent);
}

.brand__tagline {
  margin: 0.65rem 0 0;
  font-size: clamp(0.8125rem, 2.4vw, 0.875rem);
  font-weight: 500;
  color: var(--muted);
  line-height: 1.5;
  max-width: 22rem;
}

@media (max-width: 520px) {
  .brand__lockup {
    flex-direction: column;
    text-align: center;
    padding: 1.15rem 1.1rem 1.2rem;
    gap: 0.85rem;
    align-items: center;
  }

  .brand__text {
    text-align: center;
    padding: 0;
  }

  .brand__visual {
    justify-content: center;
    margin: 0;
    padding: 0;
    align-self: center;
  }

  .brand__title::after {
    margin-left: auto;
    margin-right: auto;
  }

  .brand__tagline {
    margin-left: auto;
    margin-right: auto;
    max-width: 20rem;
  }

  .brand__logo {
    height: clamp(7rem, 48vw, 9.5rem);
    object-position: center;
  }
}

.card {
  width: min(100%, 440px);
  padding: 1.75rem 1.65rem 1.85rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.field {
  margin-bottom: 1.2rem;
}

.field:last-of-type {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

select,
input[type="number"] {
  width: 100%;
  padding: 0.65rem 0.8rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select:focus,
input[type="number"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.hint {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 500;
}

.rules-disclosure {
  margin-bottom: 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--rules-bg);
  overflow: hidden;
}

.rules-disclosure__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  user-select: none;
}

.rules-disclosure__summary::-webkit-details-marker {
  display: none;
}

.rules-disclosure__summary::after {
  content: "";
  flex-shrink: 0;
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid var(--border-strong);
  border-bottom: 2px solid var(--border-strong);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  margin-top: -0.15rem;
}

.rules-disclosure[open] .rules-disclosure__summary::after {
  transform: rotate(-135deg);
  margin-top: 0.1rem;
}

.rules-disclosure__body {
  padding: 0 0.85rem 0.85rem;
  border-top: 1px solid var(--border);
}

.rule-row {
  padding: 0.6rem 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.rule-row:first-of-type {
  border-top: none;
}

.rule-row__toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  cursor: pointer;
  margin: 0;
}

.rule-row__toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.rule-row__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.rule-row__source {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.rule-row__desc {
  margin: 0.4rem 0 0 1.35rem;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 450;
  line-height: 1.5;
  color: var(--text-secondary);
}

.rule-params {
  margin: 0.45rem 0 0 1.35rem;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(5rem, auto) 1fr;
  gap: 0.2rem 0.65rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.rule-params dt {
  margin: 0;
  font-weight: 600;
  color: var(--muted);
}

.rule-params dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.btn-primary {
  width: 100%;
  padding: 0.72rem 1rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  background: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.flash {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  background: var(--flash-bg);
  border: 1px solid var(--flash-border);
  color: var(--flash-text);
}

.results {
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
}

.results__heading {
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.ticket-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ticket-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-md);
  background: var(--ticket-row-bg);
  border: 1px solid var(--border);
}

.ticket-item__idx {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--accent-hover);
}

.ticket-item__balls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.ball--main {
  color: #0f172a;
  background: linear-gradient(165deg, #ffffff 0%, #e2e8f0 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.ball--euro {
  color: #fff;
  background: linear-gradient(180deg, var(--accent-hover) 0%, var(--accent) 100%);
  border: 1px solid rgba(96, 165, 250, 0.45);
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.35);
}

.ticket-sep {
  flex-shrink: 0;
  margin: 0 0.05rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
  user-select: none;
}

.site-disclaimer {
  width: min(100%, 40rem);
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: left;
}

.site-disclaimer__title {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.site-disclaimer__heading {
  margin: 1.25rem 0 0.45rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-disclaimer__p {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 450;
  line-height: 1.55;
  color: var(--muted);
}
