/* Game Xóc Đĩa CSS */

/* Popup Styles */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.popup-overlay.show {
    display: flex;
}

#popup-chon-tien .popup-content {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.popup-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.popup-close {
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.popup-close:hover {
    color: #333;
}

.popup-body {
    padding: 20px;
    background-color: #fff;
}

.popup-body p {
    margin: 0;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
}

/* Game Container */
.game-xoc-dia-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 10px 0 20px 0;
}

.box-game-xoc-dia {
    max-width: 700px;
    margin: 0 auto;
}

/* Header với Kỳ ID và Countdown */
.game-header-xoc-dia {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #6B46C1 0%, #7C3AED 100%);
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(107, 70, 193, 0.3);
}

.ky-id {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.countdown-timer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

.countdown-timer-header i {
    font-size: 1.5rem;
    animation: hourglass-rotate 1.2s linear infinite;
}

.countdown-timer-header span {
    font-family: 'Courier New', monospace;
    min-width: 90px;
    text-align: center;
}

@keyframes hourglass-rotate {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
    100% { transform: rotate(360deg); }
}

/* Khu vực kết quả (Nền nâu) */
.ketqua-game-xoc-dia {
    background: linear-gradient(135deg, #5C4033 0%, #4A3728 100%);
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ket-qua-text {
    margin-bottom: 10px;
}

.ket-qua-text #chan-le-text {
    font-size: 4rem;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

.ket-qua-text #chan-le-text {
    color: #007bff; /* Màu xanh cho Chẵn */
}

.ket-qua-text #chan-le-text.le {
    color: #dc3545; /* Màu đỏ cho Lẻ */
}

/* Container 4 đĩa */
.dia-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.dia-item {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.dia-item:hover {
    transform: scale(1.1);
}

.dia-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
}

.dia-item.dia-trang .dia-inner {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
}

.dia-item.dia-do .dia-inner {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.so-dia-do {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Bảng cược chính: Chẵn/Lẻ (2 cột) */
.betting-board-xoc-dia {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
    height: 300px;
}

.bet-section-xoc-dia {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 15px;
    background: #2c5530;
    border: 2px solid #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.bet-section-xoc-dia:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.bet-section-xoc-dia.selected_this {
    border: 3px solid #007bff;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.6);
}

.bet-section-xoc-dia .bet-label {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.bet-section-xoc-dia .bet-odds {
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0.9;
}

.chan-section .bet-label,
.chan-section .bet-odds {
    color: #007bff;
}

.le-section .bet-label,
.le-section .bet-odds {
    color: #dc3545;
}

.bet-section-xoc-dia .price-each-item {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffd700;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    display: none;
}

.bet-section-xoc-dia.selected_this .price-each-item {
    display: block;
}

/* Bảng cược chi tiết: Số đĩa đỏ */
.detail-betting-xoc-dia {
    margin-bottom: 20px;
}

.detail-betting-xoc-dia .row {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.detail-item {
    flex: 1;
    min-width: 150px;
    max-width: 200px;
    min-height: 140px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    color: white;
    padding: 28px 5px 5px 5px;
    gap: 8px;
}

.detail-item > *:not(.price-each-item) {
    flex: 0 0 auto;
    margin: 0;
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px);
}

.detail-item.selected_this {
    border: 3px solid #007bff;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

.detail-label {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 8px;
    display: none; /* Ẩn label vì đã có đĩa hiển thị trực quan */
}

.detail-odds {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
    flex: 0 0 auto;
}

.detail-item .price-each-item {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ffd700;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    display: none;
    z-index: 10;
}

.detail-item.selected_this .price-each-item {
    display: block;
}

/* Container đĩa trong detail-item */
.detail-dia-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin: 0;
    flex-wrap: nowrap;
    width: 100%;
    flex: 0 0 auto;
}

.detail-dia-item {
    width: 32px;
    height: 32px;
    min-width: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    position: relative;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-dia-item.dia-trang {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
}

.detail-dia-item.dia-do {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.detail-so-dia-do {
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Box chọn tiền */
.box-game-chontien {
    background-color: #fff;
    border-radius: 10px;
    padding: 10px;
    margin-top: 20px;
}

.list-game-chontien {
    font-size: 0;
    text-align: center;
}

.item-game-chontien {
    margin-right: 4px;
    display: inline-block;
    width: 58px;
    height: 58px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.item-game-chontien:hover {
    transform: scale(1.1);
}

.item-game-chontien.selected {
    border: 3px solid #007bff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
    border-radius: 50%;
}

.ox-control-game-3 {
    margin-right: 10px;
    display: inline-block;
    width: 58px;
    height: 58px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
}

.box-control-game-chontien {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.ox-control-game-4 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 45px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border: 2px solid #28a745;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    position: relative;
    overflow: hidden;
    color: white;
    text-decoration: none !important;
}

.ox-control-game-4:hover {
    /* background: linear-gradient(135deg, #218838, #1e7e34); */
    /* border-color: #218838; */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: #fff;
}

.ox-control-game-4 i {
    font-size: 18px;
    margin-right: 8px;
}

.ox-control-game-4 span {
    font-weight: 600;
    font-size: 14px;
}

.ox-control-game-5 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 45px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    border: 2px solid #dc3545;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    position: relative;
    overflow: hidden;
    color: white;
    text-decoration: none !important;
}

.ox-control-game-5:hover {
    /* background: linear-gradient(135deg, #c82333, #bd2130); */
    /* border-color: #c82333; */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    color: #fff;
}

.ox-control-game-5 i {
    font-size: 18px;
    margin-right: 8px;
}

.ox-control-game-5 span {
    font-weight: 600;
    font-size: 14px;
}

/* Popup xác nhận cược */
#popup-xac-nhan-cuoc .popup-content {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
}

.xac-nhan-cuoc-content {
    text-align: center;
}

.cuoc-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #e9ecef;
}

.cuoc-info p {
    margin: 5px 0;
    font-size: 16px;
    color: #333;
}

.popup-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.popup-actions .btn {
    padding: 3px 30px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    min-width: 120px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.popup-actions .btn-secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.popup-actions .btn-primary {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

/* Popup Thông báo */
#popup-thong-bao .popup-content.popup-notification {
    border-radius: 10px;
    overflow: hidden;
    max-width: 600px;
    text-align: center;
    min-width: 240px;
}

.notification-content {
    padding: 0;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-spinner.is-hourglass {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    animation: none;
}

.loading-spinner.is-hourglass i {
    font-size: 44px;
    color: #0d6efd;
    animation: hourglass-rotate 1.2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.countdown-timer {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 10px;
    border: 2px solid #007bff;
    display: inline-block;
    min-width: 60px;
}

.dice-results-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    padding: 20px;
    background: #eee;
    border-radius: 15px;
    border: 2px solid #eee;
}

.dice-result-item {
    width: 60px;
    height: 60px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.dice-result-item:hover {
    transform: scale(1.1);
}

.notification-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: #007bff;
}

.notification-icon.success {
    color: #28a745;
}

.notification-icon.error {
    color: #dc3545;
}

.notification-icon.warning {
    color: #ffc107;
}

.notification-message {
    margin-bottom: 25px;
}

.notification-message p {
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    margin: 0;
}

.success-message {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 15px;
    border-radius: 15px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.success-message p {
    color: white;
    font-weight: 600;
    margin: 0;
    line-height: 1.6;
}

.notification-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.notification-actions .btn {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    min-width: 120px;
    transition: all 0.3s ease;
}

.notification-actions .btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    color: white;
}

.notification-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-selected-in-popup {
    padding: 4px 25px;
}

/* Responsive */
@media (max-width: 768px) {
    .ketqua-game-xoc-dia {
        min-height: 160px;
    }
    .betting-board-xoc-dia {
        height: 150px;
    }
    
    .bet-section-xoc-dia .bet-label {
        font-size: 28px;
    }
    
    .bet-section-xoc-dia .bet-odds {
        font-size: 1.2rem;
    }
    
    .detail-item {
        min-width: 120px;
        padding-top: 13px;
        min-height: 120px;
    }
    
    .detail-dia-item {
        width: 24px;
        height: 24px;
        min-width: 24px;
    }
    
    .detail-so-dia-do {
        font-size: 0.8rem;
    }
    
    .detail-label {
        font-size: 1rem;
    }
    
    .detail-odds {
        font-size: 0.9rem;
    }
    
    .dia-item {
        width: 55px;
        height: 55px;
    }
    
    .so-dia-do {
        font-size: 1.5rem;
    }
    
    .ket-qua-text #chan-le-text {
        font-size: 32px;
    }
}

@media (max-width: 575px) {
    .item-game-chontien,
    .ox-control-game-3 {
        width: 45px;
        height: 45px;
    }
    
    .ox-control-game-4,
    .ox-control-game-5 {
        width: 100px;
        height: 40px;
        margin: 5px;
    }
    
    .ox-control-game-4 i,
    .ox-control-game-5 i {
        font-size: 16px;
        margin-right: 6px;
    }
    
    .ox-control-game-4 span,
    .ox-control-game-5 span {
        font-size: 12px;
    }
}

