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

:root {
    --bg-dark: #0a0e14;
    --bg-card: #131920;
    --bg-stack: #1a2129;
    --accent-gold: #f5c842;
    --accent-red: #e63946;
    --accent-green: #2ecc71;
    --accent-blue: #3498db;
    --text-primary: #ecf0f1;
    --text-secondary: #7f8c8d;
    --card-red: #c0392b;
    --card-black: #2c3e50;
    --glow-gold: 0 0 20px rgba(245, 200, 66, 0.4);
    --glow-green: 0 0 20px rgba(46, 204, 113, 0.4);
    --glow-red: 0 0 20px rgba(230, 57, 70, 0.4);
}

html, body {
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-dark);
    background-image: 
        radial-gradient(ellipse at top, rgba(245, 200, 66, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(46, 204, 113, 0.03) 0%, transparent 50%);
    height: 100vh;
    height: 100dvh;
    color: var(--text-primary);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: none;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.game-header {
    text-align: center;
    margin-bottom: 30px;
}

/* Mobile-only bust indicators - hidden on desktop */
.mobile-busts {
    display: none;
}

/* Mobile-only deck count - hidden on desktop */
.mobile-deck-count {
    display: none;
}

/* Floating Help Button - hidden on desktop (styling kept for future use) */
.floating-help {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.floating-help:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-dark);
    transform: scale(1.1);
    box-shadow: var(--glow-gold);
}

/* Floating Menu Button - shown on desktop and mobile */
.floating-menu {
    display: flex;
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
    z-index: 50;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.floating-menu:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-dark);
    transform: scale(1.1);
    box-shadow: var(--glow-gold);
}

/* Menu Modal */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 20, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-modal {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    text-align: center;
    max-width: 280px;
    width: 90%;
    animation: confirmIn 0.3s ease-out;
}

.menu-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.15em;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    background: var(--bg-stack);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-option:active {
    transform: scale(0.98);
}

.menu-icon {
    font-size: 1.1rem;
    width: 24px;
}

/* New Game button - gold/yellow styling */
.menu-option-new-game {
    background: linear-gradient(135deg, var(--accent-gold), #d4a634);
    color: var(--bg-dark);
}

.menu-option-new-game:hover {
    background: linear-gradient(135deg, #f5c842, #e5b632);
    box-shadow: var(--glow-gold);
}

.menu-option-cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 5px;
}

.menu-option-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Volume Controls */
.menu-volume-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    background: var(--bg-stack);
    border-radius: 10px;
    margin: 10px 0;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.volume-mute-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.volume-mute-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.volume-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.volume-slider-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.volume-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.volume-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-gold);
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: #f5c842;
    transform: scale(1.1);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-gold);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
    background: #f5c842;
    transform: scale(1.1);
}

/* Settings Modal */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 20, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 160;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.settings-overlay.active {
    opacity: 1;
    visibility: visible;
}

.settings-modal {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    animation: confirmIn 0.3s ease-out;
}

.settings-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.settings-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.settings-options {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-modal .menu-option {
    width: auto;
    margin: 0 auto;
    padding: 12px 40px;
}

/* Leaderboard Modal */
.leaderboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 20, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 170;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.leaderboard-overlay.active {
    opacity: 1;
    visibility: visible;
}

.leaderboard-modal {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: confirmIn 0.3s ease-out;
}

.leaderboard-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 0.15em;
    color: var(--accent-gold);
    margin-bottom: 20px;
    margin-top: 0;
}

#lb-content {
    min-height: 100px;
    margin-bottom: 15px;
    position: relative;
}

.loading-spinner {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-style: italic;
}

.lb-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: background 0.2s ease, opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-10px);
}

.lb-row.lb-row-enter {
    transform: translateY(0);
    opacity: 1;
}

.lb-row.lb-row-enter:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px) translateY(0);
}

/* Ghost row for submitting score */
.lb-row-ghost {
    opacity: 0.6;
    position: relative;
    transform: translateY(0);
    pointer-events: none;
}

.lb-row-ghost-active {
    animation: ghostGlow 2s ease-in-out infinite;
    opacity: 0.8;
}

