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

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #1a1f2e;
    --bg-card: #222838;
    --bg-hover: #2a3040;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a8b8;
    --accent-gold: #ffd700;
    --accent-orange: #ff6b35;
    --success: #00c853;
    --error: #ff1744;
    --info: #2979ff;
    --border: #2a2f3e;
    --radius: 8px;
    --font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

a {
    color: var(--accent-gold);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.site-header {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--accent-gold);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-gold) !important;
    text-decoration: none !important;
    letter-spacing: 1px;
}

.main-nav {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.main-nav a {
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: background 0.2s;
}
.main-nav a:hover {
    background: var(--bg-hover);
    text-decoration: none;
}
.main-nav a.btn-logout {
    background: var(--error);
    color: #fff;
}
.main-nav a.btn-logout:hover {
    background: #d50000;
}

.user-balance {
    font-weight: 600;
    color: var(--accent-gold);
    font-size: 1.1rem;
    white-space: nowrap;
    text-align: center;
    width: 100%;
    order: 100;
    margin-top: 5px;
}


.nav-toggle-input {
    display: none;
}
.nav-toggle-label {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--accent-gold);
}

.main-content {
    flex: 1;
    padding: 40px 0;
}

.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 40px 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.site-footer .footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 30px;
    margin-bottom: 30px;
}
.site-footer h4 {
    color: var(--accent-gold);
    font-size: 1rem;
    margin: 0 0 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.site-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}
.site-footer a:hover {
    color: var(--accent-gold);
}
.site-footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.site-footer .footer-links li {
    margin-bottom: 8px;
}
.site-footer .footer-links li::before {
    content: "\203A";
    color: var(--accent-gold);
    margin-right: 8px;
    font-weight: bold;
}
.site-footer .footer-contact-item {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: flex-start;
}
.site-footer .footer-contact-item .icon {
    color: var(--accent-gold);
    flex-shrink: 0;
    font-size: 1.1rem;
}
.site-footer .footer-bottom {
    border-top: 1px solid var(--border);
    padding: 15px 0;
    text-align: center;
    font-size: 0.85rem;
}
.site-footer .footer-compliance {
    border-top: 1px solid var(--border);
    padding: 22px 0 18px;
    text-align: center;
}
.site-footer .footer-compliance-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.site-footer .footer-age-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 2px solid var(--accent-gold);
    border-radius: 50%;
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 1px;
}
.site-footer .footer-disclaimer {
    margin: 0 auto;
    max-width: 760px;
    line-height: 1.6;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.site-footer .footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    font-size: 0.85rem;
}
.site-footer .footer-legal-links a {
    color: var(--text-secondary);
    text-decoration: none;
}
.site-footer .footer-legal-links a:hover {
    color: var(--accent-gold);
}
.page-content h2 {
    color: var(--accent-gold);
    margin: 0 0 16px;
    font-size: 1.5rem;
}
.page-content h3 {
    color: var(--text-primary);
    margin: 26px 0 10px;
    font-size: 1.1rem;
}
.page-content p,
.page-content li {
    line-height: 1.7;
    color: var(--text-secondary);
}
.page-content ul {
    margin: 0 0 14px;
    padding-left: 22px;
}
.page-content a {
    color: var(--accent-gold);
}
@media (max-width: 768px) {
    .site-footer .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

.flash {
    padding: 12px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 500;
}
.flash-success { background: #1b5e20; color: #a5d6a7; border: 1px solid #2e7d32; }
.flash-error { background: #b71c1c; color: #ef9a9a; border: 1px solid #c62828; }
.flash-info { background: #0d47a1; color: #90caf9; border: 1px solid #1565c0; }

.page-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--accent-gold);
    text-align: center;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
}
.card h2, .card h3 {
    margin-bottom: 15px;
    color: var(--accent-gold);
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none !important;
    font-family: var(--font);
}
.btn:hover {
    transform: translateY(-1px);
}
.btn:active {
    transform: translateY(0);
}
.btn-primary {
    background: var(--accent-gold);
    color: #1a1a1a;
}
.btn-primary:hover {
    background: #e6c200;
}
.btn-danger {
    background: var(--error);
    color: #fff;
}
.btn-danger:hover {
    background: #d50000;
}
.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover {
    background: #00a844;
}
.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}
.btn-active {
    background: var(--accent-gold);
    color: #1a1a1a;
}
.btn-disabled {
    background: var(--bg-primary);
    color: var(--text-secondary);
    opacity: 0.5;
    cursor: default;
}
.btn-page-info {
    background: transparent;
    color: var(--accent-gold);
    font-weight: 600;
    cursor: default;
    min-width: auto;
    padding: 4px 8px;
}

/* Profile dropdown */
.profile-dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font: inherit;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 0.9rem;
}
.dropdown-toggle:hover {
    color: var(--accent-gold);
}
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 220px;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}
.dropdown-menu a:last-child {
    border-bottom: none;
}
.dropdown-menu a:hover {
    background: var(--bg-primary);
    color: var(--accent-gold);
}

form {
    max-width: 500px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-weight: 500;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}
.form-group textarea {
    resize: vertical;
    min-height: 100px;
}
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
table th, table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
table th {
    background: var(--bg-secondary);
    color: var(--accent-gold);
    font-weight: 600;
}
table tr:hover td {
    background: var(--bg-hover);
}
table .status-active { color: var(--success); }
table .status-banned { color: var(--error); }
table .status-inactive { color: var(--text-secondary); }

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin-top: 20px;
    align-items: center;
}

