/* European Explorer Slots — site-aligned tokens */
.explorer-game {
  --eg-bg: var(--bg, #fffdf4);
  --eg-card: var(--card, #f3e4da);
  --eg-stroke: var(--stroke, #f9d7c0);
  --eg-black: var(--black, #170e09);
  --eg-button: var(--button, #a64402);
  --eg-grey: var(--grey, #785048);
  --rarity-common: #2e7d32;
  --rarity-rare: #1565c0;
  --rarity-epic: #7b1fa2;
  --rarity-legendary: #f9a825;
  --slot-size: clamp(72px, 9vw, 172px);
  padding: 32px 0 60px;
  background: var(--eg-bg);
}

.explorer-game .page-hero {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 24px;
  padding: 0 16px;
}

.explorer-game .page-hero h1 {
  font-family: Montserrat, var(--second-family);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--eg-black);
  margin-bottom: 8px;
}

.explorer-game .page-hero .subtitle {
  font-family: Lato, var(--font-family);
  font-size: 15px;
  color: var(--eg-grey);
  line-height: 1.5;
}

.explorer-play {
  margin-bottom: 32px;
}

.explorer-game .section-title {
  font-family: Montserrat, var(--second-family);
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--eg-black);
  margin-bottom: 6px;
}

.explorer-game .section-desc {
  font-size: 14px;
  color: var(--eg-grey);
  margin-bottom: 16px;
  max-width: 720px;
  line-height: 1.45;
}

/* Interactive Europe map — 20 countries */
#country-grid.country-grid {
  padding: 20px;
  min-height: 480px;
  margin-bottom: 20px;
  background: var(--eg-card);
  border: 1px solid var(--eg-stroke);
  border-radius: 12px;
}

.europe-interactive-map {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.country-path {
  fill: #e2e8f0;
  stroke: #ffffff;
  stroke-width: 1.5;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  outline: none;
}

.country-path:hover {
  fill: #93c5fd;
  stroke: #3b82f6;
  stroke-width: 2.5;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
  transform: translateY(-2px);
}

.country-path:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
  fill: #fcd34d;
}

.country-path.is-selected {
  fill: #3b82f6;
  stroke: #1e40af;
  stroke-width: 3;
  animation: pulse-selected 2s infinite;
  filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.8));
}

.country-path.rarity-common {
  fill: #cbd5e1;
}
.country-path.rarity-common:hover {
  fill: #94a3b8;
}
.country-path.rarity-common.is-selected {
  fill: #3b82f6;
}

.country-path.rarity-rare {
  fill: #a78bfa;
}
.country-path.rarity-rare:hover {
  fill: #8b5cf6;
}
.country-path.rarity-rare.is-selected {
  fill: #7c3aed;
}

.country-path.rarity-epic {
  fill: #f472b6;
}
.country-path.rarity-epic:hover {
  fill: #ec4899;
}
.country-path.rarity-epic.is-selected {
  fill: #db2777;
}

@keyframes pulse-selected {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(59, 130, 246, 0));
  }
  50% {
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.6));
  }
}

@media (prefers-reduced-motion: reduce) {
  .country-path {
    transition: none;
    animation: none;
  }
}

@media (max-width: 768px) {
  #country-grid.country-grid {
    padding: 15px;
    min-height: 400px;
  }

  .country-path {
    stroke-width: 2;
  }
}

.rarity-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
}

.rarity-Common {
  background: var(--rarity-common);
}
.rarity-Rare {
  background: var(--rarity-rare);
}
.rarity-Epic {
  background: var(--rarity-epic);
}
.rarity-Legendary {
  background: var(--rarity-legendary);
  color: var(--eg-black);
}

/* Game layout — always visible */
.game-layout {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 240px);
  gap: 16px;
  align-items: start;
}

@media (max-width: 900px) {
  .game-layout {
    grid-template-columns: 1fr;
  }
}