@keyframes ghostGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(245, 200, 66, 0.3);
        background: rgba(245, 200, 66, 0.05);
    }
    50% {
        box-shadow: 0 0 20px rgba(245, 200, 66, 0.6);
        background: rgba(245, 200, 66, 0.15);
    }
}

.lb-row-ghost .lb-rank,
.lb-row-ghost .lb-name,
.lb-row-ghost .lb-score {
    color: var(--accent-gold);
    text-shadow: 0 0 8px rgba(245, 200, 66, 0.5);
}

/* Highlight newly submitted score */
.lb-row-highlight {
    animation: highlightPulse 1s ease-out;
}

@keyframes highlightPulse {
    0% {
        background: rgba(245, 200, 66, 0.3);
        box-shadow: 0 0 15px rgba(245, 200, 66, 0.4);
    }
    100% {
        background: transparent;
        box-shadow: none;
    }
}

/* Score replacement animation */
.lb-row-replacing {
    position: relative;
    z-index: 10;
    background: rgba(245, 200, 66, 0.05);
    border-left: 3px solid var(--accent-gold);
}

/* Old score being replaced - teasing animation (fades in and out) */
.lb-score-old {
    text-decoration: line-through;
    text-decoration-color: var(--accent-red);
    text-decoration-thickness: 2px;
    color: var(--text-secondary);
    animation: scoreTeasing 1.2s ease-in-out infinite;
}

@keyframes scoreTeasing {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.3;
    }
}

.lb-rank {
    width: 40px;
    color: var(--text-secondary);
    font-weight: 700;
    text-align: left;
}

.lb-name {
    flex-grow: 1;
    text-align: left;
    color: var(--text-primary);
    padding: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-you-indicator {
    color: var(--accent-gold);
    font-size: 0.85em;
    opacity: 0.8;
    margin-left: 4px;
}

.lb-score {
    color: var(--accent-gold);
    font-weight: 700;
    min-width: 80px;
    text-align: right;
}

/* Top 3 Colors */
.lb-row:nth-child(1) .lb-rank {
    color: var(--accent-gold);
    text-shadow: 0 0 8px rgba(245, 200, 66, 0.5);
}

.lb-row:nth-child(2) .lb-rank {
    color: #c0c0c0;
    text-shadow: 0 0 6px rgba(192, 192, 192, 0.4);
}

.lb-row:nth-child(3) .lb-rank {
    color: #cd7f32;
    text-shadow: 0 0 6px rgba(205, 127, 50, 0.4);
}

.leaderboard-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 20px 0 15px;
}

.submit-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.submit-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.submit-form input {
    flex: 1;
    background: var(--bg-stack);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 12px 15px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s ease;
}

.submit-form input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 2px rgba(245, 200, 66, 0.1);
}

.submit-btn {
    background: linear-gradient(135deg, var(--accent-gold), #d4a634);
    color: var(--bg-dark);
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #f5c842, #e5b632);
    box-shadow: var(--glow-gold);
    transform: translateY(-1px);
}

.submit-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

.submit-loading {
    text-align: center;
    padding: 10px;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    margin-top: 10px;
    animation: pulse 1.5s ease-in-out infinite;
}

.submit-error {
    text-align: center;
    padding: 10px;
    color: var(--accent-red);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    margin-top: 10px;
    animation: shake 0.5s ease;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.leaderboard-modal .menu-option-cancel {
    margin-top: 10px;
    margin-left: auto;
    margin-right: auto;
    display: block;
    width: auto;
    min-width: 120px;
}

.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: var(--bg-stack);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.settings-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.toggle-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.settings-toggle input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    transition: background 0.3s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.settings-toggle input:checked + .toggle-slider {
    background: var(--accent-green);
}

.settings-toggle input:checked + .toggle-slider::after {
    left: 23px;
    background: white;
}

.game-header h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    letter-spacing: 0.3em;
    background: linear-gradient(135deg, var(--accent-gold), #fff, var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(245, 200, 66, 0.3);
    margin-bottom: 20px;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    letter-spacing: 0.15em;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--accent-gold);
}

.bust-value {
    color: var(--accent-red);
}

.bust-max {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.streak-value {
    color: var(--accent-green);
}

/* Game Board */
.game-board {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 900px) {
    .game-board {
        grid-template-columns: 1fr;
    }
}

.section-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    margin-bottom: 15px;
    text-align: center;
}

/* Current Card Section */
.current-card-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.current-card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
}

