/* Lucky Catch - Fishing Pulltab Styles */

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

body {
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
    background-color: #1a5276;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 20px 80px 20px;
    overflow-x: hidden;
}

/* Animated bubbles overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255,255,255,0.15) 3px, transparent 3px),
        radial-gradient(circle at 30% 60%, rgba(255,255,255,0.1) 4px, transparent 4px),
        radial-gradient(circle at 50% 30%, rgba(255,255,255,0.12) 3px, transparent 3px),
        radial-gradient(circle at 70% 80%, rgba(255,255,255,0.1) 5px, transparent 5px),
        radial-gradient(circle at 90% 40%, rgba(255,255,255,0.15) 3px, transparent 3px);
    animation: bubbleFloat 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

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

.game-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 900px;
    width: 100%;
}

.game-header {
    text-align: center;
    margin-bottom: -15px;
    position: relative;
}

.draw-mode-badge {
    display: inline-block;
    font-size: 0.65em;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 3px 10px;
    border-radius: 3px;
    text-transform: uppercase;
    margin-top: 2px;
    color: #fff;
    min-height: 1em;
}

.draw-mode-badge.mode-pulltab {
    background: rgba(52, 152, 219, 0.5);
    border: 1px solid rgba(52, 152, 219, 0.7);
    color: #aed6f1;
}

.draw-mode-badge.mode-class2 {
    background: rgba(241, 196, 15, 0.25);
    border: 1px solid rgba(241, 196, 15, 0.6);
    color: #f9e79f;
}

.game-header h1 {
    font-size: 3em;
    color: #fff;
    text-shadow:
        4px 4px 0 #1a5276,
        -2px -2px 0 #1a5276,
        2px -2px 0 #1a5276,
        -2px 2px 0 #1a5276,
        0 0 30px rgba(241, 196, 15, 0.8);
    letter-spacing: 4px;
    margin: 0;
}

/* Hide text when logo image is present */
.game-header h1:has(.game-logo) {
    font-size: 0;
    text-shadow: none;
}

.game-logo {
    max-height: 120px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ========================================
   BOTTOM GRADIENT - fades behind controls
   ======================================== */
.bottom-gradient {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    pointer-events: none;
    z-index: 49;
}

/* ========================================
   CONTROL BAR LAYOUT (Exhibit B)
   [Menu] [Info] [CREDITS 0000] [$5.00] [WIN 000] [PLAY]
   ======================================== */
.controls-row {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    gap: 8px;
    z-index: 1100;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Meter Container - Label centered on top border */
.meter-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 100;
}

.meter-label {
    display: block;
    color: #bdc3c7;
    font-size: 0.65em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.6);
    padding: 1px 6px;
    border-radius: 3px;
    position: relative;
    z-index: 101;
    margin-bottom: -8px; /* Pulls label down to overlap the top border */
}

/* Credits Display - pill shape like Exhibit B */
.credits-display {
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    border-radius: 20px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px solid #7f8c8d;
    box-shadow:
        inset 0 2px 8px rgba(0,0,0,0.5),
        0 2px 10px rgba(0,0,0,0.3);
    min-width: 100px;
}

