* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  font-family: Arial, sans-serif;

  display: flex;               /* ← КЛЮЧЕВОЕ */
  align-items: center;         /* центр по вертикали */
  justify-content: center;     /* центр по горизонтали */

  overflow: hidden;            /* без прокрутки */
}


/* LOGO */
.logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 34px;
  /*background: linear-gradient(135deg,#3af,#f3a);*/
  background: linear-gradient(
  135deg,
  #f5d76e 0%,
  #d4af37 45%,
  #c19b2b 60%,
  #e6c65c 100%
);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo span { opacity:; }
.logo.small { font-size: 25px; }

/* HEADER */
header {
  text-align: center;
  padding: 6px;
}

/* MAIN */
main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}



/* ZONES */
.zone { text-align: center; }
.zone-title { font-size: 17px; font-weight: bold; padding: 8px;}
.debt { font-size: 15px; opacity: .8; padding: 6px; font-weight: bold;}

/* HANDS */
.hand {
  display: flex;
  justify-content: center;
  gap: 8px;
}


/* CARDS */
.card {
  width: 86px;
  height: 126px;
  background:#222;
  border:2px solid #555;
  border-radius:6px;
  padding:6px;
  font-size:12px;
  cursor:pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
#player-hand .card:hover {
  transform: scale(1.4); /* было 2 → стало мягче */
  z-index: 1000;
  box-shadow: 0 0 16px rgba(255,255,255,.18);
}

#bot-hand .card {
  background:"#0a0a0a";
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  cursor:default;
  filter:brightness(0.9);
}


/* TABLE */
.table-wrapper {
  width: 100%;
  max-width: 900px;
  height: 180px;
  margin: 0 auto 10px;
  position: relative;
  
}


#table-canvas {
  width:100%;
  height:100%;
  background: linear-gradient(
  120deg,
  #0b0b0b 0%,
  #121212 40%,
  #171717 60%,
  #101010 80%,
  #0a0a0a 100%
);



  border-radius:50px;
  border:2px solid #555;
}

/* ===============================
   PREMIUM MODAL WINDOWS
   GOLD + BLUE MARBLE STYLE
   =============================== */

.overlay{
  position:fixed;
  inset:0;
  backdrop-filter: blur(8px);
  background: radial-gradient(circle at center,
    rgba(0,0,0,.55),
    rgba(0,0,0,.92)
  );
  display:flex;
  align-items:center;
  justify-content:center;
  animation: fadeIn .35s ease;
  z-index:9999;
}

@keyframes fadeIn{
  from{opacity:0}
  to{opacity:1}
}

/* BOX */
.overlay-box{
  width:340px;
  padding:30px 28px;
  border-radius:22px;
  text-align:center;
  position:relative;

  background:
    linear-gradient(#111,#1a1a1a) padding-box,
    linear-gradient(135deg,#ffd86b,#bfa02b,#fff2b0,#bfa02b) border-box;

  border:2px solid transparent;

  box-shadow:
    0 0 40px rgba(0,0,0,.9),
    0 0 35px rgba(255,215,120,.25),
    inset 0 0 20px rgba(255,255,255,.05);

  animation: pop .35s ease;
}

/* glowing rim */
.overlay-box::after{
  content:"";
  position:absolute;
  inset:-3px;
  border-radius:22px;
  background:linear-gradient(45deg,#ffd86b,#fff,#ffd86b,#ffd86b);
  filter:blur(14px);
  opacity:.18;
  z-index:-1;
}

@keyframes pop{
  0%{transform:scale(.75);opacity:0}
  100%{transform:scale(1);opacity:1}
}

/* TITLE */
.overlay-box h2{
  margin:0 0 16px;
  font-family:'Orbitron',sans-serif;
  letter-spacing:2px;
  font-size:26px;

  background:linear-gradient(90deg,#ffd86b,#fff2b0,#ffd86b);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
}

/* STATS */
.stats{
  margin:16px 0;
  font-size:16px;
  opacity:.95;
  line-height:1.7;
}

/* TAUNT */
.taunt-text{
  margin-top:14px;
  font-style:italic;
  font-size:15px;
  color:#cfe6ff;
  letter-spacing:.5px;
}

/* BUTTON */
.overlay-box button{
  margin-top:20px;
  width:100%;
  padding:13px;
  border:none;
  border-radius:14px;
  font-weight:bold;
  cursor:pointer;

  background:linear-gradient(135deg,#ffd86b,#bfa02b);
  color:#ffffff;
  font-size:15px;

  transition:.25s;
}

.overlay-box button:hover{
  transform:scale(1.06);
  box-shadow:
    0 0 20px rgba(255,215,120,.7),
    0 0 40px rgba(255,215,120,.3);
}

/* WIN / LOSE FX */

.player-lost{
  border-color:rgba(255,70,70,.6);
  box-shadow:
    0 0 35px rgba(255,0,0,.35),
    inset 0 0 14px rgba(255,0,0,.2);
}

.bot-lost{
  border-color:rgba(120,200,255,.7);
  box-shadow:
    0 0 35px rgba(120,200,255,.35),
    inset 0 0 14px rgba(120,200,255,.2);
}



.difficulty {
  display:flex;
  gap:10px;
  margin:20px 0;
}

.diff-card {
  flex:1;
  padding:10px;
  border-radius:10px;
  background:#222;
  cursor:pointer;
}

.diff-card.active {
    background: linear-gradient(
  135deg,
  #0f0f0f 10%,
  #141414 10%,
  #bfa02b 20%,
  #9f8323 55%,
  #0f0f0f 90%
);
  color:#000;
  font-weight:bold;
}

button {
  width:100%;
  padding:12px;
  border:none;
  border-radius:10px;
  font-weight:bold;
  cursor:pointer;
  background: linear-gradient(
  135deg,
  #0f0f0f 10%,
  #141414 10%,
  #bfa02b 20%,
  #9f8323 55%,
  #0f0f0f 90%
);

  color:#000;
}
.bot-zone {
  margin-top: 10px;
}
.player-zone {
  margin-top: -12px;
  padding-bottom: 12px;
}
/* ==== FIX DESKTOP SCROLL ==== */
body {
  overscroll-behavior: none;
}

.app {
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.card img {
  width: 100%;
  height: 74px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 4px;
}

.card-name {
  font-size: 11px;
  text-align: center;
}

.card-cost {
  font-size: 11px;
  text-align: center;
  opacity: .85;
}

#table-cards {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  gap: 2px;
  z-index: 10; /* 🔥 ВАЖНО — выводим карты НАД canvas */
}


#table-player,
#table-bot {
  width: 96px;
  height: 136px;
  position: relative;
  z-index: 11; /* выше, чем #table-cards */
}

/* ===== CARD FADE ON TABLE ===== */
.table-fade {
  transition: opacity 0.8s ease, filter 0.8s ease;
  opacity: 1;
}

.table-fade.fade-out {
  opacity: 0;
  filter: blur(2px) brightness(0.6);
}

.round-result.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ===== GOLD GLOW WINNER ===== */
.gold-win {
  box-shadow: 0 0 20px #ffd700, 0 0 40px #ffb300;
  border-color: #ffd700 !important;
  transform: scale(1.05);
  transition: transform .3s ease, box-shadow .3s ease;
}

/* ===== ROUND RESULT LABEL (оставляем как было) ===== */
.round-result {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 8px 12px;
  background: rgba(0,0,0,.7);
  border-radius: 10px;
  font-weight: bold;
  color: #d8eaff;
  box-shadow: 0 0 12px rgba(180, 210, 255, .6);
  transition: opacity .3s ease;
}

.round-result.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ===== SILVER/BLUE GLOW WINNER ===== */
.silver-win {
  box-shadow: 0 0 18px #cfe6ff, 0 0 32px #9ec7ff;
  border-color: #cfe6ff !important;
  transform: scale(1.05);
  transition: transform .3s ease, box-shadow .3s ease;
}

/* ===== MIST DISSOLVE (LOSER) ===== */
.mist-dissolve {
  animation: mistFade 1s ease forwards;
}

@keyframes mistFade {
  0% {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0) scale(1);
  }
  50% {
    opacity: .6;
    filter: blur(2px);
  }
  100% {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(-12px) scale(.9);
  }
}

/* ===== MIST CLOUDS ===== */
.mist-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
}

.mist-cloud {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,220,255,.8), rgba(150,180,255,0));
  animation: mistFly 1s ease-out forwards;
}

