:root {
  --navy: #000080;
  --teal: #008080;
  --lime: #00ff00;
  --magenta: #ff00ff;
  --cyan: #00ffff;
  --yellow: #ffff00;
  --silver: #c0c0c0;
  --win-bg: #008080;
  --text: #000000;
  --link: #0000ee;
  --visited: #551a8b;
  /* Pilns latviešu alfabēts (ā, č, ē, ģ, ī, ķ, ļ, ņ, š, ū, ž) */
  --font-ui: 'Tahoma', 'Verdana', 'Segoe UI', 'Exo 2', Geneva, sans-serif;
  --font-display: 'Exo 2', 'Tahoma', 'Verdana', sans-serif;
  --font-mono: 'Consolas', 'Lucida Console', 'Courier New', monospace;
}

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

html { scroll-behavior: auto; }

body {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text);
  min-height: 100vh;
  background: var(--win-bg);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='24'%3E%3Cpath fill='%23fff' stroke='%23000' d='M0 0 L0 18 L4 14 L7 22 L9 21 L6 13 L11 13 Z'/%3E%3C/svg%3E") 0 0, auto;
}

/* Fona video (aizvieto Three.js / zvaigžņu fonu) */
.video-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
}

.video-bg__media {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  pointer-events: none;
}

.video-bg__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 128, 128, 0.35) 50%, rgba(0, 0, 0, 0.55) 100%),
    rgba(0, 0, 80, 0.25);
  pointer-events: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.08) 0px,
    rgba(0, 0, 0, 0.08) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.35;
}

/* Marquee */
.marquee-wrap {
  position: relative;
  z-index: 20;
  background: linear-gradient(90deg, var(--navy), #0000aa, var(--navy));
  border-bottom: 3px ridge var(--silver);
  overflow: hidden;
}

.marquee {
  display: inline-block;
  white-space: nowrap;
  padding: 8px 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--lime);
  text-shadow: 2px 2px #000, 0 0 8px var(--cyan);
  animation: marquee-scroll 18s linear infinite;
}

