/* Game Tài Xỉu 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-tai-xiu-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 10px 0 20px 0;
}

.betting-board {
    position: relative;
    width: 100%;
    height: 500px;
    background: #2c5530;
    border: 3px solid #fff;
    border-radius: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Grid lines */
.betting-board::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #90EE90;
    z-index: 1;
}

.betting-board::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #90EE90;
    z-index: 1;
}

/* Bet sections */
.bet-section {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    z-index: 2;
}

.bet-section .price-each-item {
    top: 10px;
    left: 10px;
    transform: none;
    bottom: auto;
}

.bet-section.triple-section .price-each-item {
    left: 5px;
    transform: translate(0, 0) rotate(-45deg);
}

.bet-section.tai-section .price-each-item {
    left: auto;
    right: 10px;
}
.bet-section.even-section .price-each-item {
    left: auto;
    right: 10px;
}

.number-item .price-each-item {
    left: 5px;
    transform: none;
    top: 0;
    background: none;
    bottom: auto;
    padding: 0;
    text-align: left;
}

.bet-section:hover,
.bet-section.selected {
    background: rgba(255, 255, 255, 0.1);
}

.bet-section.active {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Bet labels */
.bet-label {
    font-size: 2.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

[data-bet] {
    cursor: pointer;
}

.bet-odds {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    opacity: 0.9;
}


/* Section colors */
.xiu-section .bet-label,
.xiu-section .bet-odds {
    color: #fff;
}

.tai-section .bet-label,
.tai-section .bet-odds {
    color: #fff;
}

.odd-section .bet-label,
.odd-section .bet-odds {
    color: #fff;
}

.even-section .bet-label,
.even-section .bet-odds {
    color: #fff;
}

.triple-section .bet-label,
.triple-section .bet-odds {
    color: #8B4513;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
    font-weight: bold;
}

/* Center diamond */
.triple-section {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 200px;
    height: 200px;
    background: #fff;
    border: 3px solid #fff;
    border-radius: 0;
    z-index: 10;
    transition: none;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 40px rgba(255, 165, 0, 0.4);
}

.triple-section:hover {
    transform: translate(-50%, -50%) rotate(45deg);
    background: #f0f0f0;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.triple-section .bet-label {
    transform: rotate(-45deg);
    font-size: 1.8rem;
    text-align: center;
    line-height: 1.2;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 100%;
}

.triple-section .bet-odds {
    transform: rotate(-45deg);
    font-size: 1rem;
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-31%, 0%) rotate(-45deg);
    width: 100%;
    text-align: center;
}


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

/* Bottom Section */


/* Number Grid Styles */


.number-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.number-item {
    width: calc(100%/7);
    height: 75px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-weight: bold;
    margin-bottom: 3px;
    position: relative;
}

.number-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.number-item .number {
    font-size: 1.3rem;
    font-weight: bold;
}

.number-item .odds {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Dice Grid Styles */


.dice-item {
    width: calc(100%/3);
    max-width: 60px;
    max-height: 60px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-weight: bold;
    position: relative;
}

.dice-item .price-each-item {
    background: none;
    padding: 0;
    box-shadow: none;
    top: 50%;
    margin-top: -10px;
    bottom: auto;
    text-shadow: #000 1px 1px 2px;
    font-size: 14px;
}

.dice-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.dice-item .dice-number {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 3px;
    width: 100%;
    padding-bottom:102%;
    height:0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


.ketqua_game_tai_xiu_item_1 {
    display: inline-block;
    margin-bottom: 3px;
    width: 75px;
    height: 75px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.item-game-chontien {
    margin-right: 4px;
    display: inline-block;
    width: 58px;
    height: 58px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.icon-ox-control-game-4 {
    display: inline-block;
    width: 43px;
    height: 30px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.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;
}

.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);
}

.ox-control-game-4::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.ox-control-game-4:hover::before {
    left: 100%;
}

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

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

.icon-ox-control-game-5 {
    display: inline-block;
    width: 32px;
    height: 32px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.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;
    margin: 0;
}

.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);
}

.ox-control-game-5::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.ox-control-game-5:hover::before {
    left: 100%;
}

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

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

.icon-ox-control-game-5 {
    cursor: pointer;
}

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

.ox-control-game-1 {
    display: inline-block;
    width: 30px;
    height: 30px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
}

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

.box-control-game-chontien-1 {
    position: relative;
    width: 30px;
    height: 64px;
}
.ketqua_game_tai_xiu {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Countdown hiển thị trong khu vực kết quả (hourglass) */
.dice-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffffff, #f3f6ff);
    border: 2px solid #e0e7ff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    font-weight: 700;
    color: #0d47a1;
    margin: 10px auto;
    width: fit-content;
}

.dice-countdown .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: #0d6efd;
}