/* Compact slot panel */
.slot-panel--compact {
  background: var(--eg-card);
  border: 1px solid var(--eg-stroke);
  border-radius: 12px;
  padding: 12px 14px;
}

.stats-bar--compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 8px 10px;
  background: var(--eg-bg);
  border: 1px solid var(--eg-stroke);
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  font-family: Montserrat, var(--second-family);
  text-transform: uppercase;
}

.stats-bar--compact span {
  color: var(--eg-button);
}

.stats-bar--compact strong {
  color: var(--eg-black);
  margin-left: 2px;
}

.target-bar--country {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--eg-bg);
  border: 1px solid var(--eg-stroke);
  margin-bottom: 10px;
  font-size: 13px;
}

.target-bar--country.has-target {
  border: 2px solid var(--eg-button);
  background: linear-gradient(90deg, rgba(166, 68, 2, 0.06), transparent);
}

.target-bar__label {
  font-family: Montserrat, var(--second-family);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--eg-grey);
  letter-spacing: 0.04em;
}

.target-country__value {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.target-country__picked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.target-country__picked strong {
  font-family: Montserrat, var(--second-family);
  text-transform: uppercase;
  color: var(--eg-button);
  font-size: 14px;
}

.target-country__flag {
  font-size: 20px;
  display: none;
}

.target-country__meta {
  font-size: 12px;
  color: var(--eg-grey);
  font-weight: 600;
}

.level-badge {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--eg-button);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

/* Compact slot grid */
.slot-grid--compact {
  display: grid;
  grid-template-columns: repeat(3, var(--slot-size));
  gap: 3px;
  margin: 0 auto 10px;
  width: fit-content;
  max-width: 100%;
  position: relative;
  justify-content: center;
}

.slot-grid--compact .slot-cell {
  width: var(--slot-size);
  height: var(--slot-size);
  border-radius: 8px;
  border: 2px solid var(--eg-stroke);
  overflow: hidden;
  position: relative;
  background: var(--eg-bg);
}

.slot-grid--compact .slot-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slot-cell__flag {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #fff;
  font-size: 12px;
  padding: 0px 2px;
  border-radius: 4px 0 0 0;
  line-height: 1;
}

.slot-cell--coin {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #fff8e1, var(--eg-card));
}

.slot-coin {
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1;
}

.slot-cell.is-spinning img,
.slot-cell.is-spinning .slot-coin {
  filter: blur(2px);
  animation: slot-blur 0.08s linear infinite;
}

.slot-cell.is-win {
  box-shadow: 0 0 10px var(--eg-button);
  border-color: var(--eg-button);
}

@keyframes slot-blur {
  0% {
    transform: translateY(-2px);
  }
  50% {
    transform: translateY(2px);
  }
  100% {
    transform: translateY(-2px);
  }
}

#pixi-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.slot-controls--compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.slot-controls--compact button {
  font-family: Lato, var(--font-family);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--eg-stroke);
  background: var(--eg-bg);
  color: var(--eg-black);
  cursor: pointer;
}

.slot-controls--compact .btn-start {
  background: #c62828;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  min-width: 160px;
}

.slot-controls--compact .btn-start:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bonus-indicators {
  display: flex;
  gap: 5px;
}

.bonus-indicators span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--eg-stroke);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.bonus-indicators span.is-done {
  background: var(--eg-button);
  color: #fff;
  border-color: var(--eg-button);
}

.game-message--compact {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--eg-bg);
  font-size: 12px;
  min-height: 36px;
  text-align: center;
  line-height: 1.35;
}

.game-message.is-win {
  border: 1px solid var(--rarity-rare);
  color: var(--rarity-rare);
  font-weight: 600;
}

.game-message.is-jackpot {
  border: 2px solid var(--rarity-legendary);
  background: linear-gradient(135deg, #fff8e1, #fffdf4);
  font-weight: 800;
}

/* Sidebar — passport only */
.sidebar-panel {
  display: block;
}

.passport-panel--solo {
  background: var(--eg-card);
  border: 1px solid var(--eg-stroke);
  border-radius: 12px;
  padding: 14px;
  position: sticky;
  top: 16px;
}

.passport-panel--solo .section-title {
  font-size: 16px;
  margin-bottom: 8px;
}

.progress-label {
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--eg-grey);
}

