#snow-layer { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9998; overflow: hidden; }
.snowflake { position: absolute; top: -10px; color: #fff; font-size: 1.5rem; user-select: none; animation: fallSnow linear infinite; text-shadow: 0 0 5px rgba(255,255,255,0.8); }
@keyframes fallSnow { 0% { transform: translateY(-10px) translateX(0) rotate(0deg); opacity: 1; } 100% { transform: translateY(100vh) translateX(100px) rotate(360deg); opacity: 0.2; } }
body[data-theme="light"] .snowflake { color: #b0c4de; text-shadow: none; }

.game-container { flex: 1; max-width: 800px; margin: 0 auto; padding: 40px 20px; text-align: center; width: 100%; }
.game-container h1 { margin-bottom: 32px; color: var(--accent); display: flex; justify-content: center; align-items: center; gap: 6px;}

.slots-machine { display: flex; gap: 12px; justify-content: center; margin-bottom: 24px; }
.reel { width: 100px; height: 120px; background: var(--bg-card); border: 3px solid var(--accent-2); border-radius: 12px; font-size: 3.5rem; display: flex; align-items: center; justify-content: center; transition: transform 0.1s, border-color 0.3s; box-shadow: inset 0 0 15px rgba(0,0,0,0.1); }
.reel.spinning { animation: reelSpin 0.1s infinite alternate; border-color: var(--accent); }
@keyframes reelSpin { from { transform: translateY(-6px); } to { transform: translateY(6px); } }

.dice-display { font-size: 6rem; margin: 20px 0; min-height: 120px; display: flex; align-items: center; justify-content: center; }
.dice-buttons { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.dice-buttons button { width: 50px; height: 50px; border-radius: 10px; border: 2px solid var(--border); background: var(--bg-card); color: var(--text); font-size: 1.2rem; font-weight: 700; cursor: pointer; }
.dice-buttons button.selected { border-color: var(--accent-2); background: var(--accent-2); color: #fff; box-shadow: 0 0 15px var(--accent-2); }
body[data-theme="dark"] .dice-buttons button.selected, body[data-admin="true"] .dice-buttons button.selected { color: #000; }

.coin-stage { perspective: 1000px; display: flex; justify-content: center; align-items: center; min-height: 180px; margin: 20px 0; }
.coin { width: 140px; height: 140px; position: relative; transform-style: preserve-3d; transition: transform 0.6s ease-in-out; }
.coin.flipping { animation: coinSpin 0.6s ease-in-out; }
@keyframes coinSpin { 0% { transform: rotateY(0deg); } 100% { transform: rotateY(1800deg); } }
.coin-face { position: absolute; inset: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; backface-visibility: hidden; box-shadow: inset 0 0 0 4px rgba(255,255,255,0.4), inset 0 0 20px rgba(0,0,0,0.3), 0 6px 20px rgba(0,0,0,0.4); }
.coin-front { background: radial-gradient(circle at 35% 35%, #ffec8b 0%, #f5c518 50%, #b8860b 100%); color: #6b4b00; border: 3px solid #f5c518; }
.coin-back { background: radial-gradient(circle at 35% 35%, #f5f5f5 0%, #c0c0c0 50%, #808080 100%); color: #333; border: 3px solid #c0c0c0; transform: rotateY(180deg); }
.coin.show-tails { transform: rotateY(180deg); }
.coin-choice { display: flex; gap: 12px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.btn-choice { padding: 12px 28px; border-radius: 10px; border: 2px solid var(--border); background: var(--bg-card); color: var(--text); font-size: 1rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.btn-choice.selected { border-color: var(--accent); background: var(--accent); color: #fff; }
body[data-theme="dark"] .btn-choice.selected, body[data-admin="true"] .btn-choice.selected { color: #000; }

.bet-row { display: flex; gap: 12px; justify-content: center; align-items: center; margin: 24px 0; flex-wrap: wrap; }
.bet-row input { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); width: 120px; font-size: 1rem; }
.result-msg { font-size: 1.3rem; font-weight: 700; min-height: 30px; }
.result-msg.win { color: #22a341; }
.result-msg.lose { color: #e53935; }

.game-rules { margin-top: 32px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: left; }
.game-rules h4 { margin-bottom: 12px; color: var(--accent); font-size: 1rem; text-align: center; }
.game-rules table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.game-rules th { padding: 8px; text-align: left; color: var(--text-muted); border-bottom: 2px solid var(--border); font-size: 0.8rem; text-transform: uppercase; }
.game-rules td { padding: 8px; border-bottom: 1px solid var(--border); }
.game-rules td:last-child { text-align: right; font-weight: 700; color: var(--accent); }
.game-rules tr:last-child td { border-bottom: none; }
.game-rules .pair-row td { color: var(--text-muted); font-style: italic; }

/* ✅ НОВЫЕ СТИЛИ ДЛЯ МИН (СЮРПРИЗОВ) */
.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-width: 400px; margin: 0 auto; }
.mine-cell { width: 100%; aspect-ratio: 1; background: var(--bg-card); border: 2px solid var(--border); border-radius: 10px; font-size: 2rem; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden;}
.mine-cell:hover { border-color: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.mine-cell.revealed { background: var(--accent-2); color: #fff; cursor: default; box-shadow: 0 0 20px var(--accent-2); }
.mine-cell.mine { background: #e53935; color: #fff; }
body[data-theme="dark"] .mine-cell.revealed, body[data-admin="true"] .mine-cell.revealed { color: #000; }

/* Подсветка админа: теперь это не мины, а подсвеченные сюрпризы */
.mine-cell.admin-spy { opacity: 0.6; border-color: #e53935; box-shadow: inset 0 0 10px rgba(229, 57, 53, 0.5); }

.bj-card { display: inline-block; padding: 10px; background: #fff; color: #000; border-radius: 8px; border: 2px solid #ccc; box-shadow: 0 4px 10px rgba(0,0,0,0.2); margin: 2px; font-weight: bold; }
.bj-card.red { color: red; }

/* Модалки */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 100; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.modal-overlay.active { display: flex; }
.modal { background: var(--bg-card); border-radius: 20px; padding: 32px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; position: relative; border: 2px solid var(--border); box-shadow: 0 10px 50px rgba(0,0,0,0.3), 0 0 20px rgba(200, 16, 46, 0.2); }
.modal h2 { margin-bottom: 20px; color: var(--accent); }
.modal h2::after { content: ' ✨'; font-size: 1rem; vertical-align: middle; }
.modal-close { position: absolute; top: 16px; right: 16px; background: transparent; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-muted); }

.wallet-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.wallet-card { padding: 16px; border-radius: 12px; color: #fff; }
.wallet-card.casino { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
body[data-theme="dark"] .wallet-card.casino, body[data-admin="true"] .wallet-card.casino { color: #000; }
.wallet-card.sber { background: linear-gradient(135deg, #21a038, #4ade80); }
.wallet-label { font-size: 0.85rem; opacity: 0.9; margin-bottom: 6px; }
.wallet-amount { font-size: 1.4rem; font-weight: 800; }
.wallet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.wallet-action input { width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); margin-bottom: 8px; }
.wallet-action button { width: 100%; }
.wallet-history h4 { margin-bottom: 10px; }
.history-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 8px; }
.history-item { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; font-size: 0.9rem; border-bottom: 1px solid var(--border); }
.history-item:last-child { border-bottom: none; }
.history-item .positive { color: #22a341; font-weight: 700; }
.history-item .negative { color: #e53935; font-weight: 700; }
.history-item .ts { color: var(--text-muted); font-size: 0.75rem; }
.history-empty { color: var(--text-muted); text-align: center; padding: 12px; }

.sber-modal { max-width: 400px; }
.sber-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.sber-logo { background: #21a038; color: #fff; padding: 6px 14px; border-radius: 8px; font-weight: 800; letter-spacing: 1px; }
.sber-card { color: var(--text-muted); font-weight: 700; }
.sber-detail { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.sber-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }

.icon-coin { display: inline-block; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffec8b 0%, #f5c518 50%, #b8860b 100%); border: 3px solid #f5c518; box-shadow: inset 0 0 0 3px rgba(255,255,255,0.35), inset 0 0 15px rgba(0,0,0,0.25), 0 4px 12px rgba(0,0,0,0.3); vertical-align: middle; position: relative; }
.icon-coin::after { content: ''; position: absolute; top: 20%; left: 50%; transform: translateX(-50%); width: 4px; height: 60%; background: rgba(107, 75, 0, 0.5); border-radius: 2px; }
.icon-coin-lg { width: 2rem; height: 2rem; border-width: 2px; margin-right: 8px; }

#fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.win-text { position: absolute; left: 50%; transform: translate(-50%, -50%); font-weight: 900; text-align: center; white-space: nowrap; z-index: 10; font-family: 'Impact', sans-serif; }

.win-tier-1 { top: 40%; color: #4ade80; font-size: 4rem; text-shadow: 0 0 10px #4ade80; animation: popIn 0.5s forwards, floatUp 4s forwards; }
.win-tier-2 { top: 40%; color: #60a5fa; font-size: 5rem; text-shadow: 0 0 20px #60a5fa; animation: popIn 0.6s forwards, floatUp 4.5s forwards; }
.win-tier-3 { top: 35%; color: #d946ef; font-size: 6rem; text-shadow: 0 0 30px #d946ef; animation: popIn 0.7s forwards, floatUp 5s forwards, shake 0.5s infinite; }
.win-tier-4 { top: 30%; color: #fb923c; font-size: 7rem; text-shadow: 0 0 40px #fb923c; animation: popIn 0.8s forwards, floatUp 5.5s forwards, shakeHard 0.3s infinite; }
.win-tier-5 { top: 25%; color: #fbbf24; font-size: 8rem; text-shadow: 0 0 50px #ffd700; animation: popIn 1s forwards, floatUp 6s forwards, shakeHard 0.2s infinite; }
.win-tier-jackpot { top: 20%; font-size: 9rem; background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff); background-size: 400%; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: popIn 1.2s forwards, floatUp 7s forwards, rainbow 1s linear infinite, shakeHard 0.15s infinite; }

.win-counter { position: absolute; top: 55%; left: 50%; transform: translateX(-50%); color: #fff; font-size: 5rem; font-weight: 900; font-family: 'Courier New', monospace; text-shadow: 0 0 20px rgba(255,215,0,0.8), 0 4px 15px rgba(0,0,0,0.9); z-index: 11; letter-spacing: 2px; animation: fadeInOut 10s forwards; }

@keyframes popIn { 0% { transform: translate(-50%, -50%) scale(0.1); opacity: 0; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
@keyframes floatUp { 0% { margin-top: 0; } 100% { margin-top: -100px; } }
@keyframes shake { 0%,100% { transform: translate(-50%, -50%) rotate(0deg); } 25% { transform: translate(-52%, -48%) rotate(-2deg); } 75% { transform: translate(-48%, -52%) rotate(2deg); } }
@keyframes shakeHard { 0%,100% { transform: translate(-50%, -50%) scale(1.05) rotate(0deg); } 25% { transform: translate(-53%, -47%) scale(1.08) rotate(-3deg); } 75% { transform: translate(-47%, -53%) scale(1.08) rotate(3deg); } }
@keyframes rainbow { 0% { background-position: 0% 50%; } 100% { background-position: 400% 50%; } }
@keyframes fadeInOut { 0% { opacity: 0; } 10% { opacity: 1; } 95% { opacity: 1; } 100% { opacity: 0; } }
.fx-shake-screen { animation: screenShake 0.5s infinite; }
@keyframes screenShake { 0%, 100% { transform: translate(0, 0); } 10%, 30%, 50%, 70%, 90% { transform: translate(-5px, 5px); } 20%, 40%, 60%, 80% { transform: translate(5px, -5px); } }
.fx-flash { position: absolute; inset: 0; animation: flashAnim 1s ease-out forwards; }
.fx-flash-green { background: rgba(74, 222, 128, 0.4); } .fx-flash-blue { background: rgba(59, 130, 246, 0.5); } .fx-flash-purple { background: rgba(217, 70, 239, 0.6); } .fx-flash-orange { background: rgba(251, 146, 60, 0.7); } .fx-flash-gold { background: rgba(255, 215, 0, 0.8); }
@keyframes flashAnim { 0% { opacity: 0; } 10% { opacity: 1; } 100% { opacity: 0; } }
.particle { position: absolute; border-radius: 50%; animation: fall linear forwards; z-index: 5; }
@keyframes fall { 0% { top: -10%; transform: translateX(0) rotate(0deg); opacity: 1; } 100% { top: 110%; transform: translateX(var(--tx)) rotate(720deg); opacity: 0; } }
.explosion { position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; background: #ffd700; border-radius: 50%; animation: explode 2s forwards; z-index: 4; }
@keyframes explode { 0% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(calc(-50% + var(--ex)), calc(-50% + var(--ey))) scale(0); opacity: 0; } }

.roulette-wheel-container { position: relative; width: 200px; height: 200px; margin: 20px auto 30px; border-radius: 50%; background: conic-gradient( #e53935 0deg 9.7deg, #111 9.7deg 19.4deg, #e53935 19.4deg 29.1deg, #111 29.1deg 38.8deg, #e53935 38.8deg 48.5deg, #111 48.5deg 58.2deg, #e53935 58.2deg 67.9deg, #111 67.9deg 77.6deg, #e53935 77.6deg 87.3deg, #111 87.3deg 97deg, #e53935 97deg 106.7deg, #111 106.7deg 116.4deg, #e53935 116.4deg 126.1deg, #111 126.1deg 135.8deg, #e53935 135.8deg 145.5deg, #111 145.5deg 155.2deg, #e53935 155.2deg 164.9deg, #111 164.9deg 174.6deg, #21a038 174.6deg 184.3deg, #e53935 184.3deg 194deg, #111 194deg 203.7deg, #e53935 203.7deg 213.4deg, #111 213.4deg 223.1deg, #e53935 223.1deg 232.8deg, #111 232.8deg 242.5deg, #e53935 242.5deg 252.2deg, #111 252.2deg 261.9deg, #e53935 261.9deg 271.6deg, #111 271.6deg 281.3deg, #e53935 281.3deg 291deg, #111 291deg 300.7deg, #e53935 300.7deg 310.4deg, #111 310.4deg 320.1deg, #e53935 320.1deg 329.8deg, #111 329.8deg 339.5deg, #e53935 339.5deg 349.2deg, #111 349.2deg 358.9deg, #e53935 358.9deg 360deg ); border: 8px solid #8b4513; box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(0,0,0,0.8); transition: transform 2s cubic-bezier(0.25, 0.1, 0.1, 1); }
.roulette-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60px; height: 60px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 900; border: 4px solid #ffd700; box-shadow: 0 0 15px rgba(0,0,0,0.5); color: #000; z-index: 2; }
.roulette-wheel.spinning { animation: spinWheel 2s cubic-bezier(0.25, 0.1, 0.1, 1); }
@keyframes spinWheel { 0% { transform: rotate(0deg); } 100% { transform: rotate(1440deg); } }

.css-dice { width: 80px; height: 80px; background: #fff; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-size: 3rem; font-weight: 900; color: #000; cursor: pointer; margin: 0 auto; box-shadow: 0 10px 30px rgba(255,215,0,0.5); transition: transform 0.5s; }
.css-dice:hover { transform: scale(1.1) rotate(10deg); }

@media (max-width: 600px) {
  .reel { width: 70px; height: 90px; font-size: 2.5rem; }
  .dice-display { font-size: 5rem; min-height: 100px; }
  .coin { width: 110px; height: 110px; }
  .wallet-cards, .wallet-actions { grid-template-columns: 1fr; }
  .modal { padding: 24px 20px; }
  .win-tier-1 { font-size: 2.5rem; } .win-tier-2 { font-size: 3rem; } .win-tier-3 { font-size: 3.5rem; } .win-tier-4 { font-size: 4rem; } .win-tier-5 { font-size: 4.5rem; } .win-tier-jackpot { font-size: 5rem; } 
  .win-counter { font-size: 3rem; top: 60%; }
  .mines-grid { gap: 5px; }
  .mine-cell { font-size: 1.5rem; }
}

#appeal-text { font-family: 'Segoe UI', system-ui, sans-serif; font-size: 1rem; outline: none; }
#appeal-text:focus { border-color: var(--accent); box-shadow: 0 0 10px rgba(255, 215, 0, 0.2); }