@keyframes marquee-scroll {
  0% { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

.retro-banner {
  position: relative;
  z-index: 20;
  text-align: center;
  padding: 6px;
  background: var(--yellow);
  color: var(--navy);
  font-weight: bold;
  font-size: 12px;
  border-bottom: 2px inset var(--silver);
  animation: banner-flash 2s step-end infinite;
}

@keyframes banner-flash {
  50% { background: #ff9900; color: #000; }
}

.top-bar {
  position: relative;
  z-index: 15;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 12px;
  max-width: 900px;
  margin: 0 auto;
  background: var(--silver);
  border: 2px outset #fff;
}

.win95-bar { box-shadow: 2px 2px 0 #404040; }

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

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pixel-icon {
  image-rendering: pixelated;
  border: 1px solid #000;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.visitor-box {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  background: #000;
  color: var(--lime);
  padding: 4px 10px;
  border: 2px inset var(--silver);
}

.hit-counter {
  font-weight: bold;
  letter-spacing: 2px;
}

.lang-switch {
  display: flex;
  gap: 2px;
  background: var(--silver);
  border: 2px outset #fff;
  padding: 2px;
}

.lang {
  border: 2px outset #fff;
  background: var(--silver);
  font-family: 'Tahoma', sans-serif;
  font-size: 10px;
  font-weight: bold;
  padding: 4px 7px;
  cursor: pointer;
  min-width: 2.4em;
}

.lang:active { border-style: inset; }
.lang.active {
  background: var(--navy);
  color: #fff;
  border-style: inset;
}

.site-frame {
  position: relative;
  z-index: 10;
  max-width: 900px;
  margin: 12px auto;
  padding: 0 8px 24px;
}

main { }

/* Windows 95 window chrome */
.retro-window {
  background: var(--silver);
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  margin-bottom: 16px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

.window-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 4px;
  background: linear-gradient(90deg, var(--navy), #1084d0);
  color: #fff;
  font-family: 'Tahoma', sans-serif;
  font-size: 11px;
  font-weight: bold;
}

.window-titlebar.mini {
  font-size: 10px;
  padding: 2px 6px;
}

.win-buttons {
  display: flex;
  gap: 2px;
}

.win-buttons i {
  display: block;
  width: 14px;
  height: 12px;
  background: var(--silver);
  border: 1px outset #fff;
}

.window-body {
  padding: 16px;
  background: #d4d0c8;
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
}

.hero { text-align: center; }

.badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--navy);
  font-weight: bold;
  padding: 4px 12px;
  border: 2px ridge var(--navy);
  margin-bottom: 12px;
  font-size: 13px;
}

.blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; visibility: hidden; }
}

h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.25rem, 4.5vw, 1.85rem);
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.rainbow-text,
h1.accent,
h1 .accent {
  background: linear-gradient(
    90deg,
    #ff0000, #ff9900, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  /* Krāso tikai tekstu, lai diakritikas (ī, ē, ā) netiktu «nogrieztas» */
  display: inline-block;
  animation: rainbow-move 4s linear infinite;
}

h1 .line {
  display: block;
  padding: 0.05em 0;
}

@keyframes rainbow-move {
  to { background-position: 200% center; }
}

.subtitle {
  max-width: 600px;
  margin: 0 auto 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #000;
}

.pulse-cta { margin: 16px 0; }

.retro-btn,
.cta {
  display: inline-block;
  padding: 12px 28px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  color: #000;
  background: linear-gradient(180deg, #ffff00 0%, #ff9900 50%, #ff6600 100%);
  border: 3px outset #fff;
  box-shadow: 4px 4px 0 #000;
  text-transform: uppercase;
}

.retro-btn:hover {
  background: linear-gradient(180deg, #ffff99 0%, #ffcc00 50%, #ff9900 100%);
  color: var(--navy);
}

.retro-btn:active {
  border-style: inset;
  box-shadow: 1px 1px 0 #000;
  transform: translate(2px, 2px);
}

.hint {
  font-size: 12px;
  color: #333;
  font-style: italic;
}

.rainbow-hr {
  border: none;
  height: 6px;
  margin-top: 16px;
  background: linear-gradient(90deg, red, orange, yellow, green, cyan, blue, magenta, red);
  background-size: 200% 100%;
  animation: rainbow-move 3s linear infinite;
}

.panel {
  background: #ece9d8;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  padding: 0;
  margin-bottom: 16px;
}

.panel .window-body,
.charts-panel > .window-body,
.panel:not(.retro-window) {
  padding: 16px;
  background: #fff;
  border: 2px inset var(--silver);
  margin: 4px;
}

.panel h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 10px;
  text-decoration: underline;
}

/* Statistikas virsraksts — laikraksta stils */
.stats-masthead {
  text-align: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 3px double var(--navy);
}

.section-tag {
  display: inline-block;
  font-family: Georgia, 'Times New Roman', 'Palatino Linotype', serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 0.65rem;
  padding: 0 0.5rem;
}

.section-tag::before,
.section-tag::after {
  content: ' — ';
  letter-spacing: 0.1em;
  color: var(--navy);
}

.stats-headline {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.35;
  color: var(--navy);
  margin-bottom: 0.75rem;
  text-decoration: none;
  text-shadow: none;
}

.stats-deck,
.chart-lead {
  margin-bottom: 0;
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  line-height: 1.55;
  color: #1a1a1a;
  text-align: justify;
  hyphens: auto;
}

/* Avotu norāde — «Cīņa» / preses kājene */
.newspaper-sources {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem 0.85rem;
  background: #f8f4e8;
  border: 1px solid #8b7355;
  border-top: 3px double var(--navy);
  font-family: Georgia, 'Times New Roman', 'Palatino Linotype', serif;
}

.sources-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #333;
  margin-bottom: 0.65rem;
  text-align: center;
}

.sources-list {
  margin: 0 0 0.75rem 1.25rem;
  padding: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #222;
}

.sources-list li {
  margin-bottom: 0.35rem;
  padding-left: 0.25rem;
}

.sources-list li::marker {
  font-weight: 700;
  color: var(--navy);
}

.sources-editor {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #555;
  font-style: italic;
  text-align: justify;
  border-top: 1px solid #c4b896;
  padding-top: 0.65rem;
  margin: 0;
}

.sources-editor::before {
  content: '— ';
}

.chart-grid { display: flex; flex-direction: column; gap: 10px; }

.bar-row {
  opacity: 0;
  transform: none;
  transition: opacity 0.4s;
}

.bar-row.visible { opacity: 1; }

.bar-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 2px;
}