.game-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 20px;
    justify-content: center;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
    width: 320px;
    max-width: 100%;
}
.game-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-4px);
}
.game-card-image {
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
}
.game-card h3 {
    font-size: 1.4rem;
    color: var(--accent-gold);
    margin-bottom: 10px;
}
.game-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.promo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
}
.promo-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
    width: 300px;
    max-width: 100%;
}
.promo-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-3px);
}
.promo-card-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}
.promo-card-body {
    padding: 16px;
}
.promo-card-body h3 {
    color: var(--accent-gold);
    font-size: 1.1rem;
    margin: 0 0 8px;
}
.promo-card-body p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0 0 12px;
    line-height: 1.5;
}
.promo-card-meta {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.promo-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
}
.promo-badge-match { background: rgba(40,167,69,0.15); color: #4caf50; }
.promo-badge-fs    { background: rgba(23,162,184,0.15); color: #17a2b8; }
.promo-badge-first { background: rgba(255,193,7,0.15); color: #ffc107; }
.promo-badge-min   { background: rgba(255,255,255,0.05); color: var(--text-secondary); }
.promo-card-btn { font-size: 0.85rem; }

.game-card .game-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.free-spins-pill {
    display:inline-block;
    padding:6px 16px;
    background:linear-gradient(135deg,#1a237e,#283593);
    border:1px solid #5c6bc0;
    border-radius:20px;
    color:#90caf9;
    font-weight:700;
    font-size:0.9rem;
    white-space:nowrap;
    animation:pulseGlow 1.5s ease-in-out infinite alternate;
}
@keyframes pulseGlow {
    from { box-shadow: 0 0 8px rgba(92,107,192,0.3); }
    to { box-shadow: 0 0 20px rgba(92,107,192,0.6); }
}
.win-modal-overlay {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}
.modal-overlay {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}
.win-modal-content {
    background: var(--bg-card);
    border: 2px solid var(--accent-gold);
    border-radius: 12px;
    padding: 35px 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: scaleIn 0.3s ease;
    box-shadow: 0 0 60px rgba(255,215,0,0.15);
}
.win-modal-content h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}
.win-modal-content .win-lines {
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    margin: 15px 0;
}
.win-modal-content .win-lines ul {
    list-style: none;
    padding: 0;
}
.win-modal-content .win-lines li {
    padding: 4px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.win-modal-close {
    margin-top: 18px;
    padding: 10px 40px;
    cursor: pointer;
}
.win-modal-jackpot .win-modal-content { border-color: #e040fb; box-shadow: 0 0 80px rgba(224,64,251,0.3); }
.win-modal-jackpot .win-modal-content h3 { color: #e040fb; }
.win-modal-mega .win-modal-content { border-color: #ff1744; box-shadow: 0 0 60px rgba(255,23,68,0.25); }
.win-modal-mega .win-modal-content h3 { color: #ff1744; }
.win-modal-big .win-modal-content { border-color: #ff6f00; box-shadow: 0 0 40px rgba(255,111,0,0.2); }
.win-modal-big .win-modal-content h3 { color: #ff6f00; }
.win-modal-no .win-modal-content { border-color: var(--border); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes coinPop { 0% { transform: scale(0) translateY(0); opacity: 0; } 25% { transform: scale(1.2) translateY(-15px); opacity: 1; } 40% { transform: scale(1) translateY(-25px); opacity: 1; } 70% { transform: scale(1) translateY(-35px); opacity: 0.8; } 100% { transform: scale(0.8) translateY(-50px); opacity: 0; } }
@keyframes scaleIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.slot-reels-bg {
    background-size: cover !important;
    background-position: center !important;
}
.slot-reels-bg.ov-dark {
    background-blend-mode: overlay;
}
.slot-reels-bg.ov-gradient {
    background-image: linear-gradient(135deg,rgba(10,14,23,0.7) 0%,rgba(10,14,23,0.2) 50%,rgba(10,14,23,0.7) 100%), var(--bg-img) !important;
}
.slot-reels-bg.ov-blur {
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}
.slot-reels-bg.ov-dim {
    background-blend-mode: multiply;
    background-color: rgba(0,0,0,0.3);
}
.slot-reels-bg.ov-vignette {
    background-image: radial-gradient(ellipse at center,transparent 40%,rgba(0,0,0,0.7) 100%), var(--bg-img) !important;
}
.slot-reels-bg.ov-none {
    background-blend-mode: normal;
}
.slot-machine {
    max-width: 750px;
    margin: 0 auto;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    text-align: center;
}

.slot-frame {
    background: linear-gradient(180deg, #16162a 0%, #0d0d1a 100%);
    border: 2px solid rgba(255,215,0,0.15);
    border-radius: 16px;
    box-shadow: 0 0 0 1px rgba(255,215,0,0.08), 0 8px 40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.04);
    overflow: hidden;
}

.slot-frame-header {
    background: linear-gradient(90deg, #1a1a2e, #222840, #1a1a2e);
    padding: 10px 20px;
    border-bottom: 1px solid #2a2a3e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
}

.slot-frame-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e8e8e8;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.slot-frame-title .game-name {
    color: var(--accent-gold);
    font-weight: 700;
}

.slot-frame-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.slot-frame-body {
    padding: 20px 20px 0;
}

/* ===== STATUS BAR ===== */
.status-bar {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 8px 20px;
    margin: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2), transparent);
    border-top: 1px solid rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 24px;
    min-width: 90px;
}

.status-item + .status-item {
    border-left: 1px solid rgba(255,255,255,0.06);
}

.status-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.status-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e8e8e8;
}

.status-value.gold {
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(255,215,0,0.3);
}

.status-value.green {
    color: var(--success);
}

.status-value.blue {
    color: #90caf9;
}

/* ===== CONTROLS PANEL ===== */
.controls-panel {
    padding: 16px 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bet-adjuster {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 4px;
}

.bet-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    font-family: var(--font);
    line-height: 1;
    -webkit-user-select: none;
    user-select: none;
}

.bet-btn:hover {
    background: rgba(255,215,0,0.15);
    color: var(--accent-gold);
}

.bet-btn:active {
    background: rgba(255,215,0,0.25);
}

.bet-display {
    min-width: 80px;
    text-align: center;
    padding: 0 8px;
}

.bet-display .bet-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.bet-display .bet-label {
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-top: 1px;
}

.bet-presets {
    display: flex;
    gap: 3px;
    margin-left: 4px;
}

.bet-preset-btn {
    padding: 4px 8px;
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
    line-height: 1;
}

.bet-preset-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: rgba(255,215,0,0.08);
}

.spin-btn {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #ffd700 0%, #f0a500 100%);
    color: #1a1a2e;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 0 20px rgba(255,215,0,0.3), 0 4px 15px rgba(0,0,0,0.3);
    font-family: var(--font);
    line-height: 1;
    flex-shrink: 0;
}

.spin-btn::before {
    content: '';
    position: absolute;
    top: 3px; left: 3px; right: 3px; bottom: 3px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    pointer-events: none;
}

.spin-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255,215,0,0.5), 0 6px 20px rgba(0,0,0,0.4);
}

.spin-btn:active {
    transform: scale(0.97);
}

.spin-btn:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
    animation: spinBtnPulse 1s ease-in-out infinite;
}

@keyframes spinBtnPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(255,215,0,0.3), 0 4px 15px rgba(0,0,0,0.3); }
    50% { box-shadow: 0 0 40px rgba(255,215,0,0.6), 0 4px 20px rgba(0,0,0,0.4); }
}

.spin-btn .spin-icon {
    font-size: 1.6rem;
    line-height: 1;
    margin-top: -2px;
}

.spin-btn .spin-label {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: -2px;
}

.autospin-panel {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 4px;
}

.autospin-btn {
    height: 36px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
    font-family: var(--font);
    white-space: nowrap;
}

.autospin-btn:hover {
    background: rgba(144,202,249,0.12);
    color: #90caf9;
}

.autospin-btn.active {
    background: #c62828;
    color: #fff;
}

.autospin-select {
    height: 36px;
    padding: 0 8px;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    min-width: 50px;
}

.autospin-select:focus {
    outline: none;
}

.autospin-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.slot-reels {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: stretch;
    overflow: hidden;
    position: relative;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #0d0d1a, #1a1a2e);
    padding: 12px;
    border-radius: var(--radius);
    box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
}
.slot-reel {
    flex: 1;
    max-width: 120px;
    min-width: 0;
}
.reel-viewport {
    overflow: hidden;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / var(--rows, 3);
    border-radius: 6px;
}
.reel-strip {
    display: grid;
    grid-template-rows: repeat(var(--rows, 3), 1fr);
    height: 100%;
    will-change: transform;
}

.symbol {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
    border: 2px solid #3a3a4e;
    border-radius: 10px;
    font-size: min(6vw, 3rem);
    line-height: 1;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    -webkit-user-select: none;
    user-select: none;
    overflow: hidden;
}
.sym-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90%;
    height: 90%;
    text-align: center;
    line-height: 1;
}

.symbol-highlight,
.slot-cell.win {
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 20px var(--accent-gold), inset 0 0 10px rgba(255,215,0,0.2) !important;
    transform: scale(1.05);
}

.no-cell-border .symbol,
.no-cell-border .slot-cell {
    border: 0;
    box-shadow: none;
}
.slot-cell img {
    width: 92%;
    height: 92%;
    object-fit: cover;
}

.slot-controls {
    margin-top: 10px;
}
.slot-controls .bet-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}
.slot-controls .bet-control label {
    color: var(--text-secondary);
    font-weight: 500;
}
.slot-controls .bet-control input {
    width: 120px;
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    text-align: center;
}

.win-display {
    margin: 20px 0;
    padding: 15px;
    background: #1b5e20;
    border: 1px solid #2e7d32;
    border-radius: var(--radius);
}
.win-display h3 {
    color: var(--success);
    font-size: 1.3rem;
}
.win-display p {
    color: #a5d6a7;
}

.win-lines {
    margin-top: 15px;
    text-align: left;
}
.win-lines h4 {
    color: var(--accent-gold);
    margin-bottom: 10px;
}
.win-lines ul {
    list-style: none;
}
.win-lines li {
    padding: 4px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-gold);
}
.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 5px;
}