.dice-countdown .icon i {
    font-size: 20px;
    animation: hourglass-rotate 1.2s linear infinite;
}

.dice-countdown .label {
    color: #0d47a1;
    opacity: 0.9;
}

.dice-countdown .time {
    color: #0d6efd;
    text-align: right;
}

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

/* Price display for each betting item */
.price-each-item {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ffd700;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    min-width: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
    display: none;
}

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


.dice-item .dice-odds {
    font-size: 0.6rem;
    opacity: 0.8;
    text-align: center;
}

.dice-odds-text {
    text-align: center;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 10px;
    opacity: 0.9;
    min-width: 180px;
}

.box-game-chontien {
    background-color: #fff;
    border-radius: 10px;
    padding: 10px;
    margin-top: 20px;
}

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

#popup-chon-tien .item-game-chontien {
    margin-bottom: 10px;
}

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

}

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

}

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


.box-game-tai-xiu {
    max-width: 700px;
    margin: 0 auto;
}

.selected_this {
    border: 3px solid #007bff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}
/* Responsive */
@media (max-width: 991px) {
    .list-game-chontien {
        margin-bottom: 10px;
    }
    .dice-grid {
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .betting-board {
        width: 100%;
        height: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .bet-label {
        font-size: 1.2rem;
    }
    
    .bet-odds {
        font-size: 1rem;
    }
    
    .triple-section {
        width: 120px;
        height: 120px;
    }
    
    .triple-section .bet-label {
        font-size: 1.0rem;
    }
    
    .triple-section .bet-odds {
        font-size: 0.9rem;
    }

    .number-item .number {
        font-size: 1rem;
    }

    .number-item .odds {
        font-size: 0.7rem;
    }


    .dice-item {
        width: 50px;
        height: 50px;
    }
    .dice-odds-text {
        width: 100%;
    }

    .dice-item .dice-number {
        font-size: 1.2rem;
    }

    .dice-item .dice-odds {
        font-size: 0.6rem;
    }

    .number-item {
        width: calc(100%/4);
        height: 60px;
    }
}

@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-3 i,
    .ox-control-game-4 i,
    .ox-control-game-5 i {
        font-size: 16px;
        margin-right: 6px;
    }
    .ox-control-game-3 span,
    .ox-control-game-4 span,
    .ox-control-game-5 span {
        font-size: 12px;
    }
}

/* 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-thong-bao .popup-content.popup-notification {
    border-radius: 10px;
    overflow: hidden;
}

.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;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.popup-actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.popup-actions .btn:hover::before {
    left: 100%;
}

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

.popup-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268, #3d4043);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

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

.popup-actions .btn-primary:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.popup-actions .btn i {
    font-size: 16px;
    margin-right: 8px;
}

.popup-actions .btn span {
    font-size: 16px;
    font-weight: 600;
}

.popup-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Popup Thông báo */
.popup-notification {
    max-width: 600px;
    text-align: center;
    min-width: 240px;
}

.column-gap-5 {
    column-gap: 5px;
}

.notification-content {
    padding: 20px;
}

#popup-thong-bao .notification-content {
    padding: 0;
}

#popup-thong-bao .dice-results-container {
    margin-top: 0;
}

.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;
}

.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);
}

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

/* Animation cho popup */
.popup-overlay {
    animation: fadeIn 0.3s ease-out;
}

.popup-content {
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive cho popup thông báo */
@media (max-width: 576px) {
    .popup-notification {
        max-width: 90%;
        margin: 20px;
    }
    
    .notification-icon {
        font-size: 36px;
    }
    
    .notification-message p {
        font-size: 14px;
    }
    
    .notification-actions .btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100px;
    }
}

/* Loading animation */
.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;
}

/* Biến thể đồng hồ cát cho popup */
.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 in popup */
.dice-results-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px solid #e9ecef;
}

.dice-result-item {
    width: 80px;
    height: 80px;
    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);
}

/* Success message styling */
.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;
}