@keyframes mistFly {
  0% { opacity: .8; transform: translate(0,0) scale(1); }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(.3);
  }
}

/* ===== FINAL TAUNT STYLES ===== */

.player-lost {
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.6);
  border: 2px solid rgba(255, 0, 0, 0.6);
}

/* ===== TAUNT TEXT (усиленная версия для конца игры) ===== */
.overlay-box .taunt-text {
  padding: 8px;
  background: rgba(0,0,0,.35);
  border-radius: 8px;
  max-width: 100%;
  line-height: 1.3;
}


.taunt-text {
  margin-top: 12px;
  font-family: "Cinzel", serif;
  letter-spacing: 2px;
  font-size: 16px;
  color: #ffb3b3;
  font-style: italic;
  text-align: center;
  opacity: .9;
}

/* ===== ENDGAME BOT LOST (для финальной модалки) ===== */
.bot-lost {
  box-shadow: 0 0 25px rgba(100, 160, 255, 0.6);
  border: 2px solid rgba(100, 160, 255, 0.6);
}

/* лёгкое "дрожание" модалки при проигрыше игрока */
.player-lost {
  animation: endShake .25s ease-in-out;
}

@keyframes endShake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

/* ==== ЖЁСТКАЯ ФИКСАЦИЯ ПРОКРУТКИ ==== */

/* =======================
   АДАПТИВНОЕ МАСШТАБИРОВАНИЕ ВСЕЙ ИГРЫ
   ======================= */

/* ===== ГЛАВНАЯ ОБЁРТКА — МАСШТАБИРУЕМ ВСЁ ===== */
/* ===== ГАРАНТИРОВАННОЕ ЦЕНТРИРОВАНИЕ ВСЕЙ ИГРЫ ===== */
/* ===== НАДЁЖНОЕ ЦЕНТРИРОВАНИЕ ВСЕЙ ИГРЫ ===== */
/* ===== ПРАВИЛЬНОЕ ЦЕНТРИРОВАНИЕ ИГРЫ ===== */
/* ===== ПРАВИЛЬНЫЙ КОНТЕЙНЕР ДЛЯ ЦЕНТРИРОВАНИЯ ===== */
.scale-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;
}


/* страхуем нижнюю часть с картами игрока */
.player-zone {
  padding-bottom: 16px;
}

/* ===== DEBT НА ИГРОВОМ ПОЛЕ ===== */
/* ===== DEBT НА ИГРОВОМ ПОЛЕ (ВВЕРХУ) ===== */
.table-debt {
  position: absolute;
  top: 70px;              /* ← ПОДНЯЛИ ВВЕРХ */
  font-size: 13px;
  font-weight: bold;
  color: #cfe6ff;
  background: rgba(0,0,0,.6);
  padding: 6px 10px;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(180, 210, 255, .4);
  z-index: 12; /* над canvas */
  transition: transform .2s ease, box-shadow .2s ease;
}

/* Bot Debt — слева */
.bot-debt-ui {
  right: 2px;
}

/* Player Debt — справа */
.player-debt-ui {
  left: 2px;
}

/* ===== АНИМАЦИЯ ИЗМЕНЕНИЯ DEBT ===== */
.debt-bump {
  animation: debtPulse .35s ease-out;
}