.progress-wrap {
  margin-bottom: 12px;
}

.progress-bar {
  height: 8px;
  background: var(--eg-bg);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--eg-stroke);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rarity-common), var(--rarity-epic));
  transition: width 0.4s ease;
  width: 0%;
}

.passport-list {
  max-height: min(420px, 50vh);
  overflow-y: auto;
  font-size: 12px;
}

.passport-list li {
  padding: 5px 0;
  border-bottom: 1px solid var(--eg-stroke);
}

.passport-list li.is-open {
  color: var(--eg-black);
}

.passport-list li.is-locked {
  color: var(--eg-grey);
  opacity: 0.75;
}

/* 18+ block */
.responsible-block {
  margin-top: 40px;
  padding: 28px 22px;
  background: var(--eg-card);
  border: 1px solid var(--eg-stroke);
  border-radius: 16px;
}

.responsible-block h2 {
  font-family: Montserrat, var(--second-family);
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.responsible-block .resp-sub {
  font-size: 14px;
  color: var(--eg-button);
  font-weight: 800;
  margin-bottom: 14px;
}

.responsible-block p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--eg-black);
  margin-bottom: 10px;
}

.responsible-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.responsible-logos a {
  padding: 8px 14px;
  border: 1px solid var(--eg-stroke);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--eg-button);
  background: var(--eg-bg);
}

.explorer-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(23, 14, 9, 0.55);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s,
    visibility 0.2s;
}

.explorer-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.explorer-modal__dialog {
  background: #fff;
  border: 1px solid var(--eg-stroke);
  border-radius: 16px;
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}

.explorer-modal__dialog h2 {
  font-family: Montserrat, var(--second-family);
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.explorer-modal__dialog p,
.explorer-modal__dialog li {
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.explorer-modal__dialog ul {
  list-style: disc;
  padding-left: 18px;
}

.explorer-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--eg-card);
  border-radius: 6px;
  font-size: 20px;
  cursor: pointer;
  color: var(--eg-button);
}

.coin-float {
  position: fixed;
  font-weight: 800;
  font-size: 18px;
  color: var(--eg-button);
  pointer-events: none;
  z-index: 10002;
  animation: coin-rise 2s ease forwards;
}

@keyframes coin-rise {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-60px);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Map hover tooltip + mobile country list (additive — does not override rules above) */
#country-grid {
  position: relative;
}

.country-map-tooltip {
  position: fixed;
  z-index: 10003;
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--eg-black, #170e09);
  color: #fff;
  font-family: Montserrat, var(--second-family);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, calc(-100% - 10px));
  transition: opacity 0.15s ease, visibility 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.country-map-tooltip.is-visible {
  opacity: 1;
  visibility: visible;
}

.country-grid__list {
  display: none;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.country-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--eg-stroke);
  border-radius: 10px;
  background: var(--eg-bg);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.country-list-item:hover,
.country-list-item:focus-visible {
  border-color: var(--eg-button);
  outline: none;
}

.country-list-item.is-selected {
  border: 2px solid var(--eg-button);
  background: var(--eg-card);
  box-shadow: 0 0 0 2px rgba(166, 68, 2, 0.15);
}

.country-list-item__thumb {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #e2e8f0;
}

.country-list-item__name {
  flex: 1;
  font-family: Montserrat, var(--second-family);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.country-list-item__meta {
  font-size: 10px;
  font-weight: 800;
  color: var(--eg-grey);
}

@media (max-width: 767px) {
  #country-grid.country-grid {
    min-height: 0;
    padding: 12px;
  }

  #country-grid .europe-interactive-map {
    display: none;
  }

  .country-grid__list {
    display: flex;
  }
}