.credits-label {
    color: #fff;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    background: rgba(255,255,255,0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

.credits-value {
    color: #ecf0f1;
    font-size: 1.2em;
    font-weight: bold;
}

/* Wager/Denomination Display - larger per spec, no label */
.wager-display {
    background: linear-gradient(180deg, #4a3a1a 0%, #2d230d 100%);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #f39c12;
    box-shadow:
        inset 0 2px 8px rgba(0,0,0,0.5),
        0 2px 12px rgba(0,0,0,0.4),
        0 0 8px rgba(243,156,18,0.3);
    min-width: 70px;
}

.wager-value {
    color: #f1c40f;
    font-size: 1.6em;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(241,196,15,0.5);
}

/* Wins Display - Tappable! */
.wins-display {
    background: linear-gradient(180deg, #1a4a1a 0%, #0d2d0d 100%);
    border-radius: 20px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 2px solid #27ae60;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        inset 0 2px 8px rgba(0,0,0,0.5),
        0 2px 10px rgba(0,0,0,0.3),
        0 0 10px rgba(39, 174, 96, 0.3);
    min-width: 90px;
}

.wins-display:hover {
    transform: scale(1.05);
    box-shadow:
        inset 0 2px 8px rgba(0,0,0,0.5),
        0 4px 15px rgba(0,0,0,0.4),
        0 0 20px rgba(39, 174, 96, 0.5);
}

.wins-display:active {
    transform: scale(0.98);
}

/* Pulsing glow when wins > 0 */
.wins-display.has-wins {
    animation: winsGlow 1.5s ease-in-out infinite;
    border-color: #2ecc71;
}

@keyframes winsGlow {
    0%, 100% {
        box-shadow:
            inset 0 2px 8px rgba(0,0,0,0.5),
            0 2px 10px rgba(0,0,0,0.3),
            0 0 15px rgba(46, 204, 113, 0.5);
    }
    50% {
        box-shadow:
            inset 0 2px 8px rgba(0,0,0,0.5),
            0 2px 10px rgba(0,0,0,0.3),
            0 0 25px rgba(46, 204, 113, 0.8);
    }
}

.wins-label {
    color: #fff;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    background: rgba(255,255,255,0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

.wins-value {
    color: #2ecc71;
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(46, 204, 113, 0.6);
    min-height: 1.4em;
    display: inline-block;
}

.wins-display.has-wins .wins-value {
    color: #fff;
    text-shadow: 0 0 15px rgba(46, 204, 113, 0.8);
}

/* Tap hint arrow - left of value, pointing ◄ means "tap to move wins into credits" */
.wins-hint {
    font-size: 0.75em;
    color: #7f8c8d;
    margin-right: 2px;
    opacity: 0.45;
    transition: opacity 0.2s, color 0.2s;
}

.wins-display:hover .wins-hint {
    opacity: 0.8;
}

.wins-display.has-wins .wins-hint {
    opacity: 1;
    color: #2ecc71;
    animation: arrowPulse 1s ease-in-out infinite;
}

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

/* Class 2 mode — arrow is a pulltab-only affordance, hide it */
body.mode-class2 .wins-hint {
    display: none !important;
}

/* Message Line Below Symbol Area */
/* Must be position:relative + z-index > frame-overlay (z:10) so it renders above the frame image */
.message-line {
    width: 100%;
    text-align: center;
    min-height: 28px;
    margin-top: 8px;
    position: relative;
    z-index: 15;
}

#gameMessage {
    font-size: 1.3em;
    font-weight: 900;
    opacity: 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

#gameMessage.show {
    opacity: 1;
}

#gameMessage.win {
    color: #f1c40f;
    text-shadow:
        2px 2px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        0 0 20px rgba(241, 196, 15, 0.9),
        0 0 40px rgba(241, 196, 15, 0.5);
    animation: winMessagePop 0.4s ease-out;
}

@keyframes winMessagePop {
    0% { transform: scale(0.6); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

#gameMessage.lose {
    color: #95a5a6;
}

/* Daily Credits Display */
.daily-credits-display {
    background: linear-gradient(180deg, #34495e 0%, #2c3e50 100%);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #7f8c8d;
    box-shadow:
        inset 0 2px 8px rgba(0,0,0,0.5),
        0 2px 10px rgba(0,0,0,0.3);
    min-width: 70px;
}

.daily-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #2ecc71;
}

.daily-value {
    font-size: 1.2em;
    font-weight: bold;
    text-shadow: 0 0 10px currentColor;
}

.game-area {
    margin: 0;
    width: 100%;
}

.symbol-frame {
    position: relative;
    border-radius: 15px;
    padding: 40px 30px;
    min-height: 200px;
}

/* Frame overlay on TOP of symbols - uses .frame-overlay element */
.frame-overlay {
    position: absolute;
    top: -50px;
    left: -50px;
    right: -50px;
    bottom: -50px;
    background-position: center center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 10;
}

/* Symbol window - 65% opacity black fill per spec Section B.2 */
.symbol-window {
    position: relative;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 10px;
    padding: 12px;
    border: none;
}

.symbol-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
}

/* Symbols - single border, clean look per spec Section B.3 */
.symbol {
    width: 140px;
    height: 140px;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.25);
    overflow: hidden;
    position: relative;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.symbol img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    transition: transform 0.1s ease, opacity 0.2s ease;
}

/* Symbol tiers - gold/silver/bronze borders to show top paying symbols.
   Applied to the img element so the glow fades in/out with the symbol image,
   preventing the border from lingering on an empty cell during transitions. */
.symbol.gold-tier img {
    border-radius: 8px;
    box-shadow: 0 0 0 3px #f1c40f, 0 0 12px rgba(241, 196, 15, 0.7), inset 0 0 6px rgba(241, 196, 15, 0.2);
}

.symbol.silver-tier img {
    border-radius: 8px;
    box-shadow: 0 0 0 3px #bdc3c7, 0 0 10px rgba(189, 195, 199, 0.6), inset 0 0 5px rgba(189, 195, 199, 0.15);
}

.symbol.bronze-tier img {
    border-radius: 8px;
    box-shadow: 0 0 0 3px #ca6f1e, 0 0 8px rgba(202, 111, 30, 0.5), inset 0 0 4px rgba(202, 111, 30, 0.1);
}

/* 1x3 Row Mode Layout (e.g., 1 row × 3 columns) per Exhibit D */
.symbol-container.row-mode {
    grid-template-columns: repeat(3, 1fr);
    max-width: 600px;
}

.symbol-container.row-mode .symbol {
    width: 180px;
    height: 180px;
}

.symbol-container.row-mode .symbol img {
    width: 160px;
    height: 160px;
}

/* Message line in row mode stays in same position per spec Exhibit D */
.symbol-container.row-mode ~ .message-line {
    display: block;
}

/* Symbol animation video overlay */
.symbol-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    object-fit: contain;
    z-index: 5;
    border-radius: 10px;
}

/* SVG Win Lines */
.win-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
    stroke-linecap: round;
}

.win-lines line {
    stroke: transparent;
    stroke-width: 1;
    transition: stroke 0.3s ease, filter 0.3s ease;
}

