:root {
  --bg: #06080f;
  --bg-alt: #0b1325;
  --surface: #121b31;
  --surface-soft: rgba(255, 255, 255, 0.06);
  --accent: #61ffca;
  --accent-strong: #f5a623;
  --text: #f4f8ff;
  --muted: rgba(244, 248, 255, 0.7);
  --border: rgba(255, 255, 255, 0.12);
  --danger: #ff5686;
  font-family: 'Space Grotesk', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #102040 0%, #05060a 70%);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 28px;
  background: linear-gradient(135deg, rgba(97, 255, 202, 0.1), rgba(9, 17, 41, 0.9));
  border: 1px solid var(--border);
  border-radius: 24px;
  backdrop-filter: blur(18px);
}

.hero h1 {
  margin: 4px 0 8px;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
}

.hero .subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.4;
}

.hero-accent {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  color: rgba(97, 255, 202, 0.8);
}

.accent-number {
  font-size: clamp(1.8rem, 4.8vw, 3.4rem);
  font-weight: 700;
}

.hero-date {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: rgba(244, 248, 255, 0.7);
}

.lang-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-label {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: rgba(244, 248, 255, 0.65);
}

.lang-picker select {
  background: rgba(6, 14, 28, 0.6);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 6px 28px 6px 14px;
  font-size: 0.85rem;
  appearance: none;
  cursor: pointer;
}

.lang-picker::after {
  content: '⌄';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  pointer-events: none;
  color: rgba(244, 248, 255, 0.7);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0;
}

.subtitle {
  color: var(--muted);
}

.lotto-app {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.controls-strip {
  display: flex;
  gap: 16px;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 16px 20px;
}

.mode-block {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.actions-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 1px solid var(--border);
  padding-left: 16px;
}

.experience-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 24px;
  align-items: stretch;
  width: 100%;
}

.arena-stack {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.arena-wrapper {
  background: var(--surface);
  border-radius: 28px;
  padding: 24px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 420px;
}

.arena {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: radial-gradient(circle at 30% 30%, rgba(97, 255, 202, 0.1), rgba(6, 8, 15, 0.9));
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.6);
}

.arena canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.orb-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 50%;
  box-shadow: inset 0 0 35px rgba(97, 255, 202, 0.25);
}

.arena-caption {
  text-align: center;
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}

.side-panel {
  flex: 1;
  display: flex;
}

.mode-control .label {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.mode-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 8px;
  position: relative;
}

.mode-buttons::after {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: calc(50% - 0.5px);
  width: 1px;
  background: var(--border);
  pointer-events: none;
}

.mode-btn {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mode-btn.active {
  background: linear-gradient(135deg, rgba(97, 255, 202, 0.25), rgba(97, 255, 202, 0.05));
  border-color: rgba(97, 255, 202, 0.4);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(97, 255, 202, 0.15);
}

.mode-btn:focus-visible,
.action-btn:focus-visible,
.ghost-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.primary-actions {
  display: flex;
  gap: 10px;
  position: relative;
}

.primary-actions::after {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 50%;
  width: 1px;
  background: var(--border);
  pointer-events: none;
}

.action-btn,
.ghost-btn {
  flex: 1;
  padding: 8px 12px;
  border-radius: 999px;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.action-btn {
  background: linear-gradient(135deg, #61ffca, #2dd7ff);
  color: #04121a;
  box-shadow: 0 12px 24px rgba(0, 255, 214, 0.25);
}

.action-btn.holding {
  background: linear-gradient(135deg, #ffe29d, #ffa99f);
  box-shadow: 0 12px 18px rgba(255, 169, 159, 0.25);
}

.action-btn:active {
  transform: translateY(1px);
}

.ghost-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.ghost-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.meta-text {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.results-panel {
  background: var(--surface);
  border-radius: 28px;
  padding: 22px;
  border: 1px solid var(--border);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.results-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.results-list {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
}

.results-list.empty {
  color: var(--muted);
  display: block;
}

.result-set {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  width: 100%;
  overflow: hidden;
}

.result-set .label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.result-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
}

.number-pill {
  flex: 1;
  min-width: 0;
  padding: 4px 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  text-align: center;
  white-space: nowrap;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.number-pill.color-yellow {
  background: rgba(251, 196, 0, 0.85);
  color: #1c1200;
}

.number-pill.color-blue {
  background: rgba(105, 200, 242, 0.85);
  color: #031225;
}

.number-pill.color-red {
  background: rgba(255, 114, 114, 0.85);
  color: #2a0202;
}

.number-pill.color-gray {
  background: rgba(170, 170, 170, 0.82);
  color: #0f0f0f;
}

.number-pill.color-green {
  background: rgba(155, 224, 90, 0.85);
  color: #071602;
}

.number-pill.service {
  background: rgba(245, 166, 35, 0.15);
  color: var(--accent-strong);
  margin-left: 16px;
}

.service-divider {
  flex: 0;
  color: var(--accent-strong);
  font-weight: 700;
  font-size: 1rem;
  padding: 0 4px;
}

@media (max-width: 1100px) {
  .experience-layout {
    flex-direction: column;
  }

  .arena-stack {
    flex: none;
  }
}

@media (max-width: 960px) {
  .hero {
    flex-direction: column;
    text-align: left;
  }

  .hero-accent {
    align-self: flex-start;
  }

  .primary-actions {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .page-shell {
    padding: 32px 16px 48px;
  }

  .arena-wrapper,
  .control-panel,
  .results-panel {
    padding: 20px;
  }

  .arena {
    width: min(280px, 80vw);
    height: min(280px, 80vw);
  }
}
