/* Recharge Modal Refine */
.recharge-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5000;
}

.recharge-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.recharge-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    /* Makes background outside window clear */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.recharge-modal-content {
    position: relative;
    background: rgba(26, 21, 40, 1);
    /* Restore semi-transparent dark look */
    backdrop-filter: blur(10px);
    /* Internal blur */
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    width: 100%;
    /* Fill screen width */
    max-width: 100vw;
    height: auto;
    /* Changed from 100vh to fit content */
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: left;
}

.recharge-modal-scroll {
    overflow-y: auto;
    padding: 0px 0px 0px;
    /* More top padding for close button */
    scrollbar-width: none;
}

.recharge-modal-scroll::-webkit-scrollbar {
    display: none;
}

.recharge-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    /* Radius set to 5px */
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.recharge-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

.recharge-promo-header {
    margin-top: 10px;
    margin-bottom: 10px;
}

.recharge-promo-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.recharge-promo-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.recharge-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.recharge-tab {
    flex: 1;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    /* Radius set to 5px */
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.recharge-tab.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: #00FFFF;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.tab-dot {
    width: 14px;
    height: 14px;
    background: #22d3ee;
    border-radius: 5px;
    /* Radius set to 5px */
    box-shadow: 0 0 8px #22d3ee;
}

.recharge-section {
    margin-bottom: 16px;
}

.section-label {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 cards per row */
    gap: 12px;
}

.product-card {
    background: rgba(255, 255, 255, 0.06);
    border: 5px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    /* Radius set to 5px */
    padding: 16px 8px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 110px;
}

.product-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.product-card.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: #00FFFF;
}

.discount-badge {
    position: absolute;
    top: -8px;
    right: -2px;
    background: #ff8c69;
    color: #fff;
    padding: 3px 8px;
    border-radius: 5px;
    /* Radius set to 5px */
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(255, 140, 105, 0.4);
    z-index: 1;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.card-subtitle {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.diamond-icon {
    font-size: 20px;
    filter: drop-shadow(0 0 5px #ffffff);
}

.score-value {
    font-size: 16px;
    font-weight: 700;
}

.card-footer {
    margin-top: auto;
}

.card-price {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    /* Radius set to 5px */
    padding: 6px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #00FFFF;
}

.recharge-footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.recharge-footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: underline;
    font-size: 12px;
    transition: color 0.2s;
}

.recharge-footer a:hover {
    color: #fff;
}

/* Policy Modal (Full Screen Viewer) */
.policy-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5011;
}

.policy-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.policy-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.policy-modal-content {
    position: relative;
    background: #0a0a0f;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 4001;
    overflow: hidden;
}

.policy-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 32px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 4002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.policy-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.policy-content-frame {
    flex: 1;
    width: 100%;
    height: 100%;
}

.policy-content-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== Crypto Payment Modal ===== */
.crypto-payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.crypto-payment-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.crypto-payment-content {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    padding: 30px 24px;
    width: 90%;
    max-width: 360px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: modal-fadeInUp 0.3s ease-out forwards;
}

.crypto-payment-close {
    position: absolute;
    right: 16px;
    top: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.crypto-payment-close:hover {
    color: var(--text-primary);
}

#crypto-countdown {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ef4444;
    /* red-500 */
    margin-bottom: 24px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}

.crypto-qrcode-container {
    background: white;
    padding: 16px;
    border-radius: 5px;
    margin-bottom: 24px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

@keyframes crypto-skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

#crypto-qrcode {
    width: 200px;
    height: 200px;
    display: block;
}

.crypto-network-badge {
    /*background: linear-gradient(135deg, #00ffff 100%);*/
    padding: 8px 24px;
    border-radius: 0px;
    font-weight: 700;
    font-size: 1.5rem;
    color: #00FFFF;
    margin-bottom: 24px;
    /*box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);*/
    letter-spacing: 0.5px;
}

.crypto-address-section {
    width: 100%;
    text-align: left;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgb(0 255 255);
    border-radius: 5px;
    padding: 12px 16px;
}

.crypto-address-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}

.crypto-address-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

#crypto-address {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
    color: var(--text-primary);
    line-height: 1.4;
}

#crypto-copy-btn {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

#crypto-copy-btn:hover {
    background: #6366f1;
    color: white;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}