.bar-value { color: var(--navy); font-weight: bold; }

.bar-track {
  height: 18px;
  background: #000;
  border: 2px inset var(--silver);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  transition: width 1.5s steps(12);
  image-rendering: pixelated;
}

.bar-fill.gold {
  background: repeating-linear-gradient(
    90deg,
    #ffff00 0px, #ffff00 8px,
    #ff9900 8px, #ff9900 16px
  );
}
.bar-fill.cyan {
  background: repeating-linear-gradient(90deg, #00ffff 0px, #00ffff 8px, #0080ff 8px, #0080ff 16px);
}
.bar-fill.purple {
  background: repeating-linear-gradient(90deg, #ff00ff 0px, #ff00ff 8px, #8000ff 8px, #8000ff 16px);
}
.bar-fill.rose {
  background: repeating-linear-gradient(90deg, #ff6699 0px, #ff6699 8px, #ff0066 8px, #ff0066 16px);
}
.bar-fill.pulse-bar {
  background: linear-gradient(90deg, #ff0, #f0f, #0ff, #ff0);
  background-size: 200% 100%;
  animation: rainbow-move 1s linear infinite;
}

.mega-stat {
  text-align: center;
  margin: 20px 0;
  padding: 16px;
  background: #000;
  border: 4px double var(--lime);
}

.mega-ring { display: none; }

.mega-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 8vw, 3rem);
  color: var(--lime);
  text-shadow: 0 0 10px var(--lime);
}

.mega-pct {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  color: var(--cyan);
}

.mega-label {
  margin-top: 8px;
  color: #ccc;
  font-size: 12px;
}

.chart-sub {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  margin: 16px 0 10px;
}

.country-charts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: end;
}

.vertical-style {
  text-align: center;
  background: #c0c0c0;
  padding: 8px;
  border: 2px inset #fff;
}

.bar-track.tall {
  width: 48px;
  height: 120px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  background: #000;
  border: 2px inset var(--silver);
}

.bar-track.tall .bar-fill {
  width: 100% !important;
  height: 0;
  transition: height 1.5s steps(10);
}

.vertical-style.visible .bar-track.tall .bar-fill {
  height: var(--bar-height, 0%);
}

.active-lv {
  border: 3px solid var(--magenta);
  animation: lv-blink 1s step-end infinite;
}

@keyframes lv-blink {
  50% { border-color: var(--yellow); }
}


.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--silver);
  border: 2px outset #fff;
  padding: 12px;
  text-align: center;
}

.stat-card.highlight {
  background: var(--yellow);
  border-color: var(--navy);
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.stat-label { font-size: 11px; font-weight: bold; }

.seo-text a { color: var(--link); }

.seo-text a:visited { color: var(--visited); }

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

.baltic-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 2px;
  font-size: 13px;
  background: var(--navy);
}

.baltic-table th,
.baltic-table td {
  padding: 8px 10px;
  border: 1px solid #000;
  background: #fff;
}

.baltic-table th {
  background: var(--navy);
  color: #fff;
  font-family: 'Tahoma', sans-serif;
  font-size: 11px;
}

.baltic-table tr.completed td {
  background: #ccffcc;
}

.baltic-table tr.active td {
  background: #ffff99;
  animation: row-blink 1.5s step-end infinite;
}

@keyframes row-blink {
  50% { background: #ffccff; }
}

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid #000;
}

.status-pill.done {
  background: var(--lime);
  color: #000;
}

.status-pill.progress {
  background: var(--magenta);
  color: #fff;
  animation: blink 1s step-end infinite;
}

.panel.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: transparent;
  border: none;
}

.panel.split > div {
  background: #fff;
  border: 2px inset var(--silver);
  padding: 12px;
  margin: 0;
}