.admin-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.admin-nav a {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-weight: 500;
}
.admin-nav a:hover {
    background: var(--bg-hover);
    border-color: var(--accent-gold);
    text-decoration: none;
}

/* ===== ADMIN SIDEBAR ===== */

.admin-sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    width: 200px;
    height: calc(100vh - 56px);
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding-top: 8px;
    overflow-y: auto;
    z-index: 100;
}
.admin-sidebar-header {
    padding: 10px 16px 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-gold);
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.admin-sidebar a {
    display: block;
    padding: 9px 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.admin-sidebar a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    text-decoration: none;
}
.admin-sidebar a.active {
    background: var(--accent-gold);
    color: #1a1a1a;
}

.admin-content {
    margin-left: 200px;
    min-width: 0;
}

@media (max-width: 900px) {
    .admin-sidebar {
        width: 48px;
        overflow: hidden;
    }
    .admin-sidebar:hover {
        width: 200px;
        overflow-y: auto;
    }
    .admin-sidebar-header { display: none; }
    .admin-sidebar a { padding: 12px; text-align: center; }
    .admin-content { margin-left: 48px; }
}

/* ===== TOUCH TARGET SIZING ===== */
@media (hover: none) and (pointer: coarse) {
    .bet-btn, .spin-btn, .bet-preset-btn, .autospin-btn, .info-btn,
    .game-card a, .game-card button, .nav-toggle-label, .dropdown-toggle {
        min-height: 44px;
        min-width: 44px;
    }
    .bet-btn { font-size: 1.3rem; }
    .bet-preset-btn { padding: 8px 12px; font-size: 0.75rem; }
    .autospin-btn { height: 44px; }
    .autospin-select { height: 44px; font-size: 0.85rem; }
    .slot-frame-actions .btn { height: 44px; font-size: 0.8rem !important; padding: 4px 14px !important; }
}