@keyframes debtPulse {
  0%   { transform: scale(1);   box-shadow: 0 0 8px rgba(180, 210, 255, .4); }
  50%  { transform: scale(1.15); box-shadow: 0 0 14px rgba(180, 210, 255, .9); }
  100% { transform: scale(1);   box-shadow: 0 0 8px rgba(180, 210, 255, .4); }
}

/* ===== ЛОГОТИП НА ИГРОВОМ СТОЛЕ ===== */
.table-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  font-family: 'Orbitron', sans-serif;
  font-size: 54px;
  font-weight: 800;
  letter-spacing: 2px;

  pointer-events: none; /* чтобы не мешал кликам */

  /* ПРОЗРАЧНЫЙ ЗАТЕМНЁННЫЙ СТИЛЬ */
  color: rgba(255, 255, 255, 0.08);

  /* лёгкое свечение */
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.08);

  z-index: 2; /* выше canvas, ниже карт */
}

/* чтобы слово Dumbs было чуть темнее/контрастнее */
.table-logo span {
  opacity: 0.7;
}
.scale-wrapper .game {
  transform-origin: center center;
}

/* ===== ВСПЛЫВАЮЩАЯ ПОДСКАЗКА (ТОЛЬКО ИКОНКА) ===== */
.cost-tooltip {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 8px;
  background: rgba(0, 0, 0, 0.75);
  font-size: 16px;          /* делаем иконку крупнее */
  border-radius: 50%;       /* круглое окошко */
  box-shadow: 0 0 8px rgba(255, 0, 0, .5);
  z-index: 200;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}

.cost-tooltip.hidden {
  opacity: 0;
  transform: translate(-50%, -10px);
}

main.game {
  max-width: 100vw;
  max-height: 100vh;
}

/* ===== ВОДЯНОЙ ЗНАК НА ИГРОВОМ СТОЛЕ ===== */
.table-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 260px;      /* можно менять */
  opacity: 0.08;     /* ← КЛЮЧЕВОЕ: приглушённость */
  filter: grayscale(20%) blur(0.6px);

  pointer-events: none; /* чтобы не мешал кликам */
  z-index: 2;           /* выше canvas, ниже карт */
}

/* =================================
   ULTRA GAME FX PACK
   ================================= */

/* animated gradient background */
.overlay::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 30% 20%, rgba(0,200,255,.15), transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(255,215,120,.15), transparent 40%);
  animation: bgShift 8s linear infinite;
}

@keyframes bgShift{
  0%{transform:translate(0,0)}
  50%{transform:translate(-40px,-20px)}
  100%{transform:translate(0,0)}
}


/* ===============================
   WIN PARTICLES
   =============================== */

.win-particles{
  position:absolute;
  inset:0;
  pointer-events:none;
  overflow:hidden;
}

.spark{
  position:absolute;
  width:6px;
  height:6px;
  border-radius:50%;
  background: radial-gradient(circle,#fff,#ffd86b);
  animation: sparkFly 1.4s ease-out forwards;
}

@keyframes sparkFly{
  0%{opacity:1; transform:translate(0,0) scale(1)}
  100%{
    opacity:0;
    transform:translate(var(--x),var(--y)) scale(.3);
  }
}


/* ===============================
   COIN RAIN
   =============================== */

.coin{
  position:absolute;
  width:18px;
  height:18px;
  border-radius:50%;
  background: radial-gradient(circle,#fff2b0,#d4af37);
  box-shadow:0 0 8px rgba(255,215,120,.7);
  animation: coinFall 1.8s linear forwards;
}

@keyframes coinFall{
  from{
    transform:translateY(-60px) rotate(0deg);
    opacity:1;
  }
  to{
    transform:translateY(300px) rotate(720deg);
    opacity:0;
  }
}


/* ===============================
   POWER PULSE BORDER
   =============================== */

.overlay-box.win{
  animation: winPulse 1.2s infinite alternate;
}

@keyframes winPulse{
  from{ box-shadow:0 0 30px rgba(255,215,120,.25)}
  to{ box-shadow:0 0 60px rgba(255,215,120,.7)}
}


/* ===============================
   LOSE SHAKE + DARK PULSE
   =============================== */

.overlay-box.lose{
  animation: loseShake .35s ease;
}

@keyframes loseShake{
  0%{transform:translateX(0)}
  25%{transform:translateX(-6px)}
  50%{transform:translateX(6px)}
  75%{transform:translateX(-4px)}
  100%{transform:translateX(0)}
}

/* ===============================
   COLLECTION SELECT SCREEN
   =============================== */

.collection-box {
  width: 900px;
  max-width: 115vw;
}

/* сетка 20 карточек */
.collection-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  justify-items: center;
  /*max-height: 800px;*/
}

/* карточка коллекции (по сути обычная карта) */
.collection-card {
  width: 104px;
  height: 142px;
  background: #222;
  border: 2px solid #555;
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.collection-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
  pointer-events: none;
}

/* изображение */
.collection-card img {
  width: 100%;
  height: 82px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 6px;
}

/* название */
.collection-title {
  font-size: 12px;
  opacity: .9;
}

/* hover — ТОЧНО как в игре */
.collection-card:hover {
  transform: scale(1.25);
  z-index: 1000;
  box-shadow: 0 0 16px rgba(255,255,255,.18);
  border-color: #cfe6ff;
}

.collection-scale {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
}

/* ===== LOADING ANIMATION ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.loading-container {
  width: 320px;
  text-align: center;
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
  padding: 30px 25px;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 120, 0.3);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 215, 120, 0.2);
}

.loading-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 18px;
  letter-spacing: 2px;
  margin-bottom: 20px;
  background: linear-gradient(90deg, #ffd86b, #fff2b0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.loading-bar-wrapper {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
}

.loading-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ffd86b, #ffb347, #ffd86b);
  border-radius: 10px;
  animation: loadingProgress 1.8s ease-out forwards;
  box-shadow: 0 0 8px rgba(255, 215, 120, 0.6);
}

@keyframes loadingProgress {
  0% {
    width: 0%;
  }
  30% {
    width: 45%;
  }
  60% {
    width: 78%;
  }
  100% {
    width: 100%;
  }
}

.loading-text {
  font-size: 13px;
  color: #aaa;
  letter-spacing: 1px;
  margin-top: 12px;
  font-family: monospace;
}

.loading-text span {
  color: #ffd86b;
  animation: pulse 0.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* ===== КАСТОМНЫЙ ПОЛЗУНОК ГРОМКОСТИ ===== */
#music-volume {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 215, 120, 0.3);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

#music-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffd86b;
  cursor: pointer;
  box-shadow: 0 0 6px rgba(255, 215, 120, 0.8);
  transition: transform 0.1s ease;
}