.pros h2 { color: #008000; }
.cons h2 { color: #ff0000; }

.panel ul { list-style: square; margin-left: 20px; }

.panel li {
  margin-bottom: 6px;
  color: #000;
}

.quote-panel {
  text-align: center;
  background: #000;
  color: var(--lime);
  border: 4px ridge var(--cyan);
  padding: 20px !important;
}

.quote-panel blockquote {
  font-family: 'Comic Sans MS', 'Comic Sans', var(--font-ui);
  font-size: 1.1rem;
  color: var(--yellow);
  margin-bottom: 16px;
  line-height: 1.5;
}

.cta.secondary {
  background: linear-gradient(180deg, #c0c0c0, #808080);
  font-size: 13px;
  color: #000;
}

.retro-footer {
  position: relative;
  z-index: 15;
  text-align: center;
  padding: 16px;
  background: var(--silver);
  border-top: 3px ridge #fff;
  font-size: 11px;
}

.retro-footer img {
  margin: 0 6px 8px;
  border: 1px solid #000;
  vertical-align: middle;
}

.email-blink {
  color: var(--link);
  text-decoration: underline;
  animation: blink 1.2s step-end infinite;
}

#sparkle-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  overflow: hidden;
}

.sparkle {
  position: absolute;
  font-size: 14px;
  pointer-events: none;
  animation: sparkle-fade 0.8s ease-out forwards;
}

@keyframes sparkle-fade {
  to { opacity: 0; transform: scale(0) translateY(-20px); }
}

a { color: var(--link); }
a:visited { color: var(--visited); }

/* —— Pensiju Kalkulators™ (oficiālais joks) —— */
.hero.retro-window {
  padding: 0;
}

.hero.retro-window > .window-titlebar {
  margin: 0;
}

.casino-wrap.nested {
  margin: 0;
  border: none;
  border-bottom: 2px solid #404040;
  box-shadow: none;
}

.casino-wrap.standalone {
  margin-top: -4px;
}

.casino-wrap .casino-bar {
  background: linear-gradient(90deg, #000080, #0000aa);
}

.casino-body {
  position: relative;
  padding: 12px 14px 16px;
  background: linear-gradient(180deg, #140722 0%, #31134d 45%, #0d0618 100%);
  background-size: 100% 180%;
  animation: casino-bg-flow 6s ease-in-out infinite alternate;
  border: 2px inset #404040;
  margin: 4px;
  overflow: hidden;
}

.casino-body::before {
  content: "";
  position: absolute;
  inset: -50% -20%;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(0, 255, 255, 0.08) 0 12px, rgba(255, 0, 180, 0.08) 12px 24px);
  animation: casino-hypno 14s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.casino-body > * {
  position: relative;
  z-index: 1;
}

@keyframes casino-bg-flow {
  from { background-position: 0 0; }
  to { background-position: 0 100%; }
}

@keyframes casino-hypno {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(360deg) scale(1.05); }
}

.casino-tagline {
  text-align: center;
  font-size: 10px;
  color: var(--cyan);
  margin: 0 0 4px;
  font-style: italic;
  letter-spacing: 0.02em;
}

.casino-disclaimer {
  text-align: center;
  font-size: 10px;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: bold;
  line-height: 1.35;
}

.casino-machine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "reels controls"
    "readout controls"
    "result result";
  gap: 12px;
  align-items: start;
  padding: 10px;
  background: #000;
  border: 4px ridge var(--gold);
  border-radius: 4px;
  box-shadow: inset 0 0 30px rgba(255, 213, 74, 0.15);
  animation: machine-breathe 2.4s ease-in-out infinite;
}

.casino-machine.machine-win {
  animation: machine-shake 0.4s ease-in-out 3;
  box-shadow: 0 0 40px var(--gold), inset 0 0 40px rgba(255, 0, 100, 0.4);
}

.casino-machine.machine-vegas {
  animation: machine-vegas 0.45s step-end infinite;
  box-shadow:
    0 0 10px rgba(255, 0, 255, 0.7),
    0 0 22px rgba(0, 255, 255, 0.65),
    inset 0 0 40px rgba(255, 213, 74, 0.35);
}

@keyframes machine-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px) rotate(-0.5deg); }
  75% { transform: translateX(4px) rotate(0.5deg); }
}