/* ===== WIN HIGHLIGHT PULSE ===== */

@keyframes winPulse {
    0% { border-color: var(--border); box-shadow: none; transform: scale(1); }
    8% { border-color: var(--accent-gold); box-shadow: 0 0 20px var(--accent-gold), inset 0 0 10px rgba(255,215,0,0.2); transform: scale(1.05); }
    25% { box-shadow: 0 0 30px var(--accent-gold), 0 0 50px rgba(255,215,0,0.4), inset 0 0 10px rgba(255,215,0,0.2); }
    50% { box-shadow: 0 0 20px var(--accent-gold), 0 0 40px rgba(255,215,0,0.5), 0 0 60px rgba(255,215,0,0.2); }
    100% { border-color: var(--accent-gold); box-shadow: 0 0 20px var(--accent-gold), inset 0 0 10px rgba(255,215,0,0.2); transform: scale(1.05); }
}

@keyframes winBannerSlide {
    0% { transform: translateY(-30px) scale(0.9); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes noWinFade {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes spinBtnGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 40px rgba(255, 215, 0, 0.2); }
}

.win-display {
    animation: winBannerSlide 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 2.2s;
}

.slot-controls .btn-primary {
    animation: spinBtnGlow 2s ease-in-out infinite;
}

.no-win {
    animation: noWinFade 0.8s ease-out both;
    animation-delay: 2.2s;
}

/* ===== WIN TIER ANIMATIONS ===== */

@keyframes winBigPulse {
    0% { border-color: #ffd700; box-shadow: 0 0 20px #ffd700, 0 0 40px rgba(255,215,0,0.3); transform: scale(1); }
    50% { border-color: #ffab00; box-shadow: 0 0 40px #ffd700, 0 0 80px rgba(255,215,0,0.5), 0 0 120px rgba(255,215,0,0.2); transform: scale(1.03); }
    100% { border-color: #ffd700; box-shadow: 0 0 20px #ffd700, 0 0 40px rgba(255,215,0,0.3); transform: scale(1); }
}

@keyframes winMegaPulse {
    0% { border-color: #ff1744; box-shadow: 0 0 30px #ff1744, 0 0 60px rgba(255,23,68,0.4), 0 0 100px rgba(255,23,68,0.2); transform: scale(1.05); }
    25% { border-color: #ffea00; box-shadow: 0 0 40px #ffea00, 0 0 80px rgba(255,234,0,0.5), 0 0 120px rgba(255,234,0,0.3); transform: scale(1); }
    50% { border-color: #00e5ff; box-shadow: 0 0 30px #00e5ff, 0 0 60px rgba(0,229,255,0.4), 0 0 100px rgba(0,229,255,0.2); transform: scale(1.05); }
    75% { border-color: #d500f9; box-shadow: 0 0 40px #d500f9, 0 0 80px rgba(213,0,249,0.5), 0 0 120px rgba(213,0,249,0.3); transform: scale(1); }
    100% { border-color: #ff1744; box-shadow: 0 0 30px #ff1744, 0 0 60px rgba(255,23,68,0.4), 0 0 100px rgba(255,23,68,0.2); transform: scale(1.05); }
}

@keyframes winMegaShake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-8px) rotate(-1deg); }
    20% { transform: translateX(8px) rotate(1deg); }
    30% { transform: translateX(-6px) rotate(-0.5deg); }
    40% { transform: translateX(6px) rotate(0.5deg); }
    50% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
    70% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
}

@keyframes jackpotPulse {
    0% { border-color: #e040fb; box-shadow: 0 0 40px #e040fb, 0 0 80px rgba(224,64,251,0.4), 0 0 120px rgba(224,64,251,0.2); transform: scale(1.05); }
    33% { border-color: #ffd700; box-shadow: 0 0 50px #ffd700, 0 0 100px rgba(255,215,0,0.5), 0 0 150px rgba(255,215,0,0.3); transform: scale(1); }
    66% { border-color: #ff1744; box-shadow: 0 0 40px #ff1744, 0 0 80px rgba(255,23,68,0.4), 0 0 120px rgba(255,23,68,0.2); transform: scale(1.08); }
    100% { border-color: #e040fb; box-shadow: 0 0 40px #e040fb, 0 0 80px rgba(224,64,251,0.4), 0 0 120px rgba(224,64,251,0.2); transform: scale(1.05); }
}

@keyframes megaOverlayFade {
    0% { opacity: 0; }
    10% { opacity: 0.6; }
    80% { opacity: 0.6; }
    100% { opacity: 0; }
}

.win-display.win-big {
    background: linear-gradient(135deg, #3e2723, #4e342e);
    border-color: #ffd700;
}
.win-display.win-big h3 {
    color: #ffd700;
    font-size: 1.6rem;
    text-shadow: 0 0 20px rgba(255,215,0,0.5);
    animation: winBigPulse 1.5s ease-in-out 3 both;
}

.win-display.win-jackpot {
    background: linear-gradient(135deg, #4a0072, #880e4f);
    border-color: #e040fb;
    border-width: 3px;
    animation: winMegaShake 0.6s ease-in-out 5 both,
               jackpotPulse 1s ease-in-out infinite;
    z-index: 10;
    position: relative;
}
.win-display.win-jackpot h3 {
    color: #ea80fc;
    font-size: 2rem;
    text-shadow: 0 0 30px rgba(224,64,251,0.6), 0 0 60px rgba(224,64,251,0.3);
    animation: jackpotPulse 1s ease-in-out infinite;
}

.win-display.win-mega {
    background: linear-gradient(135deg, #4a0010, #1a0030);
    border-color: #ff1744;
    border-width: 3px;
    animation: winMegaShake 0.8s ease-in-out 3 both,
               winMegaPulse 1.2s ease-in-out infinite;
    z-index: 10;
    position: relative;
}
.win-display.win-mega h3 {
    color: #ffea00;
    font-size: 2rem;
    text-shadow: 0 0 30px rgba(255,234,0,0.6), 0 0 60px rgba(255,234,0,0.3);
    animation: winMegaPulse 1.2s ease-in-out infinite;
}

.mega-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center, rgba(255,23,68,0.3) 0%, rgba(213,0,249,0.2) 50%, transparent 80%);
    pointer-events: none;
    z-index: 5;
    animation: megaOverlayFade 3s ease-out forwards;
}

.jp-display {
    margin: 0 0 2px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #333;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 8px;
    animation: winBannerSlide 0.6s ease-out both;
    flex-wrap: wrap;
}
.jp-tier {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 14px;
    min-width: 80px;
    text-align: center;
}
.jp-tier + .jp-tier {
    border-left: 1px solid #333;
    padding-left: 18px;
}
.jp-tier-label {
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.jp-tier-amount {
    font-weight: 700;
    color: #ffd700;
    font-size: 1.1rem;
    text-shadow: 0 0 8px rgba(255,215,0,0.4);
}

.global-jp-bar,
.global-jp-display {
    margin: 10px 0 15px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1a0a00, #3d1f00);
    border: 2px solid #ffd700;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    animation: winBannerSlide 0.8s ease-out both;
    box-shadow: 0 0 30px rgba(255,215,0,0.15), inset 0 0 30px rgba(255,215,0,0.05);
    flex-wrap: wrap;
}
.global-jp-bar-label,
.global-jp-label {
    font-weight: 800;
    font-size: 0.85rem;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 12px rgba(255,215,0,0.5);
}
.global-jp-bar-amount,
.global-jp-amount {
    font-weight: 800;
    font-size: 1.5rem;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255,215,0,0.6);
}
.global-jp-banner {
    margin: 20px auto 25px;
    padding: 16px 30px;
    background: linear-gradient(135deg, #1a0a00, #3d1f00);
    border: 3px solid #ffd700;
    border-radius: var(--radius);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 650px;
    box-shadow: 0 0 40px rgba(255,215,0,0.15), inset 0 0 40px rgba(255,215,0,0.05);
    animation: winBannerSlide 0.8s ease-out both;
}
.global-jp-banner-label {
    font-weight: 800;
    font-size: 1rem;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 15px rgba(255,215,0,0.5);
}
.global-jp-banner-amount {
    font-weight: 800;
    font-size: 2rem;
    color: #ffd700;
    text-shadow: 0 0 30px rgba(255,215,0,0.7);
}

.game-features {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 15px 0;
    flex-wrap: wrap;
}
.feature-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.wild-badge { background: #4a148c; color: #ea80fc; border: 1px solid #e040fb; }
.mult-badge { background: #e65100; color: #ffe0b2; border: 1px solid #ff9100; }
.star-badge { background: #1a237e; color: #90caf9; border: 1px solid #3f51b5; }
.jp-badge { background: #b71c1c; color: #ffcdd2; border: 1px solid #f44336; }

.info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.2s;
}
.info-btn:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.info-modal-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}
.info-modal-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius);
    background: var(--bg-primary);
    font-size: 0.9rem;
}

.bet-presets {
    display: flex;
    gap: 4px;
}
.bet-preset {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 4px 10px;
    font-size: 0.75rem;
    cursor: pointer;
}
.bet-preset:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

@media (max-width: 768px) {
    .nav-toggle-label {
        display: block;
    }
    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 5px;
    }
    .nav-toggle-input:checked ~ .main-nav {
        display: flex;
    }
    .slot-reels {
        padding: 6px;
        gap: 4px;
    }
    .symbol {
        font-size: 0.65rem;
    }
    .game-grid {
        flex-direction: column;
        align-items: center;
    }
    .header-inner {
        gap: 10px;
    }
    .user-balance {
        margin-top: 8px;
    }
    .profile-dropdown {
        width: 100%;
    }
    .dropdown-toggle {
        width: 100%;
        text-align: left;
    }
    .dropdown-menu {
        left: 0;
        transform: none;
        width: 100%;
        position: static;
        box-shadow: none;
    }
    .slot-frame-body {
        padding: 10px 8px;
    }
    .slot-frame-header {
        padding: 8px 12px;
        flex-wrap: wrap;
    }
    .slot-frame-actions {
        gap: 4px;
    }
    .status-bar {
        padding: 6px 8px;
        flex-wrap: wrap;
        gap: 0;
    }
    .status-item {
        padding: 4px 12px;
        min-width: 60px;
    }
    .status-value {
        font-size: 1rem;
    }
    .controls-panel {
        padding: 12px 8px 16px;
        gap: 8px;
    }
    .bet-adjuster {
        padding: 3px;
    }
    .bet-btn {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    .bet-display {
        min-width: 60px;
        padding: 0 4px;
    }
    .bet-display .bet-amount {
        font-size: 0.95rem;
    }
    .spin-btn {
        width: 52px;
        height: 52px;
    }
    .spin-btn .spin-icon {
        font-size: 1.3rem;
    }
    .autospin-panel {
        padding: 3px;
    }
    .autospin-btn {
        height: 30px;
        font-size: 0.7rem;
        padding: 0 10px;
    }
    .autospin-select {
        height: 30px;
        font-size: 0.7rem;
        min-width: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    .slot-reels {
        gap: 4px;
        padding: 6px;
        margin-bottom: 12px;
    }
    .slot-frame-body {
        padding: 6px 4px;
    }
    .slot-frame-header {
        padding: 6px 8px;
    }
    .slot-frame-actions {
        gap: 3px;
    }
    .slot-frame-actions .btn,
    .slot-frame-actions .info-btn {
        font-size: 0.58rem !important;
        padding: 2px 6px !important;
        height: 36px;
    }
    .status-bar {
        padding: 4px 4px;
        gap: 0;
    }
    .status-item {
        padding: 3px 6px;
        min-width: 0;
    }
    .status-label {
        font-size: 0.55rem;
        letter-spacing: 0.5px;
    }
    .status-value {
        font-size: 0.85rem;
    }
    .controls-panel {
        padding: 8px 4px 12px;
        gap: 6px;
    }
    .bet-adjuster {
        gap: 3px;
        padding: 2px;
    }
    .bet-btn {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    .bet-display {
        min-width: 44px;
        padding: 0 2px;
    }
    .bet-display .bet-amount {
        font-size: 0.8rem;
    }
    .bet-display .bet-label {
        font-size: 0.5rem;
    }
    .bet-presets {
        gap: 2px;
        margin-left: 2px;
    }
    .bet-preset-btn {
        padding: 3px 5px;
        font-size: 0.55rem;
    }
    .spin-btn {
        width: 44px;
        height: 44px;
    }
    .spin-btn .spin-icon {
        font-size: 1.1rem;
    }
    .spin-btn .spin-label {
        font-size: 0.55rem;
    }
    .autospin-panel {
        padding: 2px;
    }
    .autospin-btn {
        height: 28px;
        font-size: 0.6rem;
        padding: 0 6px;
    }
    .autospin-select {
        height: 28px;
        font-size: 0.6rem;
        min-width: 34px;
    }
    .symbol {
        font-size: min(5vw, 2rem);
        border-width: 1px;
        border-radius: 6px;
    }
    .slot-cell img {
        width: 88%;
        height: 88%;
    }
    .reel-viewport {
        border-radius: 4px;
    }
    .game-card {
        width: 100%;
        padding: 16px;
    }
    .game-card-image {
        max-height: 120px;
    }
    .global-jp-banner {
        padding: 8px 10px;
        font-size: 1rem;
    }
    .page-title {
        font-size: 1.3rem;
    }
}

/* ===== COIN BURST ANIMATION ===== */
.coin-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.coin {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff4a3, #ffd700 40%, #b8860b 80%);
    border: 2px solid #daa520;
    opacity: 0;
    box-shadow: 0 0 8px 3px rgba(255,215,0,0.4), inset 0 0 6px rgba(255,255,200,0.3);
}

.coin-silver {
    background: radial-gradient(circle at 35% 35%, #f0f0f0, #c0c0c0 40%, #808080 80%);
    border: 2px solid #a9a9a9;
    box-shadow: 0 0 8px 3px rgba(192,192,192,0.4), inset 0 0 6px rgba(255,255,255,0.3);
}

.coin-bronze {
    background: radial-gradient(circle at 35% 35%, #f4a460, #cd7f32 40%, #8b4513 80%);
    border: 2px solid #b87333;
    box-shadow: 0 0 8px 3px rgba(205,127,50,0.4), inset 0 0 6px rgba(255,200,150,0.3);
}

/* Shimmer highlight sweep */
.coin::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, transparent 25%, rgba(255,255,255,0.5) 45%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0.5) 55%, transparent 75%);
    background-size: 200% 200%;
    background-position: 100% 100%;
    animation: coinShimmer 0.8s ease-in-out infinite;
    pointer-events: none;
}

.coin-silver::before {
    background: linear-gradient(135deg, transparent 25%, rgba(255,255,255,0.6) 45%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0.6) 55%, transparent 75%);
    background-size: 200% 200%;
    background-position: 100% 100%;
}

.coin-bronze::before {
    background: linear-gradient(135deg, transparent 25%, rgba(255,220,180,0.5) 45%, rgba(255,220,180,0.8) 50%, rgba(255,220,180,0.5) 55%, transparent 75%);
    background-size: 200% 200%;
    background-position: 100% 100%;
}

@keyframes coinShimmer {
    0%, 100% { background-position: 100% 100%; }
    50% { background-position: 0% 0%; }
}

.coin::after {
    content: 'R';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    font-weight: 900;
    color: #b8860b;
    text-shadow: 0 0 2px rgba(0,0,0,0.3);
    font-family: Arial, Helvetica, sans-serif;
}

.coin-silver::after { color: #666666; }
.coin-bronze::after { color: #6b3a1f; }

.coin-xl { width: 32px; height: 32px; }
.coin-xl::after { font-size: 16px; }
.coin-big { width: 24px; height: 24px; }
.coin-big::after { font-size: 13px; }
.coin-med { width: 18px; height: 18px; }
.coin-med::after { font-size: 10px; }
.coin-small { width: 12px; height: 12px; }
.coin-small::after { font-size: 7px; }
.coin-xs { width: 8px; height: 8px; }
.coin-xs::after { font-size: 5px; }

@keyframes coinBurstL {
    0% { transform: translate(calc(50vw - 50%), calc(50vh - 50%)) scale(0) rotate(0deg); opacity: 0; }
    5% { opacity: 1; transform: translate(calc(50vw - 50%), calc(50vh - 50%)) scale(1) rotate(0deg); }
    30% { transform: translate(calc(50vw - 50% - 25vw), calc(50vh - 50% - 20vh)) rotate(180deg); opacity: 1; }
    60% { transform: translate(calc(50vw - 50% - 40vw), calc(50vh - 50% + 10vh)) rotate(360deg); opacity: 0.9; }
    100% { transform: translate(calc(50vw - 50% - 50vw), 110vh) rotate(720deg); opacity: 0; }
}

@keyframes coinBurstR {
    0% { transform: translate(calc(50vw - 50%), calc(50vh - 50%)) scale(0) rotate(0deg); opacity: 0; }
    5% { opacity: 1; transform: translate(calc(50vw - 50%), calc(50vh - 50%)) scale(1) rotate(0deg); }
    30% { transform: translate(calc(50vw - 50% + 25vw), calc(50vh - 50% - 20vh)) rotate(180deg); opacity: 1; }
    60% { transform: translate(calc(50vw - 50% + 40vw), calc(50vh - 50% + 10vh)) rotate(360deg); opacity: 0.9; }
    100% { transform: translate(calc(50vw - 50% + 50vw), 110vh) rotate(720deg); opacity: 0; }
}

@keyframes coinBurstC {
    0% { transform: translate(calc(50vw - 50%), calc(50vh - 50%)) scale(0) rotate(0deg); opacity: 0; }
    5% { opacity: 1; transform: translate(calc(50vw - 50%), calc(50vh - 50%)) scale(1) rotate(0deg); }
    30% { transform: translate(calc(50vw - 50% + 3vw), calc(50vh - 50% - 25vh)) rotate(180deg); opacity: 1; }
    60% { transform: translate(calc(50vw - 50% - 2vw), calc(50vh - 50% + 15vh)) rotate(360deg); opacity: 0.9; }
    100% { transform: translate(calc(50vw - 50% + 1vw), 110vh) rotate(720deg); opacity: 0; }
}

.coin-burst-l { animation: coinBurstL cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.coin-burst-r { animation: coinBurstR cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.coin-burst-c { animation: coinBurstC cubic-bezier(0.4, 0, 0.2, 1) forwards; }

/* Reel burst — cascades from center of reels to bottom of machine */
.reel-burst-l { animation: reelBurstL cubic-bezier(0.3, 0, 0.2, 1) forwards; }
.reel-burst-r { animation: reelBurstR cubic-bezier(0.3, 0, 0.2, 1) forwards; }
.reel-burst-c { animation: reelBurstC cubic-bezier(0.3, 0, 0.2, 1) forwards; }

@keyframes reelBurstL {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    5% { transform: scale(1.2) rotate(0deg); opacity: 1; }
    25% { transform: translate(-60px, 20px) rotate(180deg); opacity: 1; }
    55% { transform: translate(-120px, 120px) rotate(360deg); opacity: 0.9; }
    100% { transform: translate(-160px, 280px) rotate(720deg); opacity: 0; }
}
@keyframes reelBurstR {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    5% { transform: scale(1.2) rotate(0deg); opacity: 1; }
    25% { transform: translate(60px, 20px) rotate(180deg); opacity: 1; }
    55% { transform: translate(120px, 120px) rotate(360deg); opacity: 0.9; }
    100% { transform: translate(160px, 280px) rotate(720deg); opacity: 0; }
}
@keyframes reelBurstC {
    0% { transform: scale(0) rotate(0deg); opacity: 0; }
    5% { transform: scale(1.2) rotate(0deg); opacity: 1; }
    25% { transform: translate(0, -40px) rotate(180deg); opacity: 1; }
    55% { transform: translate(0, 80px) rotate(360deg); opacity: 0.9; }
    100% { transform: translate(0, 260px) rotate(720deg); opacity: 0; }
}

@keyframes coinFly {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(0deg); }
    8% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(20deg); }
    100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.4) rotate(720deg); }
}

/* Sparkle particles */
.sparkle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 4px 2px rgba(255,255,255,0.7);
    opacity: 0;
    pointer-events: none;
    animation: sparkleBurst 1.5s ease-out forwards;
}
@keyframes sparkleBurst {
    0% { transform: scale(0) translateY(0); opacity: 0; }
    15% { opacity: 1; transform: scale(1) translateY(-10px); }
    60% { opacity: 0.6; transform: scale(0.5) translateY(-30px); }
    100% { opacity: 0; transform: scale(0) translateY(-50px); }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}
.modal-close:hover {
    color: var(--text-primary);
}

/* ----- Auth Modal Modern Styles ----- */
.auth-modal-overlay {
    background: rgba(0,0,0,0.85) !important;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.auth-modal-content {
    background: linear-gradient(135deg, rgba(34,40,56,0.97) 0%, rgba(26,31,46,0.97) 100%) !important;
    border: 1px solid rgba(255,215,0,0.2) !important;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5), 0 0 40px rgba(255,215,0,0.05) !important;
    animation: authFadeIn 0.35s cubic-bezier(0.68,-0.55,0.265,1.55);
    border-radius: 16px !important;
}
@keyframes authFadeIn {
    0% { opacity: 0; transform: scale(0.9) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
.auth-panel {
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.auth-panel-active {
    opacity: 1; transform: translateX(0);
}
.auth-panel-hidden {
    opacity: 0; transform: translateX(15px);
}
.auth-brand-panel {
    background: linear-gradient(135deg, rgba(10,14,23,0.95) 0%, rgba(20,16,40,0.95) 100%) !important;
    border-left: 1px solid rgba(255,215,0,0.15) !important;
    position: relative;
    overflow: hidden;
}
.auth-brand-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(255,215,0,0.03) 0%, transparent 60%),
                radial-gradient(circle at 70% 80%, rgba(255,107,53,0.03) 0%, transparent 50%);
    animation: brandGlow 8s ease-in-out infinite alternate;
}
@keyframes brandGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-5%, 5%); }
}
.auth-brand-panel > * {
    position: relative;
    z-index: 1;
}
.auth-modal-content input {
    background: rgba(10,14,23,0.7) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    color: var(--text-primary) !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-modal-content input:focus {
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 0 3px rgba(255,215,0,0.12) !important;
    outline: none;
}
.auth-modal-content label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.3px;
}
.auth-modal-content .btn-primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #f0a500 100%) !important;
    border: none !important;
    color: #0a0e17 !important;
    font-weight: 700 !important;
    padding: 12px !important;
    border-radius: 10px !important;
    transition: transform 0.15s, box-shadow 0.2s;
}
.auth-modal-content .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,215,0,0.3);
}
.auth-modal-content .btn-primary:active {
    transform: translateY(0);
}
.auth-modal-content a {
    color: var(--accent-gold);
    font-weight: 500;
    transition: color 0.2s;
}
.auth-modal-content a:hover {
    color: #ffd700;
    text-decoration: none;
}
.auth-error-box {
    background: rgba(255,23,68,0.12) !important;
    border: 1px solid rgba(255,23,68,0.3) !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    color: #ff6b7a !important;
    font-size: 0.9rem !important;
    animation: shakeX 0.4s ease;
}
@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}
.auth-code-display {
    background: linear-gradient(135deg, rgba(10,14,23,0.8), rgba(20,16,40,0.8)) !important;
    border: 2px solid rgba(255,215,0,0.3) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    text-align: center;
    margin-bottom: 18px;
    box-shadow: 0 0 30px rgba(255,215,0,0.05);
}

/* Live Chat Widget */
#chat-widget { position:fixed; bottom:20px; right:20px; z-index:9999; font-family:var(--font); }
#chat-toggle { width:56px; height:56px; border-radius:50%; background:var(--accent-gold,#ffd700); color:#1a1a1a; border:none; font-size:1.4rem; cursor:pointer; box-shadow:0 4px 20px rgba(255,215,0,0.3); display:flex; align-items:center; justify-content:center; position:relative; transition:transform 0.2s; }
#chat-toggle:hover { transform:scale(1.05); }
#chat-unread-badge { position:absolute; top:-4px; right:-4px; background:#dc3545; color:#fff; border-radius:50%; min-width:20px; height:20px; font-size:0.7rem; font-weight:700; display:flex; align-items:center; justify-content:center; padding:0 4px; box-shadow:0 2px 6px rgba(0,0,0,0.3); }
#chat-panel { position:absolute; bottom:70px; right:0; width:360px; max-height:520px; background:var(--bg-secondary,#1a1f2e); border:1px solid var(--border,#2a2f3e); border-radius:12px; overflow:hidden; display:none; flex-direction:column; box-shadow:0 8px 40px rgba(0,0,0,0.5); }
#chat-panel.open { display:flex; }
#chat-panel-header { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; background:var(--accent-gold,#ffd700); color:#1a1a1a; font-weight:700; font-size:0.95rem; }
#chat-panel-header button { background:none; border:none; color:#1a1a1a; font-size:1.3rem; cursor:pointer; padding:0 4px; line-height:1; }
#chat-panel-messages { flex:1; overflow-y:auto; padding:14px 16px; display:flex; flex-direction:column; gap:8px; min-height:200px; max-height:360px; }
#chat-panel-input { display:flex; gap:8px; padding:10px 12px; border-top:1px solid var(--border,#2a2f3e); background:var(--bg-secondary,#1a1f2e); }
#chat-panel-input textarea { flex:1; padding:8px 12px; border:1px solid var(--border,#2a2f3e); border-radius:6px; background:var(--bg-primary,#0a0e17); color:var(--text-primary); resize:none; font-size:0.85rem; min-height:36px; max-height:80px; }
#chat-panel-input textarea:focus { outline:none; border-color:var(--accent-gold,#ffd700); }
#chat-panel-input button { padding:6px 16px; background:var(--accent-gold,#ffd700); color:#1a1a1a; border:none; border-radius:6px; font-weight:600; font-size:0.85rem; cursor:pointer; align-self:flex-end; }
#chat-panel-input button:hover { background:#e6c200; }
.chat-msg-self { align-self:flex-end; background:var(--accent-gold,#ffd700); color:#1a1a1a; padding:8px 12px; border-radius:12px 12px 4px 12px; font-size:0.85rem; line-height:1.4; word-wrap:break-word; max-width:85%; }
.chat-msg-other { align-self:flex-start; background:var(--bg-hover,#2a3040); color:var(--text-primary); padding:8px 12px; border-radius:12px 12px 12px 4px; font-size:0.85rem; line-height:1.4; word-wrap:break-word; max-width:85%; }
.chat-msg-time { font-size:0.65rem; opacity:0.5; margin-top:4px; display:block; }
.chat-welcome { text-align:center; color:var(--text-secondary); padding:30px 20px; font-size:0.9rem; }
@media (max-width:480px) {
  #chat-panel { width:calc(100vw - 40px); right:-10px; bottom:65px; max-height:60vh; }
}
