/* ========================================
   Bingo25 Game Room Page Styles
   ======================================== */

/* Bingo Banner */
.bingo-banner {
    margin-top: 120px;
    width: 100%;
    height: 300px;
    background-image: url('2 Bingo25 Page/Bingo_page_Img/Wizard Bingo25_banner.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Game Tabs */
.game-tabs {
    display: flex;
    justify-content: center;
    background: linear-gradient(180deg, #1a2332 0%, #15191F 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
    padding: 18px 60px;
    background: transparent;
    color: #888;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    color: #fff;
    background: linear-gradient(180deg, #2a3a5a 0%, #1a2332 100%);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #d4a641;
}

/* Game Room Section */
.game-room-section {
    padding: 50px 0 80px;
    background: #15191F;
    min-height: 500px;
}

.game-room-section .section-header {
    margin-bottom: 40px;
}

.game-room-section .title-badge {
    background: linear-gradient(90deg, #d4a641 0%, #b8902d 100%);
    padding: 12px 30px 12px 20px;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.game-room-section .title-badge img {
    width: 24px;
    height: 24px;
}

.game-room-section .title-badge span {
    color: #000;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Room Grid */
.room-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

/* Room Card */
.room-card {
    background: linear-gradient(180deg, #1e2a3a 0%, #15191F 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.room-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 166, 65, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.room-card.active {
    border-color: rgba(212, 166, 65, 0.5);
}

.room-content {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.room-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #2a4a8a 0%, #1a3060 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.room-icon img {
    width: 50px;
    height: auto;
}

.room-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.room-timer {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e74c3c;
    color: #fff;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.room-timer i {
    font-size: 10px;
}

.room-label {
    color: #888;
    font-size: 12px;
    font-weight: 500;
    margin-top: 5px;
}

.room-name {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

/* Play Now Button */
.btn-play-now {
    width: 100%;
    padding: 12px 20px;
    background: transparent;
    color: #888;
    border: 1px solid #444;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-play-now:hover {
    background: rgba(212, 166, 65, 0.1);
    border-color: #d4a641;
    color: #d4a641;
}

.btn-play-now.active {
    background: linear-gradient(90deg, #d4a641 0%, #b8902d 100%);
    color: #000;
    border: none;
    font-weight: 700;
}

.btn-play-now.active:hover {
    background: linear-gradient(90deg, #e4b651 0%, #c8a03d 100%);
}

/* ========================================
   Responsive Design for Bingo25 Page
   ======================================== */

/* Tablet */
@media (max-width: 1200px) {
    .room-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .bingo-banner {
        margin-top: 60px;
        height: 200px;
    }
    
    .room-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .tab-btn {
        padding: 15px 40px;
        font-size: 14px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .bingo-banner {
        height: 180px;
    }
    
    .room-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .tab-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
    
    .game-room-section {
        padding: 30px 0 60px;
    }
    
    .room-card {
        padding: 15px;
    }
    
    .room-icon {
        width: 55px;
        height: 55px;
    }
    
    .room-icon img {
        width: 40px;
    }
    
    .room-name {
        font-size: 16px;
    }
    
    .room-label {
        font-size: 11px;
    }
    
    .btn-play-now {
        padding: 10px 15px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .bingo-banner {
        height: 150px;
    }
    
    .room-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .room-content {
        gap: 12px;
    }
    
    .room-card {
        display: flex;
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 12px 25px;
        font-size: 13px;
        flex: 1;
    }
    
    .game-tabs {
        padding: 0 15px;
    }
}

/* ========================================
   Game Popup Modal Styles
   ======================================== */

.game-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-popup-overlay.active {
    opacity: 1;
}

.game-popup {
    background: #f0f4f8;
    border-radius: 8px;
    width: 95%;
    max-width: 1050px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.game-popup-overlay.active .game-popup {
    transform: scale(1);
}

/* Popup Title Bar */
.popup-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e0e4e8;
    padding: 6px 10px;
    border-bottom: 1px solid #bbb;
}

.popup-controls-left,
.popup-controls-right {
    display: flex;
    gap: 6px;
}

.popup-control-btn {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 3px;
    background: #c8cdd3;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.popup-control-btn:hover {
    background: #b8bdc3;
}

.popup-control-btn.close:hover {
    background: #e74c3c;
    color: #fff;
}

/* Game Content */
.game-content {
    padding: 12px;
    background: linear-gradient(180deg, #9bbde0 0%, #6a9dcf 100%);
}

/* Top Section */
.game-top-section {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

/* Left - Live Game Area */
.game-left {
    flex: 0 0 380px;
}

/* Number Display Bar with Ball Images */
.number-display-bar {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: #0f1829;
    border-radius: 25px;
    margin-bottom: 8px;
    justify-content: center;
    align-items: center;
}

.ball-wrapper {
    position: relative;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ball-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ball-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.ball-wrapper.yellow .ball-number {
    color: #000;
    text-shadow: none;
}

.ball-wrapper.current {
    transform: scale(1.1);
}

/* Live Video Area */
.live-video-area {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a2e;
    aspect-ratio: 16 / 10;
}

.game-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e74c3c;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.wheel-numbers {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
}

.wheel-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

.wheel-num.blue { background: #3498db; }
.wheel-num.orange { background: #e67e22; }
.wheel-num.green { background: #27ae60; }
.wheel-num.purple { background: #9b59b6; }
.wheel-num.pink { background: #e91e63; }

/* Center - Player Info & Bingo Card */
.game-center {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
}

/* Player Info Bar */
.player-info-bar {
    display: flex;
    background: #0f1829;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 8px;
    gap: 15px;
    align-items: center;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.info-label {
    color: #6a7a8a;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

.info-value {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.info-value.highlight {
    color: #3498db;
}

.info-value.coin {
    color: #e74c3c;
}

.info-item.coin-item {
    margin-left: auto;
}

.info-item.timer {
    background: #1a2a4a;
    padding: 6px 12px;
    border-radius: 4px;
}

/* Bingo Card */
.bingo-card {
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.bingo-header {
    display: flex;
    gap: 2px;
    margin-bottom: 3px;
}

.bingo-letter {
    width: 38px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    border-radius: 4px;
}

.bingo-letter.b { background: #3498db; }
.bingo-letter.i { background: #e74c3c; }
.bingo-letter.n { background: #f1c40f; color: #000; }
.bingo-letter.g { background: #27ae60; }
.bingo-letter.o { background: #9b59b6; }

.bingo-star {
    width: 38px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #f1c40f;
    background: transparent;
}

.bingo-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bingo-row {
    display: flex;
    gap: 2px;
}

.bingo-cell {
    width: 38px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f6f8;
    border: 1px solid #e0e0e0;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.bingo-cell.star {
    color: #f1c40f;
    font-size: 20px;
}

/* Right - My Cards Section */
.game-right {
    flex: 1;
    min-width: 260px;
}

.my-cards-section {
    background: #0f1829;
    border-radius: 8px;
    padding: 12px;
    height: 100%;
}

.my-cards-header {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.my-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.card-slot {
    background: #fff;
    border-radius: 4px;
    padding: 4px;
    text-align: center;
    border: 2px solid transparent;
}

.card-slot.active {
    border-color: #3498db;
}

.card-label {
    display: block;
    font-size: 8px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
    padding: 2px;
}

.card-slot.active .card-label {
    background: #3498db;
    color: #fff;
    margin: -4px -4px 4px -4px;
    padding: 3px;
    border-radius: 2px 2px 0 0;
}

.card-preview {
    height: 38px;
}

.card-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Bottom Section */
.game-bottom-section {
    display: flex;
    gap: 12px;
}

/* Number Selection Grid */
.number-selection {
    flex: 0 0 380px;
    background: #0a1525;
    border-radius: 10px;
    padding: 20px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    max-width: 380px;
}

/* Ball button with image */
.num-ball-btn {
    position: relative;
    width: 38px;
    height: 38px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.num-ball-btn:hover {
    transform: scale(1.15);
}

.num-ball-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.num-ball-btn span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    font-weight: 700;
    color: #333;
    text-shadow: 0 1px 1px rgba(255,255,255,0.5);
}

/* Betting Panel */
.betting-panel {
    flex: 1;
    background: #0f1829;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bet-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.bet-btn {
    background: #3498db;
    border: none;
    border-radius: 6px;
    padding: 6px 4px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.bet-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.bet-amount {
    font-size: 9px;
    opacity: 0.9;
}

.bet-count {
    font-size: 13px;
    font-weight: 700;
}

.bet-total {
    font-size: 8px;
    opacity: 0.7;
}

.bet-actions {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.action-btn {
    background: #2c3e50;
    border: none;
    border-radius: 6px;
    padding: 8px 4px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.action-btn:hover {
    background: #34495e;
    transform: translateY(-2px);
}

.action-amount {
    font-size: 10px;
    opacity: 0.9;
}

.action-count {
    font-size: 13px;
    font-weight: 700;
}

.action-btn.highlight {
    background: linear-gradient(180deg, #f1c40f 0%, #d4a641 100%);
    color: #000;
}

.action-btn.auto {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
    font-weight: 700;
}

/* Game Popup Responsive */
@media (max-width: 1024px) {
    .game-popup {
        max-width: 98%;
    }
    
    .game-top-section {
        flex-wrap: wrap;
    }
    
    .game-left {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .game-center {
        flex: 1 1 auto;
    }
    
    .game-right {
        flex: 1 1 100%;
        min-width: auto;
    }
    
    .number-selection {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .game-popup {
        max-height: 95vh;
        border-radius: 0;
    }
    
    .game-content {
        padding: 8px;
        overflow-y: auto;
        max-height: calc(95vh - 40px);
    }
    
    .game-top-section {
        flex-direction: column;
    }
    
    .game-bottom-section {
        flex-direction: column;
    }
    
    .bet-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .bet-actions {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .my-cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .bingo-letter,
    .bingo-cell {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .bingo-star {
        width: 32px;
        height: 32px;
    }
    
    .number-grid {
        max-width: 100%;
    }
    
    .num-ball-btn {
        width: 32px;
        height: 32px;
    }
    
    .num-ball-btn span {
        font-size: 11px;
    }
    
    .number-selection {
        flex: 0 0 auto;
        width: 100%;
    }
}