@keyframes machine-vegas {
  0% { filter: hue-rotate(0deg) brightness(1); transform: translateX(0); }
  25% { filter: hue-rotate(30deg) brightness(1.14); transform: translateX(-1px); }
  50% { filter: hue-rotate(60deg) brightness(1.24); transform: translateX(1px); }
  75% { filter: hue-rotate(90deg) brightness(1.14); transform: translateX(-1px); }
  100% { filter: hue-rotate(120deg) brightness(1); transform: translateX(0); }
}

@keyframes machine-breathe {
  0%, 100% { box-shadow: inset 0 0 30px rgba(255, 213, 74, 0.15); }
  50% { box-shadow: inset 0 0 45px rgba(0, 255, 255, 0.22); }
}

.reels-frame {
  grid-area: reels;
  position: relative;
  background: linear-gradient(180deg, #222, #111);
  padding: 8px;
  border: 3px inset var(--silver);
}

.reels-frame::before,
.reels-frame::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 8px;
  z-index: 2;
  pointer-events: none;
}

.reels-frame::before {
  top: 8px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent);
}

.reels-frame::after {
  bottom: 8px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent);
}

.reels {
  display: grid;
  grid-template-columns: repeat(6, minmax(34px, 1fr));
  gap: 4px;
}

.reel {
  width: 100%;
  height: 44px;
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 2px inset #000;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
  animation: reel-glow 1.8s ease-in-out infinite;
}

.reel-digit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: bold;
  color: #000;
  background: linear-gradient(180deg, #fff 0%, #e0e0e0 50%, #fff 100%);
}

.reel-strip {
  display: block;
  width: 100%;
  will-change: transform;
}

.casino-readout {
  grid-area: readout;
  text-align: center;
  min-width: 180px;
  background: #100d20;
  border: 2px inset #404040;
  padding: 8px 10px;
}

.readout-label {
  font-size: 11px;
  color: #ccc;
  margin-bottom: 4px;
}

.readout-total {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: bold;
  color: var(--lime);
  text-shadow: 0 0 12px var(--lime);
  letter-spacing: 0.1em;
  line-height: 1;
  animation: total-pulse 1s ease-in-out infinite;
}

@keyframes reel-glow {
  0%, 100% { box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5), 0 0 0 rgba(0, 255, 255, 0); }
  50% { box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.6), 0 0 8px rgba(0, 255, 255, 0.3); }
}

@keyframes total-pulse {
  0%, 100% { text-shadow: 0 0 10px var(--lime); }
  50% { text-shadow: 0 0 18px var(--lime), 0 0 28px rgba(255, 255, 0, 0.35); }
}

.readout-spins {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}

.casino-result {
  grid-area: result;
  text-align: center;
  min-height: 1.4em;
  font-weight: bold;
  font-size: 13px;
  color: var(--cyan);
}

.casino-result.is-win {
  color: var(--gold);
  font-size: 1.1rem;
  animation: blink 0.5s step-end infinite;
}

.casino-controls {
  grid-area: controls;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 110px;
}

.slot-lever {
  position: relative;
  width: 56px;
  height: 100px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.slot-lever:disabled {
  cursor: wait;
  opacity: 0.6;
}

.lever-base {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 14px;
  background: linear-gradient(180deg, #888, #333);
  border: 2px outset #aaa;
  border-radius: 4px;
}

.lever-arm {
  position: absolute;
  bottom: 10px;
  left: 50%;
  width: 10px;
  height: 58px;
  margin-left: -5px;
  background: linear-gradient(90deg, #600, #f00, #600);
  border: 1px solid #300;
  border-radius: 4px;
  transform-origin: bottom center;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.lever-knob {
  position: absolute;
  bottom: 58px;
  left: 50%;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff6, var(--gold), #a60);
  border: 3px outset #ffe;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: lever-pulse 1.2s ease-in-out infinite;
}

@keyframes lever-pulse {
  0%, 100% { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); }
  50% { box-shadow: 0 2px 10px rgba(255, 213, 74, 0.8); }
}

.slot-lever.pulled .lever-arm,
.slot-lever.pulled .lever-knob {
  transform: rotate(28deg);
}

.casino-spin-btn {
  font-size: 11px;
  padding: 8px 14px;
}

.casino-spin-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.win-fx {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
  background: rgba(0, 0, 0, 0.55);
}

.win-fx.active {
  opacity: 1;
  animation: win-flash 0.35s step-end 6;
}

.win-fx.vegas {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 120, 0.22), rgba(0, 0, 0, 0.8) 65%),
    linear-gradient(90deg, rgba(255, 0, 221, 0.24), rgba(0, 255, 255, 0.24));
  animation: vegas-strobe 0.14s step-end infinite;
}

.win-fx.vegas::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    conic-gradient(from 0deg, rgba(255, 0, 255, 0.24), rgba(0, 255, 255, 0.24), rgba(255, 255, 0, 0.18), rgba(255, 0, 255, 0.24));
  animation: vegas-wheel 2s linear infinite;
  pointer-events: none;
}

