/* ===== MODAL CONTAINER ===== */
.wheel-success-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wheel-success-modal.show {
    opacity: 1;
}

.wheel-success-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

/* ===== MODAL CONTENT ===== */
.wheel-success-content {
    position: relative;
    background: linear-gradient(145deg, #da1915 0%, #8b0a07 100%);
    border: 2px solid #ffe388;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 227, 136, 0.2) inset;
    padding: 24px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wheel-success-modal.show .wheel-success-content {
    transform: scale(1);
}

/* ===== HEADER ===== */
.modal-header {
    margin-bottom: 16px;
}

.modal-header h3 {
    color: #ffe388;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===== REWARD IMAGE ===== */
.wheel-reward-image {
    margin: 0 auto 16px;
    width: 90px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #ffe388;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-reward-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ===== REWARD LABEL ===== */
.wheel-reward-label {
    background: linear-gradient(135deg, #ffe388 0%, #ffd54f 100%);
    color: #740704;
    font-size: 16px;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== REWARD CODE ===== */
.wheel-reward-code {
    background: rgba(0, 0, 0, 0.25);
    border: 1.5px dashed rgba(255, 227, 136, 0.5);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.code-value {
    flex: 1;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 1.5px;
    text-align: left;
}

.copy-code-btn {
    background: rgba(255, 227, 136, 0.15);
    color: #ffe388;
    border: 1px solid rgba(255, 227, 136, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-code-btn svg {
    flex-shrink: 0;
}

.copy-code-btn:hover {
    background: rgba(255, 227, 136, 0.25);
    border-color: rgba(255, 227, 136, 0.5);
    transform: translateY(-1px);
}

.copy-code-btn.copied {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.4);
    color: #81c784;
}

/* ===== EXTRA INFO ===== */
.wheel-extra-info {
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

/* ===== REMAINING SPINS ===== */
.remaining-spins {
    background: rgba(0, 0, 0, 0.2);
    color: #ffe388;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px; line-height: 20px;
}

button.copy-code-btn {
    margin: 0px;
}

.remaining-spins strong {
    font-size: 16px;
    color: #fff;
    font-weight: 700;
}

/* ===== OK BUTTON ===== */
.wheel-ok-btn {
    background: linear-gradient(135deg, #ffe388 0%, #ffd54f 100%);
    color: #740704;
    border: none;
    line-height: 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wheel-ok-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 227, 136, 0.4);
}

.wheel-ok-btn:active {
    transform: translateY(0);
}

/* ===== LOADING SPINNER ===== */
.loading-lucky {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 227, 136, 0.2);
    border-top-color: #ffe388;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

button.wheel-ok-btn {
    margin: 0px !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
    .wheel-success-content {
        padding: 20px;
        max-width: 340px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .wheel-reward-label {
        font-size: 14px;
        padding: 4px 12px;
    }
    
    .wheel-reward-image {
        width: 80px;
        height: 80px;
    }
    
    .code-value {
        font-size: 14px;
    }
    
    .copy-code-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .copy-code-btn svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 360px) {
    .wheel-success-content {
        padding: 16px;
    }
    
    .wheel-reward-code {
        flex-direction: column;
        gap: 8px;
    }
    
    .code-value {
        text-align: center;
    }
    
    .copy-code-btn {
        width: 100%;
        justify-content: center;
    }
}





@media (max-width: 768px) {

    .spinwheel-history-wrapper {
        padding: 10px;
    }

    .SpinWheel_spin_button {
        position: absolute;
        top: 38% !important;
        left: 53% !important;
        width: 52px !important;
        transform: translateX(-50%);
    }
    
    .SpinWheel_spin_button img {
    width: 54px !important;
}

h2.spin-rules-title {
    font-size: 20px !important;
    font-weight: 800;
    line-height: 28.8px;
    text-shadow: #ffe388 1px 0 10px;
}

    .Home_ong1__owPEf {
        position: absolute;
        width: 120px !important;
        top: -120px !important;
        left: 0;
        z-index: 9999 !important;
    }

    .Home_ong2__owPEf {
        position: absolute;
        width: 135px !important;
        bottom: 260px !important;
        left: -30px;
        z-index: 9999 !important;
    }
}





/* ========================================
   SPIN WHEEL HISTORY - Dark Theme
   ======================================== */

.spinwheel-history-wrapper {
    background: linear-gradient(135deg, #1a1a1a 0%, #151515 100%);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #3a3a3a;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    max-width: 1200px;
    margin: 0 auto;
}

.spinwheel-history-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #3a3a3a;

}

/* ========================================
   TABLE STYLES
   ======================================== */

.spinwheel-history-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #3a3a3a;
}

.spinwheel-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 14px;
}

.spinwheel-history-table thead {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
}

.spinwheel-history-table th {
    color: #5ec4ff;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #3a3a3a;
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.spinwheel-history-table tbody tr {
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
    transition: all 0.3s ease;
}

.spinwheel-history-table tbody tr:hover {
    background: linear-gradient(135deg, #252525 0%, #1f1f1f 100%);
    transform: translateX(3px);
}

.spinwheel-history-table td {
    padding: 14px 16px;
    color: #e0e0e0;
    border-right: 1px solid #2a2a2a;
}

.spinwheel-history-table td:last-child {
    border-right: none;
}

/* ========================================
   BADGES & LABELS
   ======================================== */

.spinwheel-reward-label {
    font-weight: 600;
    color: #fff;
}

.spinwheel-reward-code {
    background: linear-gradient(135deg, #c25522 0%, #d86f3e 100%);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    display: inline-block;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(194, 85, 34, 0.3);
}

.spinwheel-min-order {
    background: linear-gradient(135deg, #5ec4ff 0%, #4aa3d9 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4px;
}

.spinwheel-no-code {
    color: #666;
    font-style: italic;
    font-size: 13px;
}

/* ========================================
   PAGINATION
   ======================================== */

.spinwheel-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #3a3a3a;
}

.spinwheel-pagination a,
.spinwheel-pagination span {
    padding: 10px 16px;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    text-decoration: none;
    color: #e0e0e0;
    font-weight: 600;
    transition: all 0.3s ease;
    background: #1f1f1f;
    font-size: 14px;
    min-width: 40px;
    text-align: center;
}

.spinwheel-pagination a:hover {
    background: linear-gradient(135deg, #c25522 0%, #d86f3e 100%);
    color: #fff;
    border-color: #c25522;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(194, 85, 34, 0.4);
}

.spinwheel-pagination .current {
    background: linear-gradient(135deg, #5ec4ff 0%, #4aa3d9 100%);
    color: #fff;
    border-color: #5ec4ff;
    box-shadow: 0 4px 12px rgba(94, 196, 255, 0.4);
}

.spinwheel-pagination .prev-next {
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
}

.spinwheel-pagination .prev-next:hover {
    background: linear-gradient(135deg, #5ec4ff 0%, #4aa3d9 100%);
    border-color: #5ec4ff;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.spinwheel-no-history {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.spinwheel-no-history-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.spinwheel-no-history p:first-of-type {
    font-size: 18px;
    font-weight: 600;
    color: #ccc;
    margin-bottom: 10px;
}

.spinwheel-no-history p:last-of-type {
    font-size: 14px;
    color: #777;
}

/* ========================================
   STATS BAR
   ======================================== */

.spinwheel-stats-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
    border-radius: 8px;
    border: 1px solid #3a3a3a;
    flex-wrap: wrap;
}

.spinwheel-stat-item {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 10px;
}

.spinwheel-stat-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.spinwheel-stat-value {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(90deg, #c25522 0%, #5ec4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 767px) {
    .spinwheel-history-wrapper {
        padding: 20px 15px;
    }
    
    .spinwheel-history-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .spinwheel-history-table {
        font-size: 12px;
    }
    
    .spinwheel-history-table th,
    .spinwheel-history-table td {
        padding: 10px 8px;
    }
    
    /* Ẩn cột không quan trọng trên mobile */
    .spinwheel-history-table .hide-mobile {
        display: none;
    }
    
    .spinwheel-reward-code {
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .spinwheel-min-order {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .spinwheel-stats-bar {
        gap: 10px;
    }
    
    .spinwheel-stat-item {
        min-width: 120px;
    }
    
    .spinwheel-stat-value {
        font-size: 20px;
    }
    
    .spinwheel-pagination a,
    .spinwheel-pagination span {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 35px;
    }
}

@media (max-width: 480px) {
    .spinwheel-history-table th,
    .spinwheel-history-table td {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .spinwheel-stat-item {
        flex: 1 1 100%;
    }
}