.card {
    width: 120px;
    height: 168px;
    background: linear-gradient(145deg, #fff, #f0f0f0);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 600;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.red {
    color: var(--card-red);
}

.card.black {
    color: var(--card-black);
}

.card.wild {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    color: var(--accent-gold);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.4),
        var(--glow-gold);
}

.card.wild::before {
    content: '★';
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.8rem;
}

.card.wild::after {
    content: '★';
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 0.8rem;
}

.current-card {
    animation: cardEnter 0.4s ease-out;
}

@keyframes cardEnter {
    from {
        transform: translateY(-30px) rotateX(20deg);
        opacity: 0;
    }
    to {
        transform: translateY(0) rotateX(0);
        opacity: 1;
    }
}

.current-card.placing {
    animation: cardExit 0.25s ease-in forwards;
}

@keyframes cardExit {
    from {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateY(20px) scale(0.8);
        opacity: 0;
    }
}

.card-rank {
    font-size: 2.2rem;
    line-height: 1;
}

.card-suit {
    font-size: 2.5rem;
    line-height: 1;
    margin-top: 5px;
}

.card-info {
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

.card-info.wild-info {
    color: var(--accent-gold);
}

/* Controls */
.controls {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-icon {
    font-size: 1rem;
}

.btn-undo {
    background: var(--bg-stack);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.btn-undo:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-undo:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-undo:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-new {
    background: linear-gradient(135deg, var(--accent-gold), #d4a634);
    color: var(--bg-dark);
    /* Hide New Game button on desktop - accessible via menu */
    display: none;
}

.btn-new:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-gold);
}

/* Stacks Section */
.stacks-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.stacks-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

@media (max-width: 700px) and (min-width: 601px) {
    .stacks-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ================================
   MOBILE LAYOUT - Optimized for visibility
   No scrolling required
   ================================ */
@media screen and (max-width: 600px) {
    .game-container {
        padding: 10px;
        min-height: 100vh;
        min-height: 100dvh;
        display: flex;
        flex-direction: column;
    }

    /* Mobile header - title left, busts center, score right */
    .game-header {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 10px !important;
        text-align: left !important;
    }

    .game-header h1 {
        font-size: 1.3rem !important;
        letter-spacing: 0.08em !important;
        margin-bottom: 0 !important;
        flex: 0 0 auto !important;
    }

    /* Mobile bust indicators - center of header */
    .mobile-busts {
        display: flex !important;
        gap: 8px !important;
        align-items: center !important;
    }

    .bust-icon {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.05);
        border-radius: 50%;
        transition: all 0.3s ease;
    }

    .bust-icon.active {
        color: var(--accent-red);
        background: rgba(230, 57, 70, 0.2);
        text-shadow: 0 0 8px rgba(230, 57, 70, 0.5);
    }

    /* Only show score in header on mobile, hide others */
    .stats-bar {
        gap: 0 !important;
        flex-wrap: nowrap !important;
        flex: 0 0 auto !important;
    }

    .stat {
        display: none !important;
    }

    /* Only show score stat */
    .stat:first-child {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
    }

    .stat-label {
        font-size: 0.55rem !important;
    }

    .stat-value {
        font-size: 1.2rem !important;
    }

    .bust-max {
        display: none !important;
    }

    /* Flex column layout for game board */
    .game-board {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        flex: 1 !important;
        width: 100% !important;
    }

    /* Hide section labels on mobile */
    .section-label {
        display: none;
    }

    /* Stacks section - takes available space */
    .stacks-section {
        order: 1 !important;
        flex: 1 !important;
        padding: 10px !important;
        border-radius: 12px !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    /* 4-column grid for stacks - full width */
    .stacks-container {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
        width: 100% !important;
        flex: 1 !important;
    }

    .stack {
        padding: 6px !important;
        border-radius: 8px !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
    }

    .stack-header {
        margin-bottom: 12px !important;
    }

    /* Larger stack totals for visibility */
    .stack-total {
        font-size: 1.2rem !important;
        font-weight: 700 !important;
    }

    /* Stack cards area - vertical list, no overlap */
    .stack-cards {
        flex: 1 !important;
        min-height: auto !important;
        margin-bottom: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 4px !important;
    }

    /* Cards stacked vertically - no overlap, larger text */
    .stack-card {
        width: 100% !important;
        max-height: none !important;
        height: auto !important;
        padding: 8px 4px !important;
        font-size: 1.3rem !important;
        font-weight: 700 !important;
        border-radius: 5px !important;
        margin-top: 0 !important;
        aspect-ratio: auto !important;
    }

    .stack-card:first-child {
        margin-top: 0 !important;
    }

    /* Hide Place Here buttons on mobile */

    /* Current card section - compact at bottom */
    .current-card-section {
        order: 2 !important;
        padding: 12px !important;
        border-radius: 12px !important;
        flex-shrink: 0 !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .current-card-container {
        margin-bottom: 10px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        gap: 8px !important;
    }

    /* Hide any pseudo elements on mobile */
    .current-card-container::before,
    .current-card-container::after {
        display: none !important;
        content: none !important;
    }

    /* Mobile deck count display */
    .mobile-deck-count {
        display: block !important;
        font-size: 0.75rem !important;
        color: var(--text-secondary) !important;
        letter-spacing: 0.05em !important;
        order: 2 !important;
    }

    /* Larger, more visible current card */
    .card {
        width: 85px !important;
        height: 119px !important;
    }

    .card-rank {
        font-size: 2.2rem !important;
        font-weight: 700 !important;
    }

    .card-suit {
        font-size: 2.4rem !important;
    }

    .card-info {
        display: none !important;
    }

    /* Controls - only Undo button centered */
    .controls {
        gap: 8px !important;
        justify-content: center !important;
        width: 100% !important;
        display: flex !important;
    }

    .btn {
        padding: 12px 24px !important;
        font-size: 0.8rem !important;
        border-radius: 10px !important;
    }

    .btn-icon {
        font-size: 1rem !important;
    }

    /* Hide new game button from controls on mobile */
    .btn-new {
        display: none !important;
    }

    /* Undo button styling */
    .btn-undo {
        flex: 0 !important;
        min-width: 120px !important;
    }

    /* Hide floating help on mobile - accessible via menu */
    .floating-help {
        display: none !important;
    }

    /* Floating menu button - bottom left on mobile */
    .floating-menu {
        display: flex !important;
    }

    /* Popups and modals */
    .bonus-popup {
        min-width: 200px;
        padding: 15px 20px;
    }

    .bonus-label {
        font-size: 0.85rem;
    }

    .bonus-points {
        font-size: 1.3rem;
    }

    .bonus-line {
        gap: 15px;
    }

    .bonus-total .bonus-points {
        font-size: 1.8rem;
    }

    .message-title {
        font-size: 1.8rem;
    }

    .message-text {
        font-size: 0.95rem;
    }

    .message-icon {
        font-size: 3rem;
        margin-bottom: 15px;
    }

    /* Help modal */
    .help-modal {
        margin: 8px;
        max-height: 92vh;
    }

    .help-content {
        padding: 15px;
    }

    .help-title {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }

    .help-section {
        margin-bottom: 15px;
        padding-bottom: 15px;
    }

    .help-section h3 {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .help-section p {
        font-size: 0.75rem;
    }

    .card-values-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .demo-card {
        width: 45px;
        height: 63px;
        font-size: 0.8rem;
    }

    .card-value-item span {
        font-size: 0.65rem;
    }

    .score-row {
        padding: 8px;
        flex-direction: column;
        gap: 6px;
    }

    .score-info {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
    }

    .score-name {
        font-size: 0.75rem;
    }

    .score-points {
        font-size: 0.95rem;
    }

    .mini-card {
        width: 24px;
        height: 34px;
        font-size: 0.6rem;
        margin-left: -12px;
    }

    .combo-note {
        padding: 8px 10px;
        font-size: 0.7rem;
    }

    .bust-demo {
        padding: 10px;
        gap: 12px;
    }

    .controls-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .control-item {
        padding: 8px 10px;
    }

    .control-item kbd {
        padding: 3px 6px;
        font-size: 0.7rem;
    }

    .control-item span {
        font-size: 0.7rem;
    }

    .btn-got-it {
        width: calc(100% - 30px);
        margin: 0 15px 15px;
        padding: 12px;
        font-size: 0.9rem;
    }

    .help-close {
        width: 30px;
        height: 30px;
        font-size: 1rem;
        top: 10px;
        right: 10px;
    }
}

.stack {
    background: var(--bg-stack);
    border-radius: 15px;
    padding: 15px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.stack:hover {
    border-color: rgba(245, 200, 66, 0.3);
}

.stack.highlight-21 {
    border: 2px solid rgba(34, 197, 94, 0.3);
    filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.3));
    animation: glowPulse21 1.5s ease-in-out infinite;
}

@keyframes glowPulse21 {
    0%, 100% {
        border-color: rgba(34, 197, 94, 0.3);
        filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.3));
    }
    50% {
        border-color: rgba(34, 197, 94, 0.6);
        filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.45));
    }
}

