/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.glass-modal {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.modal-overlay.active .glass-modal {
    transform: scale(1);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

/* Modal Filters */
.modal-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
}

.modal-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 14px;
    min-width: 200px;
}

.modal-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 14px;
}

.modal-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.modal-btn.btn-primary {
    background: var(--accent-color);
    color: #000;
    font-weight: 600;
}

.modal-btn.btn-primary:hover {
    background: #fff;
    box-shadow: 0 0 10px var(--accent-glow);
}

.modal-btn.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-btn.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Modal Table Styles */
.table-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--card-border);
    overflow: hidden;
    margin-bottom: 20px;
}

table.glass-table {
    width: 100%;
    border-collapse: collapse;
}

table.glass-table th, 
table.glass-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 14px;
}

table.glass-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

table.glass-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
}

table.glass-table tr:last-child td {
    border-bottom: none;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    min-width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.page-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

.page-btn.active {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    font-weight: 600;
}

.page-dots {
    color: var(--text-secondary);
}

.pagination span {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0 5px;
}

/* --- Payment Modal Styles (Redesign) --- */
.payment-modal-content {
    flex-direction: row;
    max-width: 850px;
    height: auto;
    overflow: visible;
    background: #0f0f0f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 50px rgba(0, 229, 255, 0.1);
}

.modal-close-absolute {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

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

.payment-left {
    flex: 1.2;
    padding: 40px;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.9) 0%, rgba(10, 10, 10, 0.95) 100%);
    position: relative;
    overflow: hidden;
}

/* Background decoration for left side */
.payment-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.vip-header {
    text-align: left;
    margin-bottom: 30px;
    position: relative;
}

.vip-icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #000;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.2);
}

.vip-title {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(90deg, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.vip-subtitle {
    color: var(--accent-color);
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
}

.vip-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vip-features-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 15px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 18px;
    flex-shrink: 0;
}

.feature-text h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 4px;
    font-weight: 600;
}

.feature-text p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
}

.payment-right {
    flex: 0.8;
    background: #1a1a1a;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.payment-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.payment-title {
    background: var(--accent-color);
    color: #000;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 15px;
}

.price-container {
    display: flex;
    align-items: baseline;
    justify-content: center;
    color: #fff;
    margin-bottom: 5px;
}

.price-container .currency {
    font-size: 24px;
    font-weight: 600;
    margin-right: 4px;
}

.price-container .amount {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.price-container .period {
    font-size: 16px;
    color: var(--text-muted);
    margin-left: 5px;
}

.original-price {
    color: var(--text-muted);
    text-decoration: line-through;
    font-size: 14px;
    margin-bottom: 25px;
}

.qr-box {
    margin-bottom: 20px;
}

.qr-border {
    padding: 10px;
    background: #fff;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 12px;
}

.qr-border img {
    width: 160px;
    height: 160px;
    display: block;
}

.scan-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.pay-icon {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 24px;
}

.pay-icon.wechat { color: #09bb07; }
.pay-icon.alipay { color: #00a0e9; }

.payment-note {
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .payment-modal-content {
        flex-direction: column;
        height: 90vh;
        overflow-y: auto;
    }

    .payment-left, .payment-right {
        padding: 25px;
        flex: none;
    }

    .vip-title {
        font-size: 24px;
    }

    .vip-features-list li {
        margin-bottom: 15px;
    }
}