#music-volume::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

#music-volume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffd86b;
  cursor: pointer;
  border: none;
}

#music-volume::-moz-range-track {
  background: rgba(255, 215, 120, 0.3);
  height: 3px;
  border-radius: 3px;
}

/* Анимация появления блока */
#music-control {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#music-control:hover {
  opacity: 1;
  transform: scale(1.02);
}

/* ===== КНОПКА ВЫХОДА В ГЛАВНОЕ МЕНЮ ===== */
#exit-menu-btn {
  transition: transform 0.2s ease, background 0.2s ease;
}

#exit-menu-btn:hover {
  transform: scale(1.05);
  background: rgba(0, 0, 0, 0.85) !important;
  border-color: rgba(255, 215, 120, 0.6) !important;
}

#exit-menu-btn:active {
  transform: scale(0.98);
}

/* Анимация для модального окна подтверждения */
.exit-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  animation: fadeIn 0.2s ease;
}

.exit-confirm-box {
  width: 320px;
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
  border: 1px solid rgba(255, 215, 120, 0.4);
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
}

.exit-confirm-box h3 {
  color: #ffd86b;
  font-family: 'Orbitron', sans-serif;
  margin-bottom: 15px;
}

.exit-confirm-box p {
  color: #ccc;
  margin-bottom: 20px;
  font-size: 14px;
}

.exit-confirm-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.exit-confirm-buttons button {
  width: auto;
  padding: 10px 20px;
  margin: 0;
  cursor: pointer;
}

.exit-confirm-buttons button:first-child {
  background: linear-gradient(135deg, #ffd86b, #bfa02b);
  color: #ffffff;
}

.exit-confirm-buttons button:last-child {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 215, 120, 0.3);
}

.exit-confirm-buttons button:last-child:hover {
  background: rgba(255, 255, 255, 0.2);
}
/* Модальное окно выбора сложности */
.difficulty-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
}

.difficulty-modal-content {
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
  border: 2px solid #ffd86b;
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  min-width: 320px;
}

.difficulty-modal-content h2 {
  color: #ffd86b;
  margin-bottom: 25px;
}

.difficulty-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  justify-content: center;
  align-items: center;

}

.diff-btn {
   flex: 1;
  min-width: 90px;
  padding: 12px 0;
  font-size: 14px;
  font-family: 'Orbitron', sans-serif;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(255, 216, 107, 0.4);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.diff-btn.active {
  background: rgba(255, 216, 107, 0.2) !important;
  border-color: #ffd86b;
  color: #ffd86b;
  box-shadow: 0 0 20px rgba(255, 216, 107, 0.3);
  animation: glowPulse 1.5s infinite;
}

#start-game-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #ffd86b, #bfa02b);
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  font-size: 16px;
}

.diff-text {
  position: relative;
  z-index: 2;
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
}

.diff-btn.locked::before {
  content: "🔒";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  opacity: 0.25;
  z-index: 1;
  pointer-events: none;
}
.diff-btn:disabled::before {
  content: "🔒";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  opacity: 0.25;
  z-index: 1;
  pointer-events: none;
}

/* Замок как фоновый элемент ТОЛЬКО для disabled кнопок */
.diff-btn:disabled {
  cursor: not-allowed;
}

.diff-btn.active.locked::before {
  opacity: 0.15;
}
.diff-btn.active:disabled::before {
  opacity: 0.1;
}

.diff-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.diff-lock {
  font-size: 10px;
  opacity: 0.7;
  display: inline-block;
}

.diff-btn.active .diff-lock {
  opacity: 1;
  color: #ffd86b;
}

/* ===== ОБЩИЕ СТИЛИ ДЛЯ ВСЕХ КНОПОК ===== */
button, .diff-btn, #start-game-btn, #global-continue, #global-rules, #global-exit, 
#exit-to-menu, #exit-completely, #cancel-exit, #close-rules, #confirm-exit {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 216, 107, 0.4);
  color: #ffffff;
  cursor: pointer;
  font-weight: bold;
  letter-spacing: 1px;
}

/* HOVER эффект для всех кнопок */
button:hover, .diff-btn:hover, #start-game-btn:hover, 
#global-continue:hover, #global-rules:hover, #global-exit:hover,
#exit-to-menu:hover, #exit-completely:hover, #cancel-exit:hover,
#close-rules:hover, #confirm-exit:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 216, 107, 0.8);
  box-shadow: 0 5px 20px rgba(255, 216, 107, 0.2);
  background: rgba(0, 0, 0, 0.7) !important;
}

/* ACTIVE эффект (нажатие) */
button:active, .diff-btn:active, #start-game-btn:active {
  transform: translateY(1px);
}

/* Ripple эффект при клике */
button::after, .diff-btn::after, #start-game-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 216, 107, 0.4);
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

button:active::after, .diff-btn:active::after, #start-game-btn:active::after {
  width: 200px;
  height: 200px;
}