.win-lines line.active {
    stroke: #f1c40f;
    stroke-width: 2;
    filter:
        drop-shadow(0 0 4px rgba(241, 196, 15, 1))
        drop-shadow(0 0 8px rgba(241, 196, 15, 0.8))
        drop-shadow(0 0 15px rgba(241, 196, 15, 0.5));
    animation: linePulse 1.5s ease-in-out infinite;
}

@keyframes linePulse {
    0%, 100% {
        opacity: 1;
        stroke-width: 2;
    }
    50% {
        opacity: 0.7;
        stroke-width: 2.5;
    }
}

/* Win highlight per spec B.3 - color change + glow + blink */
.symbol.winner {
    animation: winPulse 0.6s ease-in-out infinite;
    border-color: #f1c40f;
    border-width: 3px;
    box-shadow:
        0 0 15px rgba(241, 196, 15, 0.8),
        0 0 30px rgba(241, 196, 15, 0.4);
    filter: brightness(1.2);
}

@keyframes winPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Symbol exit animation */
.symbol.exiting img {
    animation: symbolExit 0.3s ease-in forwards;
}

@keyframes symbolExit {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(150px) scale(0.5);
        opacity: 0;
    }
}

/* Symbol enter animation */
.symbol.entering img {
    animation: symbolEnter 0.3s ease-out forwards;
}

@keyframes symbolEnter {
    0% {
        transform: translateY(-150px) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}


.win-display {
    flex: 1;
    text-align: center;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#winText {
    font-size: 1.4em;
    font-weight: bold;
    color: #2ecc71;
    text-shadow:
        2px 2px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        0 0 15px rgba(46, 204, 113, 0.8);
    opacity: 0;
    transform: scale(1);
    /* No transition - hide immediately when play starts */
}

#winText.show {
    opacity: 1;
    animation: winTextBounce 0.5s ease-out;
}

@keyframes winTextBounce {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

#winText.lose {
    color: #bdc3c7;
    /* Same font-size as win to prevent layout shift */
}

/* ========================================
   BUTTONS - Per Exhibit B
   States: default, active/depressed, disabled
   ======================================== */

.game-button {
    padding: 0;
    font-size: 1em;
    font-family: inherit;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Hide custom button images - we use CSS styling now */
.game-button img {
    display: none;
}

/* MENU Button - Home icon, round, blue */
.menu-button {
    width: 46px;
    height: 46px;
    background: linear-gradient(180deg, #3498db 0%, #2980b9 50%, #1f618d 100%);
    border: 3px solid #5dade2;
    border-radius: 50%;
    box-shadow:
        0 3px 0 #1a5276,
        0 4px 12px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.3);
    font-size: 1.2em;
}

.menu-button::before {
    content: '\2302'; /* house */
    font-size: 1.3em;
}

.menu-button:active {
    border-width: 4px;
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.7),
        0 1px 0 #1a5276, 0 2px 6px rgba(0,0,0,0.3);
    filter: brightness(1.2);
    transform: translateY(2px);
}

/* Info/Paytable Button - "i" icon, round, blue */
.info-button {
    width: 46px;
    height: 46px;
    background: linear-gradient(180deg, #3498db 0%, #2980b9 50%, #1f618d 100%);
    border: 3px solid #5dade2;
    border-radius: 50%;
    box-shadow:
        0 3px 0 #1a5276,
        0 4px 12px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.3);
    font-size: 1.2em;
}

.info-button::before {
    content: 'i';
    font-weight: bold;
    font-style: italic;
    font-size: 1.3em;
}

.info-button:active {
    border-width: 4px;
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.7),
        0 1px 0 #1a5276, 0 2px 6px rgba(0,0,0,0.3);
    filter: brightness(1.2);
    transform: translateY(2px);
}

/* PLAY Button - Green default, Red disabled per Exhibit B */
.play-button {
    width: 110px;
    height: 50px;
    background: linear-gradient(180deg, #27ae60 0%, #1e8449 50%, #196f3d 100%);
    border: 3px solid #2ecc71;
    border-radius: 20px;
    box-shadow:
        0 4px 0 #145a32,
        0 6px 20px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.3);
    font-size: 1.3em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.play-button::before {
    content: 'PLAY';
}

.play-button:active:not(:disabled) {
    border-width: 4px;
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,0.7),
        0 1px 0 #145a32, 0 2px 8px rgba(0,0,0,0.3);
    filter: brightness(1.2);
    transform: translateY(2px);
}