.stack.highlight-bust {
    border-color: var(--accent-red);
}

/* Hint tap indicator for idle players */
.tap-hint {
    position: absolute;
    font-size: 2rem;
    pointer-events: none;
    opacity: 0;
    z-index: 50;
    transition: opacity 0.3s ease;
}

.tap-hint.active {
    opacity: 1;
    animation: tapHint 1.2s ease-in-out infinite;
}

@keyframes tapHint {
    0%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(8px) scale(0.95);
    }
    50% {
        transform: translateY(8px) scale(0.95);
    }
    70% {
        transform: translateY(0);
    }
}

.stack-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.stack-total {
    font-size: 1.4rem;
    color: var(--accent-gold);
    font-weight: 700;
    letter-spacing: 0.05em;
}

.stack-total.safe {
    color: var(--accent-green);
}

.stack-cards {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    gap: -50px;
    margin-bottom: 12px;
    position: relative;
}

.stack-card {
    width: 100%;
    aspect-ratio: 2.5/3.5;
    max-height: 75px;
    background: linear-gradient(145deg, #fff, #f5f5f5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: stackCardEnter 0.3s ease-out;
}

.stack-card.red {
    color: var(--card-red);
}

.stack-card.black {
    color: var(--card-black);
}

.stack-card.wild {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    color: var(--accent-gold);
}

@keyframes stackCardEnter {
    from {
        transform: translateY(-20px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.stack-card.no-animate {
    animation: none;
}


/* Message Overlay */
.message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 20, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.message-overlay.active {
    opacity: 1;
    visibility: visible;
}

.message-content {
    text-align: center;
    animation: messageEnter 0.4s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes messageEnter {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.message-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.message-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    letter-spacing: 0.2em;
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.message-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.btn-play {
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--accent-gold), #d4a634);
    color: var(--bg-dark);
    font-size: 1rem;
    margin: 0 auto;
}

.btn-play:hover {
    transform: translateY(-3px);
    box-shadow: var(--glow-gold);
}

/* Bonus Popup */
.bonus-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 25px 40px;
    background: rgba(10, 14, 20, 0.97);
    border: 2px solid var(--accent-gold);
    border-radius: 20px;
    font-family: 'Bebas Neue', sans-serif;
    box-shadow: var(--glow-gold), 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 280px;
}

.bonus-popup.active {
    opacity: 1;
    visibility: visible;
    animation: bonusPop 0.4s ease-out;
}

@keyframes bonusPop {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.bonus-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 30px;
    opacity: 0;
    transform: translateY(10px);
    animation: bonusLineIn 0.4s ease-out forwards;
}

.bonus-line:nth-child(1) { animation-delay: 0.1s; }
.bonus-line:nth-child(2) { animation-delay: 0.35s; }
.bonus-line:nth-child(3) { animation-delay: 0.6s; }
.bonus-line:nth-child(4) { animation-delay: 0.85s; }

@keyframes bonusLineIn {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.9);
    }
    60% {
        transform: translateY(-2px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bonus-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.bonus-points {
    font-size: 1.8rem;
    color: var(--accent-gold);
    letter-spacing: 0.1em;
}

/* Special styling for different bonus types */
.bonus-line.blackjack .bonus-label {
    color: var(--accent-green);
}
.bonus-line.blackjack .bonus-points {
    color: var(--accent-green);
    text-shadow: 0 0 15px rgba(46, 204, 113, 0.5);
}

.bonus-line.five-card .bonus-label {
    color: #9b59b6;
}
.bonus-line.five-card .bonus-points {
    color: #9b59b6;
    text-shadow: 0 0 15px rgba(155, 89, 182, 0.5);
}

.bonus-line.wild .bonus-label {
    color: var(--accent-gold);
}
.bonus-line.wild .bonus-points {
    color: var(--accent-gold);
    text-shadow: 0 0 15px rgba(245, 200, 66, 0.5);
}

.bonus-line.streak .bonus-label {
    color: var(--accent-blue);
}
.bonus-line.streak .bonus-points {
    color: var(--accent-blue);
    text-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
}

/* Total line */
.bonus-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 30px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0;
    animation: bonusTotalIn 0.5s ease-out forwards;
}

.bonus-total .bonus-label {
    font-size: 1.3rem;
    color: var(--text-primary);
}

.bonus-total .bonus-points {
    font-size: 2.4rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

@keyframes bonusTotalIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mega combo effect */
.bonus-popup.mega-combo {
    border-color: #9b59b6;
    box-shadow: 
        0 0 30px rgba(155, 89, 182, 0.4),
        0 0 60px rgba(245, 200, 66, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.5);
    animation: megaComboPop 0.5s ease-out, megaComboGlow 1.5s ease-in-out infinite;
}

@keyframes megaComboPop {
    0% {
        transform: translate(-50%, -50%) scale(0.5) rotate(-5deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1) rotate(2deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes megaComboGlow {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(155, 89, 182, 0.4),
            0 0 60px rgba(245, 200, 66, 0.2),
            0 20px 60px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow: 
            0 0 50px rgba(155, 89, 182, 0.6),
            0 0 80px rgba(245, 200, 66, 0.4),
            0 20px 60px rgba(0, 0, 0, 0.5);
    }
}

/* Clear animation */
.stack-cards.clearing {
    animation: clearStack 0.4s ease-out forwards;
}

@keyframes clearStack {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(0.9);
        opacity: 0;
    }
}

/* Bust animation */
.stack.busting {
    animation: bustShake 0.5s ease-out;
}

@keyframes bustShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
}

/* Keyboard hints */
.keyboard-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    padding: 10px 20px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.key {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.key kbd {
    padding: 4px 8px;
    background: var(--bg-stack);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Help Modal Overlay */
.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 20, 0.97);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.help-overlay.active {
    opacity: 1;
    visibility: visible;
}

.help-modal {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: helpModalIn 0.4s ease-out;
}

@keyframes helpModalIn {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.help-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.help-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.help-content {
    padding: 30px;
    padding-bottom: 15px;
}

.help-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    letter-spacing: 0.2em;
    color: var(--accent-gold);
    text-align: center;
    margin-bottom: 25px;
}

.help-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.help-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.help-section h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.help-section p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.help-section strong {
    color: var(--accent-gold);
}

/* Card Values Grid */
.card-values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

@media (max-width: 500px) {
    .card-values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.card-value-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.card-value-item span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.demo-card {
    width: 60px;
    height: 80px;
    background: linear-gradient(145deg, #fff, #f0f0f0);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--card-black);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.demo-card-ace {
    color: var(--card-red);
    font-size: 1.5rem;
}

.demo-card-wild {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    color: var(--accent-gold);
    font-size: 0.8rem;
    animation: wildPulse 2s ease-in-out infinite;
}

@keyframes wildPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(245, 200, 66, 0.5); }
}

/* Scoring Table */
.scoring-table {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px;
    background: var(--bg-stack);
    border-radius: 12px;
}

.score-demo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.score-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.score-name {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
}

.score-points {
    font-size: 1.1rem;
    color: var(--accent-gold);
    font-weight: 600;
}

.demo-stack {
    display: flex;
    gap: -15px;
}

.demo-stack-5 {
    gap: -20px;
}

.mini-card {
    width: 32px;
    height: 44px;
    background: linear-gradient(145deg, #fff, #f0f0f0);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--card-black);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    margin-left: -15px;
}

.mini-card:first-child {
    margin-left: 0;
}

.mini-card-wild {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    color: var(--accent-gold);
    margin-left: 0;
}

.demo-result {
    font-size: 0.8rem;
    color: var(--accent-green);
    font-weight: 600;
    white-space: nowrap;
}

/* Animated card in demos */
.anim-card {
    animation: cardBounce 2s ease-in-out infinite;
}

@keyframes cardBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Wild card animation */
.wild-arrow {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.anim-wild {
    animation: wildFloat 2s ease-in-out infinite;
}

@keyframes wildFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(-5deg); }
    75% { transform: translateY(-3px) rotate(5deg); }
}

.demo-stack-empty {
    width: 50px;
    height: 44px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: var(--text-secondary);
}

/* Streak demo */
.streak-demo {
    display: flex;
    gap: 8px;
}

.streak-clear {
    padding: 8px 12px;
    background: var(--accent-green);
    color: var(--bg-dark);
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.anim-streak {
    animation: streakPop 2s ease-in-out infinite;
}

@keyframes streakPop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 15px rgba(46, 204, 113, 0.5); }
}

/* Combo note */
.combo-note {
    margin-top: 15px;
    padding: 12px 15px;
    background: rgba(245, 200, 66, 0.1);
    border: 1px solid rgba(245, 200, 66, 0.3);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.combo-note strong {
    color: var(--accent-gold);
}

/* Bust Demo */
.bust-demo {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: var(--bg-stack);
    border-radius: 12px;
    margin-bottom: 12px;
}

.bust-stack {
    animation: bustShakeDemo 2s ease-in-out infinite;
}

@keyframes bustShakeDemo {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50% { transform: translateX(-3px); }
    20%, 40%, 60% { transform: translateX(3px); }
    70% { transform: translateX(0); }
}

.anim-bust {
    animation: bustCardFlash 2s ease-in-out infinite;
}

@keyframes bustCardFlash {
    0%, 70%, 100% { background: linear-gradient(145deg, #fff, #f0f0f0); }
    80%, 90% { background: linear-gradient(145deg, #ffcccc, #ffaaaa); }
}

.bust-result {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bust-total {
    font-size: 1rem;
    color: var(--text-secondary);
}

.bust-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-red);
    animation: bustTextPulse 2s ease-in-out infinite;
}

@keyframes bustTextPulse {
    0%, 70%, 100% { opacity: 0.5; }
    80%, 90% { opacity: 1; text-shadow: 0 0 10px rgba(230, 57, 70, 0.5); }
}

/* Controls Grid */
.controls-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 500px) {
    .controls-grid {
        grid-template-columns: 1fr;
    }
}

.control-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-stack);
    border-radius: 8px;
}

.control-item kbd {
    padding: 5px 10px;
    background: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.8rem;
    color: var(--accent-gold);
}

.control-item span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.click-icon {
    font-size: 1.2rem;
}

/* Got It Button */
.btn-got-it {
    display: block;
    width: calc(100% - 60px);
    margin: 0 30px 25px;
    padding: 15px;
    background: linear-gradient(135deg, var(--accent-gold), #d4a634);
    color: var(--bg-dark);
    font-size: 1rem;
    font-weight: 600;
}

.btn-got-it:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-gold);
}