/* ===== КНОПКА START НА СТАРТОВОМ ЭКРАНЕ ===== */
#start-btn {
  width: 100%;
  padding: 14px 28px;
  font-size: 15px;
  font-family: 'Orbitron', sans-serif;
  background: rgba(0, 0, 0, 0.6) !important;
  border: 2px solid rgba(255, 216, 107, 0.6);
  border-radius: 15px;
  margin-top: 20px;
  animation: pulse 2s infinite;
}

#start-btn:hover {
  border-color: #ffd86b;
  box-shadow: 0 0 30px rgba(255, 216, 107, 0.4);
  animation: none;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 216, 107, 0.4);
    border-color: rgba(255, 216, 107, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 216, 107, 0);
    border-color: rgba(255, 216, 107, 0.8);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 216, 107, 0);
    border-color: rgba(255, 216, 107, 0.4);
  }
}

/* ===== КНОПКИ В МОДАЛЬНЫХ ОКНАХ ===== */
#global-continue, #global-rules, #global-exit,
#exit-to-menu, #exit-completely, #cancel-exit {
  padding: 12px 20px;
  font-size: 14px;
  border-radius: 12px;
  font-family: 'Orbitron', sans-serif;
}

/* Специальные цвета для разных действий */
#global-exit, #exit-completely {
  border-color: rgba(255, 68, 68, 0.5);
}

#global-exit:hover, #exit-completely:hover {
  border-color: #ff4444;
  box-shadow: 0 5px 20px rgba(255, 68, 68, 0.3);
}

#global-rules {
  border-color: rgba(74, 144, 226, 0.5);
}

#global-rules:hover {
  border-color: #4a90e2;
  box-shadow: 0 5px 20px rgba(74, 144, 226, 0.3);
}

/* ===== КНОПКА START GAME В МОДАЛКЕ СЛОЖНОСТИ ===== */
#start-game-btn {
  padding: 14px 28px;
  font-size: 16px;
  font-family: 'Orbitron', sans-serif;
  border-radius: 15px;
  background: rgba(255, 216, 107, 0.1) !important;
  border: 2px solid #ffd86b;
  color: #ffd86b;
  margin-top: 10px;
}

#start-game-btn:hover {
  background: rgba(255, 216, 107, 0.2) !important;
  box-shadow: 0 0 30px rgba(255, 216, 107, 0.3);
  letter-spacing: 2px;
}

/* ===== КНОПКА MENU (глобальная) ===== */
#global-menu-btn {
  transition: all 0.3s ease !important;
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 216, 107, 0.4);
}

#global-menu-btn:hover {
  transform: scale(1.05);
  background: rgba(0, 0, 0, 0.8) !important;
  border-color: #ffd86b;
  box-shadow: 0 0 15px rgba(255, 216, 107, 0.3);
}

#global-menu-btn:active {
  transform: scale(0.98);
}

/* ===== КНОПКА ЗАКРЫТИЯ В RULES ===== */
#close-rules {
  padding: 12px 24px;
  border-radius: 40px;
  font-family: 'Orbitron', sans-serif;
}

/* ===== АНИМАЦИЯ ПОЯВЛЕНИЯ КНОПОК ===== */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.diff-btn, #start-game-btn, #global-continue, 
#global-rules, #global-exit {
  animation: slideInUp 0.4s ease forwards;
}

.diff-btn:nth-child(1) { animation-delay: 0.1s; }
.diff-btn:nth-child(2) { animation-delay: 0.2s; }
.diff-btn:nth-child(3) { animation-delay: 0.3s; }
#start-game-btn { animation-delay: 0.4s; }

/* ===== КНОПКИ В EXIT CONFIRMATION ===== */
.exit-confirm-buttons button {
  width: 100%;
  margin: 5px 0;
  border-radius: 12px;
}

/* ===== ГОРЯЧАЯ КНОПКА (красная) ===== */
.hot-button {
  border-color: rgba(255, 68, 68, 0.6);
}

.hot-button:hover {
  border-color: #ff4444;
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.4);
}

/* ===== УМНАЯ КНОПКА (синяя) ===== */
.smart-button {
  border-color: rgba(74, 144, 226, 0.6);
}

.smart-button:hover {
  border-color: #4a90e2;
  box-shadow: 0 0 20px rgba(74, 144, 226, 0.4);
}

/* ===== КРАСИВЫЙ ВХОД ДЛЯ МОДАЛЬНЫХ ОКОН ===== */
.exit-confirm-box, .difficulty-modal-content {
  animation: modalZoomIn 0.3s cubic-bezier(0.34, 1.3, 0.55, 1);
}

@keyframes modalZoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== СВЕЧЕНИЕ ПРИ НАВЕДЕНИИ НА АКТИВНУЮ КНОПКУ ===== */

@keyframes glowPulse {
  0% {
    box-shadow: 0 0 5px rgba(255, 216, 107, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 216, 107, 0.5);
  }
  100% {
    box-shadow: 0 0 5px rgba(255, 216, 107, 0.3);
  }
}

/* ===== ЭФФЕКТ НАПИСАНИЯ ДЛЯ КНОПКИ START ===== */
#start-btn {
  position: relative;
  overflow: hidden;
}

#start-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 216, 107, 0.2), transparent);
  transition: left 0.5s ease;
}

#start-btn:hover::before {
  left: 100%;
}

@keyframes fadeOutMsg {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

/* ===== ПОПАПЫ НАГРАД ===== */
.reward-popup, .unlock-popup, .collection-unlock-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
  border: 2px solid #ffd700;
  border-radius: 20px;
  padding: 20px 30px;
  display: flex;
  gap: 20px;
  align-items: center;
  z-index: 20000;
  animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), fadeOut 0.5s ease 3.5s forwards;
  box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

.reward-icon, .unlock-icon, .collection-unlock-icon {
  font-size: 48px;
  animation: bounce 0.5s ease;
}

.reward-text, .unlock-text, .collection-unlock-text {
  color: white;
  font-family: 'Orbitron', sans-serif;
}

.reward-text div:first-child, .unlock-text div:first-child, .collection-unlock-text div:first-child {
  color: #ffd700;
  font-weight: bold;
  margin-bottom: 5px;
}