/* Play disabled = GREY per updated spec (should match menu/info button disabled state) */
.play-button:disabled {
    background: linear-gradient(180deg, #7f8c8d 0%, #606c76 50%, #4a5459 100%);
    border-color: #95a5a6;
    box-shadow:
        0 4px 0 #34495e,
        0 6px 15px rgba(0,0,0,0.3);
    cursor: not-allowed;
}

.play-button:disabled::before {
    content: 'PLAY';
}

/* Disable menu+info buttons during play per spec */
.menu-button:disabled,
.info-button:disabled {
    background: linear-gradient(180deg, #7f8c8d 0%, #606c76 50%, #4a5459 100%);
    border-color: #95a5a6;
    box-shadow: 0 3px 0 #34495e, 0 4px 10px rgba(0,0,0,0.3);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Legacy support - hide img if still in HTML */
.play-button img,
.info-button img,
.menu-button img {
    display: none;
}

/* Back to menu link (hidden now - menu button replaces it) */
.back-to-menu {
    display: none;
}

/* Paytable Popup Overlay */
.paytable-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
}

.paytable-overlay.show {
    opacity: 1;
    visibility: visible;
}

.paytable-popup {
    background: linear-gradient(145deg, #1a5276 0%, #0d3d56 100%);
    border-radius: 25px;
    padding: 30px 40px;
    border: 5px solid #f1c40f;
    box-shadow:
        0 0 50px rgba(241, 196, 15, 0.4),
        inset 0 0 30px rgba(0,0,0,0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    max-width: 450px;
    width: 90%;
}

.paytable-overlay.show .paytable-popup {
    transform: scale(1);
}

.paytable-popup h3 {
    text-align: center;
    color: #f1c40f;
    font-size: 2em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 3px;
}

.pay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 10px;
    margin: 8px 0;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
}

.pay-symbol {
    font-weight: bold;
    font-size: 1.1em;
}

.pay-symbol.gold { color: #f1c40f; }
.pay-symbol.blue { color: #3498db; }
.pay-symbol.green { color: #2ecc71; }
.pay-symbol.red { color: #e74c3c; }
.pay-symbol.orange { color: #e67e22; }
.pay-symbol.purple { color: #9b59b6; }
.pay-symbol.cyan { color: #1abc9c; }

.pay-amounts {
    color: #fff;
    font-weight: bold;
    font-size: 1em;
}

.paytable-info {
    text-align: center;
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.paytable-lines {
    text-align: center;
    color: #5dade2;
    margin-top: 15px;
    font-size: 0.95em;
    font-weight: bold;
}

.paytable-hint {
    text-align: center;
    color: #95a5a6;
    margin-top: 15px;
    font-size: 0.9em;
    font-style: italic;
}

/* Paytable divider between symbols and paylines */
.paytable-divider {
    border: none;
    border-top: 2px solid rgba(241, 196, 15, 0.4);
    margin: 20px 0;
}

.paylines-title {
    text-align: center;
    color: #f1c40f;
    font-size: 1.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 3px;
}

/* Payline diagrams - 3x3 grids showing line patterns */
.paylines-diagrams {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

/* Payline diagram group - wraps one diagram with its SVG overlay */
.payline-diagram-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Payline diagram container - relative so SVG can overlay the grid */
.payline-diagram {
    position: relative;
    width: 90px;
    height: 90px;
}

/* The 3x3 grid of cells underneath the lines */
.payline-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    width: 90px;
    height: 90px;
    box-sizing: border-box;
}

.payline-cell {
    border-radius: 3px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
}

/* SVG overlay for the paylines - lines drawn through cells */
.payline-lines {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* Symbol-based paytable rows */
.pay-row.symbol-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
}

.pay-symbols-group {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.pay-symbol-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(0,0,0,0.2);
}

.pay-equals {
    color: #fff;
    font-size: 1.2em;
    font-weight: bold;
}

.pay-amount {
    font-size: 1.4em;
    font-weight: bold;
    color: #2ecc71;
    text-shadow: 0 0 10px rgba(46,204,113,0.5);
}

.pay-amount.wild {
    color: #9b59b6;
    font-size: 1em;
    text-shadow: 0 0 10px rgba(155,89,182,0.5);
}

.pay-amount.scatter {
    color: #f39c12;
    font-size: 1em;
    text-shadow: 0 0 10px rgba(243,156,18,0.5);
}

/* Scrollable paytable */
.paytable-popup {
    max-height: 80vh;
    overflow-y: auto;
}

.paytable-popup::-webkit-scrollbar {
    width: 8px;
}

.paytable-popup::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

.paytable-popup::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}

.paytable-popup::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Ticket counts and winner info in paytable */
.pay-row .ticket-count {
    color: #95a5a6;
    font-size: 0.9em;
    margin-left: auto;
    padding-left: 10px;
    white-space: nowrap;
}

.pay-row .ticket-count.exhausted {
    color: #e74c3c;
}

.pay-row .winner-initials {
    color: #2ecc71;
    font-size: 0.85em;
    font-weight: bold;
    margin-left: 8px;
    padding: 2px 6px;
    background: rgba(46, 204, 113, 0.2);
    border-radius: 4px;
}

/* Top prize rows - more prominent */
.pay-row.top-prize {
    background: linear-gradient(180deg, rgba(241, 196, 15, 0.15) 0%, rgba(243, 156, 18, 0.15) 100%);
    border: 2px solid rgba(241, 196, 15, 0.5);
    padding: 12px 15px;
}

.pay-row.top-prize .pay-amount {
    font-size: 1.6em;
    color: #f1c40f;
    text-shadow: 0 0 15px rgba(241, 196, 15, 0.6);
}

.pay-row.top-prize .pay-symbol-img {
    width: 44px;
    height: 44px;
}

/* No credits warning */
.credits-value.warning {
    color: #e74c3c;
    animation: warningPulse 0.5s ease-in-out;
}

@keyframes warningPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Anticipation shake animation */
.anticipation-shake {
    animation: anticipationShake 0.8s ease-in-out;
}

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

/* Bonus zoom transition - camera zooms into symbols */
.symbol-frame.bonus-zoom-in {
    animation: bonusZoomIn 0.8s ease-out forwards;
    transform-origin: center center;
}

.symbol-frame.bonus-fade-out {
    animation: bonusFadeOut 0.4s ease-out forwards;
}

.symbol-frame.bonus-zoom-out {
    animation: bonusZoomOut 0.8s ease-in-out forwards;
    transform-origin: center center;
}

@keyframes bonusZoomIn {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(2.5);
    }
}

@keyframes bonusFadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes bonusZoomOut {
    0% {
        transform: scale(2.5);
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Background zoom for bonus */
.background-video.bonus-zoom-in {
    animation: bgZoomIn 0.8s ease-out forwards;
}

.background-video.bonus-zoom-out {
    animation: bgZoomOut 0.8s ease-in-out forwards;
}

body.bonus-zoom-bg {
    background-size: 150% !important;
    transition: background-size 0.8s ease-out;
}

@keyframes bgZoomIn {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.5);
    }
}

@keyframes bgZoomOut {
    0% {
        transform: scale(1.5);
    }
    100% {
        transform: scale(1);
    }
}

/* Bonus overlay fade out */
.bonus-game-overlay.fade-out {
    animation: overlayFadeOut 0.4s ease-out forwards;
}

@keyframes overlayFadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* ========================================
   Report Issue Button & Modal
   ======================================== */

.report-issue-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 50%, #a93226 100%);
    border: 2px solid #ec7063;
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    box-shadow:
        0 3px 0 #922b21,
        0 4px 15px rgba(0,0,0,0.4);
    transition: all 0.2s ease;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-issue-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 5px 0 #922b21,
        0 8px 20px rgba(0,0,0,0.5);
}

.report-issue-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow:
        0 1px 0 #922b21,
        0 2px 8px rgba(0,0,0,0.3);
}

/* Report Modal Overlay */
.report-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
}

.report-overlay.show {
    opacity: 1;
    visibility: visible;
}

.report-popup {
    background: linear-gradient(145deg, #2c3e50 0%, #1a252f 100%);
    border-radius: 20px;
    padding: 30px;
    border: 3px solid #e74c3c;
    box-shadow: 0 0 40px rgba(231, 76, 60, 0.3);
    max-width: 400px;
    width: 90%;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.report-overlay.show .report-popup {
    transform: scale(1);
}

.report-popup h3 {
    color: #e74c3c;
    font-size: 1.5em;
    margin-bottom: 10px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.report-hint {
    color: #95a5a6;
    font-size: 0.9em;
    text-align: center;
    margin-bottom: 15px;
}

.report-popup textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #34495e;
    background: rgba(0,0,0,0.3);
    color: #ecf0f1;
    font-family: inherit;
    font-size: 1em;
    resize: vertical;
    min-height: 100px;
}

.report-popup textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

.report-popup textarea::placeholder {
    color: #7f8c8d;
}

.report-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.report-cancel-btn,
.report-submit-btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    font-family: inherit;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-cancel-btn {
    background: linear-gradient(180deg, #7f8c8d 0%, #606c76 100%);
    color: white;
}

.report-cancel-btn:hover {
    background: linear-gradient(180deg, #95a5a6 0%, #7f8c8d 100%);
}

.report-submit-btn {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.report-submit-btn:hover {
    background: linear-gradient(180deg, #ec7063 0%, #e74c3c 100%);
}

.report-submit-btn:disabled {
    background: linear-gradient(180deg, #7f8c8d 0%, #606c76 100%);
    cursor: not-allowed;
}

.report-status {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9em;
    min-height: 1.2em;
}

.report-status.success {
    color: #2ecc71;
}

.report-status.error {
    color: #e74c3c;
}

/* Responsive adjustments */
@media (max-width: 800px) {
    .symbol-container {
        max-width: 360px;
        gap: 10px;
    }

    .symbol {
        width: 110px;
        height: 110px;
    }

    .symbol img {
        width: 95px;
        height: 95px;
    }

    .game-header h1 {
        font-size: 2.5em;
    }

    /* (prize board removed) */
    ._unused {
        display: none;
    }
}

@media (max-width: 500px) {
    body {
        padding: 10px 10px 75px 10px;
    }

    .symbol-container {
        max-width: 270px;
        gap: 8px;
    }

    .symbol {
        width: 80px;
        height: 80px;
    }

    .symbol img {
        width: 70px;
        height: 70px;
    }

    .game-header h1 {
        font-size: 1.8em;
    }

    /* Mobile button sizes */
    .play-button {
        width: 90px;
        height: 42px;
        font-size: 1em;
    }

    .menu-button,
    .info-button {
        width: 38px;
        height: 38px;
        font-size: 1em;
    }

    .controls-row {
        gap: 5px;
        padding: 8px 8px;
    }

    /* Mobile meters */
    .meter-container {
        flex: 0 0 auto;
    }

    .meter-label {
        font-size: 0.55em;
        font-weight: bold;
        color: #f1c40f;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 2px;
        display: block;
    }

    .credits-display,
    .wins-display,
    .wager-display {
        padding: 4px 8px;
        min-width: 55px;
    }

    .credits-label,
    .wins-label {
        font-size: 0.6em;
        padding: 1px 4px;
    }

    .credits-value,
    .wins-value,
    .wager-value,
    .daily-value {
        font-size: 0.95em;
    }

    .right-controls {
        gap: 5px;
    }

    .wins-hint {
        font-size: 0.7em;
        opacity: 0.5;
    }

    #winText {
        font-size: 1.2em;
    }

    /* Message line mobile */
    .message-line {
        margin-top: 6px;
        min-height: 20px;
    }

    #gameMessage {
        font-size: 0.95em;
    }

    /* Symbol frame mobile adjustments */
    .symbol-frame {
        padding: 20px 10px;
    }

    /* Frame overlay - scale down on mobile */
    .frame-overlay {
        top: -25px;
        left: -25px;
        right: -25px;
        bottom: -25px;
    }


    /* Bingo toggle button - move to top-right to avoid covering controls */
    .bingo-toggle-btn {
        bottom: auto;
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }

    /* Bingo card container - position higher on mobile */
    #bingoCardContainer {
        bottom: auto;
        top: 60px;
        right: 10px;
        left: 10px;
        max-width: none;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }

    /* Smaller bingo cells on mobile */
    .bingo-cell {
        width: 32px;
        height: 32px;
        font-size: 0.8em;
    }

    .balls-list .ball {
        width: 24px;
        height: 24px;
        font-size: 0.65em;
    }
}

/* Mobile portrait: controls in normal document flow below symbol grid.
   No viewport-height pinning — just natural content stacking. */
@media (max-width: 540px) and (orientation: portrait) {
    body {
        align-items: flex-start;
        padding-bottom: 10px;
    }

    .bottom-gradient {
        display: none;
    }

    .controls-row {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
    }
}

/* ========================================
   Mobile Prize Board Overlay
   ======================================== */

/* Mobile prizes button - only visible on small screens */
/* ===========================================
   Class 2 Bingo Styles
   =========================================== */

/* Progressive Jackpot Banner */
.jackpot-banner {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border: 3px solid #f1c40f;
    border-radius: 15px;
    padding: 15px 25px;
    margin-bottom: 15px;
    text-align: center;
    box-shadow:
        0 0 20px rgba(241, 196, 15, 0.3),
        inset 0 0 30px rgba(241, 196, 15, 0.1);
    animation: jackpotGlow 2s ease-in-out infinite;
}

@keyframes jackpotGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(241, 196, 15, 0.3), inset 0 0 30px rgba(241, 196, 15, 0.1); }
    50% { box-shadow: 0 0 40px rgba(241, 196, 15, 0.5), inset 0 0 40px rgba(241, 196, 15, 0.2); }
}

.jackpot-label {
    color: #e74c3c;
    font-size: 0.9em;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.jackpot-amount {
    color: #f1c40f;
    font-size: 2.5em;
    font-weight: bold;
    text-shadow:
        0 0 10px rgba(241, 196, 15, 0.5),
        2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: jackpotPulse 1.5s ease-in-out infinite;
}

@keyframes jackpotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.jackpot-info {
    color: #95a5a6;
    font-size: 0.8em;
    margin-top: 5px;
}

/* Jackpot Win Overlay */
.jackpot-win-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.jackpot-win-overlay.show {
    display: flex;
}

.jackpot-win-popup {
    background: linear-gradient(145deg, #f1c40f 0%, #e67e22 50%, #d35400 100%);
    border-radius: 30px;
    padding: 50px 80px;
    text-align: center;
    border: 5px solid #fff;
    box-shadow:
        0 0 100px rgba(241, 196, 15, 0.8),
        0 0 200px rgba(241, 196, 15, 0.4);
    animation: jackpotWinPop 0.5s ease-out;
}

@keyframes jackpotWinPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.jackpot-win-popup h1 {
    color: #fff;
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    animation: jackpotText 0.5s ease-in-out infinite;
}

@keyframes jackpotText {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.jackpot-win-amount {
    color: #2c3e50;
    font-size: 4em;
    font-weight: bold;
    margin: 20px 0;
    text-shadow: 2px 2px 0 #fff;
}

.jackpot-win-message {
    color: #fff;
    font-size: 1.5em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.jackpot-close-btn {
    background: linear-gradient(180deg, #2ecc71 0%, #27ae60 100%);
    color: #fff;
    border: 3px solid #fff;
    border-radius: 15px;
    padding: 15px 50px;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.jackpot-close-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(46, 204, 113, 0.5);
}

/* Bingo Card Container */
#bingoCardContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(26, 26, 46, 0.95);
    border: 2px solid #f1c40f;
    border-radius: 15px;
    padding: 15px;
    display: none;
    z-index: 100;
    max-width: 300px;
}

#bingoCardContainer.show {
    display: block;
}

/* Bingo Card */
.bingo-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: fit-content;
    margin: 0 auto;
}

.bingo-row {
    display: flex;
    gap: 2px;
}

.bingo-cell {
    width: clamp(32px, 8vw, 45px);
    height: clamp(32px, 8vw, 45px);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: clamp(0.7em, 2vw, 1.1em);
    border-radius: 5px;
    background: #2c3e50;
    color: #ecf0f1;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.bingo-cell.header {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    font-size: 1.3em;
}

.bingo-cell.marked {
    background: linear-gradient(180deg, #27ae60 0%, #1e8449 100%);
    color: #fff;
    box-shadow: 0 0 10px rgba(39, 174, 96, 0.5);
}

.bingo-cell.free {
    background: linear-gradient(180deg, #f1c40f 0%, #f39c12 100%);
    color: #2c3e50;
    font-size: 0.7em;
}

/* Called Balls */
.bingo-balls {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(241, 196, 15, 0.3);
}

.balls-label {
    color: #f1c40f;
    font-size: 0.8em;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.balls-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.balls-list .ball {
    background: #3498db;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75em;
    font-weight: bold;
}

/* Bingo Card Toggle Button */
.bingo-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(180deg, #9b59b6 0%, #8e44ad 100%);
    color: #fff;
    border: 2px solid #f1c40f;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 99;
    transition: transform 0.2s;
}

.bingo-toggle-btn:hover {
    transform: scale(1.1);
}

/* Class 2 Slot Machine Spinning Animation - Reel Strip Effect */
.symbol.slot-spinning {
    position: relative;
    overflow: hidden;
}

.symbol.slot-spinning > img {
    opacity: 0 !important;
}

/* Reel strip container - holds multiple scrolling symbols */
.reel-strip {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: reelSpin 0.12s linear infinite;
    filter: blur(1px);
}

.reel-strip img {
    width: 80%;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
    padding: 5% 0;
}

@keyframes reelSpin {
    0% { transform: translateY(-33.33%); }
    100% { transform: translateY(0); }
}

/* Gradient overlay for depth effect */
.symbol.slot-spinning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.1) 20%,
        transparent 40%,
        transparent 60%,
        rgba(0, 0, 0, 0.1) 80%,
        rgba(0, 0, 0, 0.5) 100%
    );
    pointer-events: none;
    z-index: 2;
    border-radius: inherit;
}

/* Subtle glow effect */
.symbol.slot-spinning::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 20px rgba(155, 89, 182, 0.4);
    border-radius: inherit;
    pointer-events: none;
    z-index: 3;
}

/* Slowing down animation state */
.symbol.slot-slowing .reel-strip {
    animation-duration: 0.25s;
    filter: blur(0.5px);
}

/* Stopping animation */
.symbol.slot-stopping {
    overflow: hidden;
}

.symbol.slot-stopping .reel-strip {
    animation: none;
    filter: none;
}

.symbol.slot-stopping::before,
.symbol.slot-stopping::after {
    opacity: 0;
    transition: opacity 0.2s;
}

.symbol.slot-stopping > img {
    opacity: 1 !important;
    animation: symbolLand 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes symbolLand {
    0% {
        transform: translateY(-30px);
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
    70% {
        transform: translateY(8px);
    }
    85% {
        transform: translateY(-3px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Mobile adjustments for Class 2 */
@media (max-width: 480px) {
    .jackpot-banner {
        padding: 8px 12px;
        margin-bottom: 8px;
    }

    .jackpot-label {
        font-size: 0.7em;
        letter-spacing: 1px;
    }

    .jackpot-amount {
        font-size: 1.5em;
    }

    .jackpot-win-popup {
        padding: 25px 30px;
        margin: 15px;
    }

    .jackpot-win-popup h1 {
        font-size: 1.8em;
    }

    .jackpot-win-amount {
        font-size: 2em;
    }

    /* Bingo card - use full width modal on small phones */
    #bingoCardContainer {
        bottom: auto;
        top: 55px;
        right: 5px;
        left: 5px;
        max-width: none;
        max-height: calc(100vh - 180px);
        overflow-y: auto;
        padding: 10px;
    }

    .bingo-cell {
        width: 28px;
        height: 28px;
        font-size: 0.7em;
    }

    .bingo-cell.header {
        font-size: 0.9em;
    }

    .bingo-cell.free {
        font-size: 0.55em;
    }

    .balls-list .ball {
        width: 22px;
        height: 22px;
        font-size: 0.6em;
    }

    .bingo-close-btn {
        padding: 8px 20px;
        font-size: 0.9em;
        margin-top: 10px;
    }
}

/* Animated Ball Sequence */
.ball-hopper {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(241, 196, 15, 0.3);
}

.ball-hopper .balls-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.animated-ball {
    animation: ballDrop 0.3s ease-out;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 0.7em;
    font-weight: bold;
    color: #fff;
}

@keyframes ballDrop {
    0% {
        transform: translateY(-20px) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translateY(5px) scale(1.1);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Ball colors by column */
.ball-b { background: linear-gradient(180deg, #3498db 0%, #2980b9 100%); }
.ball-i { background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%); }
.ball-n { background: linear-gradient(180deg, #f1c40f 0%, #f39c12 100%); color: #2c3e50; }
.ball-g { background: linear-gradient(180deg, #2ecc71 0%, #27ae60 100%); }
.ball-o { background: linear-gradient(180deg, #9b59b6 0%, #8e44ad 100%); }

/* Bingo cell animations */
.bingo-cell.just-marked {
    animation: cellMark 0.3s ease-out;
}

@keyframes cellMark {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); background: #f1c40f; }
    100% { transform: scale(1); }
}

/* Corner cells for jackpot */
.bingo-cell.corner {
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.bingo-cell.jackpot-corner {
    animation: jackpotCorner 1s ease-in-out infinite;
    border-color: #f1c40f;
}

@keyframes jackpotCorner {
    0%, 100% { box-shadow: 0 0 10px #f1c40f, 0 0 20px #f1c40f; }
    50% { box-shadow: 0 0 20px #f1c40f, 0 0 40px #f1c40f, 0 0 60px #f39c12; }
}

/* Animated bingo card in paytable */
.bingo-card.animated {
    margin: 15px auto;
}

.bingo-card.animated .bingo-cell {
    transition: background 0.3s, transform 0.2s;
}

/* ===========================================
   Bingo Side Widget (Class 2)
   Real-time bingo card panel on the side
   =========================================== */
.bingo-side-widget {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 100;
    transition: transform 0.3s ease;
}

.bingo-side-widget.collapsed .bingo-widget-content {
    transform: translateX(100%);
}

.bingo-side-widget.collapsed .bingo-widget-toggle {
    right: 0;
}

.bingo-widget-toggle {
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    background: linear-gradient(180deg, #9b59b6 0%, #8e44ad 100%);
    border: 2px solid #f1c40f;
    border-right: none;
    border-radius: 10px 0 0 10px;
    padding: 15px 10px;
    cursor: pointer;
    color: #fff;
    font-weight: bold;
    font-size: 0.9em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 2px;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.bingo-widget-toggle:hover {
    background: linear-gradient(180deg, #a569bd 0%, #9b59b6 100%);
    padding-right: 15px;
}

.bingo-widget-content {
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.98) 0%, rgba(15, 15, 35, 0.98) 100%);
    border: 2px solid #9b59b6;
    border-right: none;
    border-radius: 15px 0 0 15px;
    padding: 15px;
    width: 200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.bingo-widget-header {
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(155, 89, 182, 0.3);
}

.bingo-widget-header h3 {
    color: #f1c40f;
    font-size: 1em;
    margin: 0;
    letter-spacing: 1px;
}

.bingo-widget-header p {
    color: #95a5a6;
    font-size: 0.75em;
    margin-top: 3px;
}

/* Smaller bingo card for side widget */
.bingo-side-widget .bingo-card {
    margin: 10px 0;
}

.bingo-side-widget .bingo-cell {
    width: 32px;
    height: 32px;
    font-size: 0.85em;
}

.bingo-side-widget .bingo-cell.header {
    font-size: 0.9em;
}

.bingo-side-widget .ball-hopper {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(155, 89, 182, 0.3);
}

.bingo-side-widget .balls-label {
    color: #95a5a6;
    font-size: 0.75em;
    margin-bottom: 5px;
}

.bingo-side-widget .balls-list {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    min-height: 150px;
    max-height: 150px;
    overflow-y: auto;
}

.bingo-side-widget .ball {
    width: 22px;
    height: 22px;
    font-size: 0.7em;
}

/* Hide widget by default, show only in Class 2 mode */
.bingo-side-widget {
    display: none;
}

.bingo-side-widget.active {
    display: block;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .bingo-side-widget {
        top: 10px;
        bottom: auto;
        right: 10px;
        left: auto;
        transform: none;
        max-width: 200px;
        z-index: 1000;
    }

    .bingo-side-widget.collapsed .bingo-widget-content {
        display: none;
    }

    .bingo-widget-toggle {
        position: static;
        width: 100%;
        writing-mode: horizontal-tb;
        text-align: center;
        border-radius: 10px;
        border: 2px solid #f1c40f;
        padding: 8px 12px;
        font-size: 0.8em;
    }

    .bingo-widget-content {
        border-radius: 10px;
        border: 2px solid #9b59b6;
        max-height: 50vh;
        margin-top: 5px;
        overflow-y: auto;
    }
}

/* Portrait mode specific adjustments for phones */
@media (max-width: 480px) and (orientation: portrait) {
    .bingo-card {
        gap: 1px;
    }

    .bingo-cell {
        width: calc((100vw - 60px) / 5);
        height: calc((100vw - 60px) / 5);
        max-width: 50px;
        max-height: 50px;
        font-size: clamp(0.65em, 3vw, 0.9em);
        border-radius: 3px;
    }

    /* Bingo side widget - compact top-right position */
    .bingo-side-widget {
        top: 5px;
        right: 5px;
        max-width: 180px;
    }

    .bingo-side-widget .bingo-card {
        gap: 1px;
    }

    .bingo-side-widget .bingo-cell {
        width: 28px;
        height: 28px;
        font-size: 0.65em;
    }

    .bingo-side-widget .balls-list {
        max-height: 60px;
    }

    .bingo-side-widget .ball {
        width: 18px;
        height: 18px;
        font-size: 0.55em;
    }

    .bingo-widget-toggle {
        padding: 6px 10px;
        font-size: 0.7em;
    }

    .bingo-widget-content {
        max-height: 40vh;
        padding: 8px;
    }

    .ball-hopper .balls-list {
        max-height: 80px;
        overflow-y: auto;
    }
}

/* Old mobile portrait viewport-pinning block removed — see @media portrait query near line 1598 */