.win-fx.vegas::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 10px, transparent 10px 20px);
  animation: vegas-scan 0.8s linear infinite;
  mix-blend-mode: screen;
  pointer-events: none;
}

.win-fx.vegas .win-text {
  font-size: 1.55rem;
  color: #fff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow:
    0 0 10px #ff00ff,
    0 0 22px #00ffff,
    0 0 34px #fff,
    2px 2px #000;
  animation: vegas-text 0.55s ease-in-out infinite;
}

.win-fx.vegas .win-star {
  font-size: 2.4rem;
  animation: vegas-star 0.42s linear infinite;
}

.win-fx.vegas.neutral .win-text { color: #fffa9c; }
.win-fx.vegas.win .win-text { color: #9cff9c; }
.win-fx.vegas.jackpot .win-text { color: #ffffff; font-size: 1.7rem; }

@keyframes vegas-strobe {
  0% { opacity: 0.86; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.3); }
  100% { opacity: 0.86; filter: brightness(1); }
}

@keyframes vegas-wheel {
  to { transform: rotate(360deg) scale(1.1); }
}

@keyframes vegas-scan {
  from { transform: translateX(-25%); }
  to { transform: translateX(25%); }
}

@keyframes vegas-text {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes vegas-star {
  to { transform: rotate(360deg) scale(1.12); }
}

.win-fx.jackpot .win-text {
  font-size: 1.6rem;
  color: #fff;
}

.win-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 20px var(--magenta), 2px 2px #000;
}

.win-star {
  font-size: 2rem;
  color: var(--yellow);
  animation: spin-star 0.8s linear infinite;
}

@keyframes spin-star {
  to { transform: rotate(360deg); }
}

@keyframes win-flash {
  0%, 100% { background: rgba(255, 0, 100, 0.35); }
  50% { background: rgba(255, 213, 74, 0.45); }
}

body.casino-celebrate .marquee-wrap {
  animation: marquee-scroll 8s linear infinite, win-flash 0.4s step-end infinite;
}

body.casino-vegas .casino-body::before {
  opacity: 0.95;
  filter: hue-rotate(160deg) saturate(2);
  animation-duration: 1.2s;
}

@media (max-width: 768px) {
  .stats-row, .country-charts, .panel.split { grid-template-columns: 1fr; }
  .marquee { font-size: 1rem; }
  .top-bar { flex-direction: column; align-items: stretch; }
  .casino-machine {
    grid-template-columns: 1fr;
    grid-template-areas:
      "reels"
      "readout"
      "controls"
      "result";
  }
  .reels { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .reel-digit { font-size: 1.4rem; height: 40px; }
  .reel { height: 40px; }
  .casino-readout { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee, .blink, .rainbow-text, .retro-banner,
  .win-fx.active, .machine-win, body.casino-celebrate .marquee-wrap,
  .casino-body, .casino-body::before, .casino-machine, .machine-vegas,
  .reel, .readout-total, .lever-knob, body.casino-vegas .casino-body::before {
    animation: none !important;
  }

  .reel-strip { transition: none !important; }

  .video-bg__media {
    display: none;
  }

  .video-bg {
    background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Ccircle cx='20' cy='30' r='2' fill='%23fff'/%3E%3Ccircle cx='90' cy='40' r='1' fill='%230ff'/%3E%3C/svg%3E") repeat;
  }
}