.reward-diff {
  font-size: 12px;
  color: #aaa;
  margin-top: 5px;
}

@keyframes popIn {
  from { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

#difficulty-indicator {
  transition: opacity 0.3s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
}

#difficulty-indicator:hover {
  transform: translateX(-50%) scale(1.02);
  border-color: #ffd86b;
}

#difficulty-text {
  transition: color 0.2s ease;
}

#collection-name-short {
  font-size: 10px;
  opacity: 0.8;
}

.rank-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,215,120,0.5);
  z-index: 10;
}

.rank-badge.bronze { background: rgba(205,127,50,0.9); }
.rank-badge.silver { background: rgba(192,192,192,0.9); }
.rank-badge.gold { background: rgba(255,215,0,0.9); }
.rank-badge.sapphire { background: rgba(15,82,186,0.9); }
.rank-badge.blue_diamond { background: rgba(0,191,255,0.9); }
.rank-badge.red_diamond { background: rgba(255,0,0,0.9); }

/* ===== ЗАЩИТА ОТ КОПИРОВАНИЯ ===== */
img {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-tap-highlight-color: transparent;
  draggable: false;
}

/* Защита карт коллекций */
.collection-card img {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Защита карт в игре */
.card img {
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.card {
    position: relative;
    overflow: hidden;
  }
  
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
  pointer-events: none;
}
/* Защита фона */
body {
  user-select: none;
  -webkit-user-select: none;
}

/* Запрет выделения текста */
* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.watermark {
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 6px;
  color: rgba(255,255,255,0.15);
  pointer-events: none;
  z-index: 2;
}

#volume-wrapper {
    display: flex !important;
  }

  /* Анимация для кнопки сброса достижений */
#global-reset {
  animation: goldPulse 1.5s infinite !important;
}

@keyframes goldPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
    border-color: rgba(255, 215, 0, 0.6);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    border-color: rgba(255, 215, 0, 1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    border-color: rgba(255, 215, 0, 0.6);
  }
}

#bot-hand .card {
  transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  cursor: pointer;
}

#bot-hand .card:hover {
  transform: scale(1.15) rotate(3deg) translateY(-5px);
  box-shadow: 0 20px 30px rgba(0,0,0,0.4), 0 0 20px rgba(255,215,0,0.7);
  border-color: #ffd700;
  filter: brightness(1.1);
  cursor: pointer;
  z-index: 100;
}

/* ===== ФИНАЛЬНОЕ СЛАЙД-ШОУ (ОЧИЩЕННАЯ ВЕРСИЯ) ===== */
.slideshow-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a0f, #0d0d1a, #0a0a0f, #1a0a2e, #0a0a0f);
  background-size: 400% 400%;
  animation: cyberGradient 8s ease infinite;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

@keyframes cyberGradient {
  0% { background-position: 0% 0%; }
  25% { background-position: 100% 0%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
  100% { background-position: 0% 0%; }
}

/* Обёртка контента */
.slideshow-container {
  width: 90%;
  max-width: 800px;
  text-align: center;
  z-index: 10;
  position: relative;
}

/* Контейнер изображения */
.slideshow-image-container {
  width: 100%;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 50px rgba(0, 255, 255, 0.2);
  position: relative;
}

/* Само изображение */
.slideshow-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
  border-radius: 10px;
  animation: slideInFromLeft 0.5s ease-out;
}

/* Анимированное появление */
@keyframes slideInFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-100%) scale(0.9);
  }
  50% {
    opacity: 0.5;
    transform: translateX(10%) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Исчезновение */
.slideshow-img.exit {
  animation: slideOutToRight 0.3s ease-in forwards;
}

@keyframes slideOutToRight {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
  }
}

/* Прогресс-бар */
.slideshow-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin-top: 30px;
  overflow: hidden;
}

.slideshow-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ffd86b, #ffaa44);
  border-radius: 2px;
}

/* Подпись */
.slideshow-caption {
  margin-top: 20px;
  font-family: 'Orbitron', monospace;
  font-size: 18px;
  color: #ffd86b;
  text-shadow: 0 0 10px rgba(255, 216, 107, 0.5);
  letter-spacing: 2px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Счётчик */
.slideshow-counter {
  margin-top: 15px;
  font-family: 'Orbitron', monospace;
  font-size: 12px;
  color: #0ff;
  text-shadow: 0 0 5px #0ff;
  letter-spacing: 1px;
}

/* Неоновая сетка */
.slideshow-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 255, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 1;
  animation: gridPulse 2s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* Неоновая рамка */
.slideshow-overlay::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
  pointer-events: none;
  z-index: 2;
  animation: neonBorderPulse 1.5s ease-in-out infinite;
}

@keyframes neonBorderPulse {
  0% { border-color: rgba(0, 255, 255, 0.2); box-shadow: 0 0 10px rgba(0, 255, 255, 0.1); }
  50% { border-color: rgba(255, 0, 255, 0.5); box-shadow: 0 0 30px rgba(0, 255, 255, 0.3); }
  100% { border-color: rgba(0, 255, 255, 0.2); box-shadow: 0 0 10px rgba(0, 255, 255, 0.1); }
}

/* Уголки */
.corner-light {
  position: absolute;
  width: 50px;
  height: 50px;
  pointer-events: none;
  z-index: 10;
}

.corner-light.top-left {
  top: 15px;
  left: 15px;
  border-top: 2px solid #0ff;
  border-left: 2px solid #0ff;
  animation: cornerPulse 1s ease-in-out infinite;
}

.corner-light.top-right {
  top: 15px;
  right: 15px;
  border-top: 2px solid #f0f;
  border-right: 2px solid #f0f;
  animation: cornerPulse 1s ease-in-out infinite 0.2s;
}

.corner-light.bottom-left {
  bottom: 15px;
  left: 15px;
  border-bottom: 2px solid #f0f;
  border-left: 2px solid #f0f;
  animation: cornerPulse 1s ease-in-out infinite 0.4s;
}

.corner-light.bottom-right {
  bottom: 15px;
  right: 15px;
  border-bottom: 2px solid #0ff;
  border-right: 2px solid #0ff;
  animation: cornerPulse 1s ease-in-out infinite 0.6s;
}

@keyframes cornerPulse {
  0%, 100% { opacity: 0.3; filter: blur(0); }
  50% { opacity: 1; filter: blur(1px); }
}

/* Финальное сообщение */
.slideshow-final {
  text-align: center;
  animation: finalTextPulse 1s ease;
  z-index: 20;
  position: relative;
}

.slideshow-final-text h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 30px;
  background: linear-gradient(135deg, #ffd86b, #ffaa44);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}

.slideshow-final-text p {
  font-size: 18px;
  color: #ccc;
  margin: 10px 0;
}

.slideshow-exit-btn {
  margin-top: 30px;
  padding: 12px 30px;
  font-family: 'Orbitron', sans-serif;
  font-size: 16px;
  background: linear-gradient(135deg, #ffd86b, #bfa02b);
  border: none;
  border-radius: 30px;
  color: #eec145;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.slideshow-exit-btn:hover {
  transform: scale(1.05);
}

@keyframes finalTextPulse {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* BPM Визуализатор */
.bpm-visualizer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100001;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  padding: 8px 15px;
  border-radius: 15px;
  border: 1px solid rgba(0, 255, 255, 0.3);
  font-family: 'Orbitron', monospace;
  text-align: center;
}

.bpm-text {
  font-size: 10px;
  color: #0ff;
  letter-spacing: 2px;
  margin-bottom: 5px;
  text-shadow: 0 0 5px #0ff;
}

.bpm-bars {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: flex-end;
  height: 20px;
}

.bpm-bar {
  width: 4px;
  background: #0ff;
  border-radius: 2px;
  transition: all 0.05s ease;
}

/* Ссылки, которые можно копировать и кликать */
.clickable-link {
  user-select: text !important;
  -webkit-user-select: text !important;
  cursor: pointer !important;
  color: #0ff !important;
  text-decoration: underline !important;
  transition: all 0.2s ease;
}

.clickable-link:hover {
  color: #ffd86b !important;
  text-shadow: 0 0 5px rgba(255, 216, 107, 0.5);
}

/* Для текста, который можно копировать */
.copyable-text {
  user-select: text !important;
  -webkit-user-select: text !important;
  cursor: text !important;
}

/* Контейнер для копирования */
.copy-container {
  display: inline-block;
  position: relative;
}

.copy-btn {
  background: rgba(0, 255, 255, 0.2);
  border: 1px solid #0ff;
  border-radius: 5px;
  color: #0ff;
  font-size: 10px;
  padding: 2px 6px;
  margin-left: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: rgba(0, 255, 255, 0.5);
  color: #fff;
}

/* DEV PANEL */
.dev-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
  border: 2px solid #00ff88;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 0 30px rgba(0,255,136,0.3);
}

.dev-panel-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
}

.dev-panel-content h3 {
  color: #00ff88;
  margin: 0 0 10px 0;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
}

.dev-panel-content button {
  padding: 6px 12px;
  font-size: 12px;
  background: rgba(0,0,0,0.7);
  border: 1px solid #00ff88;
  border-radius: 6px;
  color: #00ff88;
  cursor: pointer;
  transition: all 0.2s;
}

.dev-panel-content button:hover {
  background: rgba(0,255,136,0.2);
  transform: scale(1.02);
}

  #bot-hand .card {
  transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  cursor: pointer;
}

#bot-hand .card:hover {
  transform: scale(1.15) rotate(3deg) translateY(-5px);
  box-shadow: 0 20px 30px rgba(0,0,0,0.4), 0 0 20px rgba(255,215,0,0.7);
  border-color: #ffd700;
  filter: brightness(1.1);
  cursor: pointer;
  z-index: 100;
}

/* ===== ПЛАНШЕТЫ 10-11 ДЮЙМОВ - ФИКС ТАЙМЕРА ===== */
@media (min-width: 1000px) and (max-width: 1300px) and (min-height: 1500px) {
  /* Таймер - вниз под карты */
  #timer-container {
    position: fixed !important;
    bottom: 100px !important;
    top: auto !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: 280px !important;
    z-index: 1000 !important;
  }
  
  /* Зона игрока - отступ снизу */
  .player-zone {
    margin-bottom: 90px !important;
    padding-bottom: 20px !important;
  }
  
  /* Карты игрока чуть меньше */
  .player-zone .card {
    width: 70px !important;
    height: 100px !important;
  }
  
  .player-zone .card img {
    height: 50px !important;
  }
  
  /* Карты бота тоже меньше */
  #bot-hand .card {
    width: 70px !important;
    height: 100px !important;
  }
  
  /* Стол чуть ниже */
  .table-wrapper {
    height: 150px !important;
    margin: 5px auto !important;
  }
  
  /* Индикатор сложности - тоже вниз */
  #difficulty-indicator {
    position: fixed !important;
    bottom: 50px !important;
    top: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1000 !important;
  }
}

/* Для iPad Pro 12.9" и подобных */
@media (min-width: 1300px) and (max-width: 1500px) and (min-height: 1800px) {
  #timer-container {
    position: fixed !important;
    bottom: 120px !important;
    top: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
  
  .player-zone {
    margin-bottom: 110px !important;
  }
}

/* Планшеты 10-11 дюймов - фикс таймера */
@media (min-width: 1000px) and (max-width: 1300px) and (min-height: 2000px) {
  #timer-container {
    position: fixed !important;
    bottom: 100px !important;
    top: auto !important;
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 100 !important;
  }
  
  .player-zone {
    margin-top: 20px !important;
    margin-bottom: 90px !important;
  }
}

@media (min-height: 800px) {
  #timer-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
  }
}

@media (min-height: 1200px) {
  #timer-container {
    bottom: 80px !important;
  }
}

@media (max-width: 768px) {

  #music-control {
    top: 10px !important;      /* ← ВВЕРХ */
    bottom: auto !important;    /* ← ОТКЛЮЧАЕМ НИЗ */
    right: 10px !important;
    left: auto !important;
    padding: 6px 12px !important;
    z-index: 1000 !important;
    background: rgba(0,0,0,0.8) !important;
  }

  #music-control button {
    font-size: 15px !important;
    padding: 4px 8px !important;
  }

  #volume-wrapper {
    display: none !important;
  }

  /* Кнопка MENU - уменьшаем */
  #global-menu-btn {
    top: 10px !important;
    left: 10px !important;
    padding: 5px 10px !important;
    font-size: 17px !important;
    z-index: 1001 !important;
  }
  
  #global-menu-btn span {
    font-size: 17px !important;
  }
  
  /* Индикатор сложности - уменьшаем шрифт */
  #difficulty-indicator {
    top: 15px !important;
    font-size: 8px !important;
    padding: 3px 10px !important;
    white-space: nowrap !important;
    z-index: 1000 !important;
  }
  
  #difficulty-text {
    font-size: 8px !important;
  }
  
  #collection-name-short {
    font-size: 7px !important;
  }
  
  /* Таймер - немного поднимаем, чтобы не пересекался с музыкой */
  #timer-container {
    bottom: 60px !important;
  }

  main {
    padding: 4px;
    gap: 30px;
  }

  .game-pot {
    top: 8px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .zone-title {
    font-size: 15px;
    margin-bottom: 4px;
    padding: 10px;
  }

  .table-wrapper {
    height: 152px;
    margin: 4px 0;
    overflow: hidden;
  }

  .hand {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .card {
    width: 72px;
    height: 106px;
    position: relative;
    overflow: hidden;
  }

  .card img {
    height: 56px;
  }

  .player-zone {
    margin-top: 2px;
    padding-bottom: 12px;
  }
 .player-zone .card {
    width: 78px;
    height: 110px;
 }
.collection-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .diff-btn {
    min-width: 70px;
    padding: 10px 0;
  }
  
  .diff-text {
    font-size: 11px;
  }
  
  .diff-btn.locked::before {
    font-size: 22px;
  }
  .table-logo {
      top: 50%;
      left: 52%;
    font-size: 18px !important; /* Уменьшаем размер */
    opacity: 0.9 !important;
    white-space: nowrap;
    letter-spacing: 1px;
  }
  
  .table-logo span {
    font-size: 18px !important;
  }
  #global-menu-btn,
  #music-control {
    z-index: 20000 !important;
    display: flex !important;
  }
  .collection-box {
  width: 1000px;
  max-width: 125vw;
}

/* Контейнер окна коллекций */
  .collection-box {
    width: 95vw !important;
    max-width: 95vw !important;
    padding: 20px 15px !important;
  }
  
  /* Сетка коллекций - 2 колонки для удобного просмотра */
  .collection-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
    max-height: 100vh !important;
    padding: 10px !important;
  }
  
  /* Карточка коллекции - увеличиваем размер */
  .collection-card {
    width: 77px !important;
    height: 99px !important;
    padding: 10px !important;
  }
  
  /* Изображение внутри карточки */
  .collection-card img {
    height: 60px !important;
    object-fit: cover !important;
  }
  
  /* Название коллекции */
  .collection-title {
    font-size: 7px !important;
    font-weight: bold !important;
    margin-top: -6px !important;
    color: rgb(255,255,255);
  }
  
  /* Заголовок окна */
  .collection-box h2 {
    font-size: 18px !important;
    margin-bottom: 15px !important;
  }
  
  /* Бейдж статуса */
  .rank-badge {
    width: 32px !important;
    height: 32px !important;
    font-size: 18px !important;
    top: -5px !important;
    right: -5px !important;
  }
  
  .watermark {
  position: absolute;
  top: 75%;
  left: 25%;
  bottom: 2px;
  right: 8px;
  font-size: 4px;
  color: rgba(255,255,255,0.15);
  pointer-events: none;
  z-index: 2;
}
}
/* ===== APPLE DEVICES OPTIMIZATION ===== */

/* 1. Все iPhone (портрет) */
@media only screen and (max-width: 480px) and (orientation: portrait) {
  main.game {
    transform: scale(0.85);
    transform-origin: center top;
  }
  
  .player-zone .card {
    width: 65px !important;
    height: 95px !important;
  }
  
  #timer-container {
    position: fixed !important;
    bottom: 80px !important;
    top: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
}

/* 2. Все iPhone (альбом) */
@media only screen and (max-width: 896px) and (orientation: landscape) {
  main.game {
    transform: scale(0.75);
  }
  
  .hand {
    gap: 4px !important;
  }
  
  .card {
    width: 60px !important;
    height: 90px !important;
  }
}

/* 3. Все iPad (портрет) */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  #timer-container {
    position: fixed !important;
    bottom: 100px !important;
    top: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 300px !important;
  }
  
  .player-zone {
    margin-bottom: 90px !important;
  }
}

/* 4. Все iPad (альбом) */
@media only screen and (min-width: 1025px) and (max-width: 1366px) and (orientation: landscape) {
  #timer-container {
    position: fixed !important;
    bottom: 80px !important;
    top: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
  
  .player-zone {
    margin-bottom: 70px !important;
  }
}

/* 5. Для iPad Pro 12.9" и больших планшетов (портрет) */
@media only screen and (min-width: 1024px) and (max-width: 1376px) and (min-height: 1024px) and (orientation: portrait) {
  #timer-container {
    bottom: 120px !important;
  }
  
  .player-zone {
    margin-bottom: 110px !important;
  }
}
