/* 基础样式重置 + 性能优化 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* GPU加速优化 */
.recharge-form,
.payment-modal,
.modal-content,
.recharge-btn,
.payment-option,
#amount {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 预加载关键字体 */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Rajdhani', 'Courier New', monospace;
    background: #0a0a0a;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, transparent 49%, rgba(0, 255, 255, 0.03) 50%, transparent 51%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #00ffff;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: #00ffff;
    padding: 30px 0;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff00ff, #00ffff, #ff00ff, transparent);
    animation: neonPulse 2s ease-in-out infinite alternate;
}

.header h1 {
    font-family: 'Orbitron', monospace;
    font-size: 36px;
    margin-bottom: 15px;
    font-weight: 900;
    text-shadow:
        0 0 5px #00ffff,
        0 0 10px #00ffff,
        0 0 15px #00ffff,
        0 0 20px #00ffff;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: textGlow 2s ease-in-out infinite alternate;
}

.header h1 i {
    margin-right: 15px;
    color: #ff00ff;
    text-shadow:
        0 0 5px #ff00ff,
        0 0 10px #ff00ff,
        0 0 15px #ff00ff;
    animation: iconSpin 4s linear infinite;
}

.subtitle {
    font-size: 18px;
    font-weight: 400;
    color: #00ff88;
    text-shadow: 0 0 10px #00ff88;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@keyframes neonPulse {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes textGlow {
    0% { text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff, 0 0 15px #00ffff; }
    100% { text-shadow: 0 0 10px #00ffff, 0 0 20px #00ffff, 0 0 30px #00ffff; }
}

@keyframes iconSpin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}



/* 充值表单样式 */
.recharge-form {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 35px;
    box-shadow:
        0 0 30px rgba(0, 255, 255, 0.3),
        0 0 60px rgba(255, 0, 255, 0.2),
        inset 0 0 0 1px rgba(0, 255, 255, 0.3);
    margin-bottom: 20px;
    max-width: 100%;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
}

.recharge-form::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff, #00ffff);
    border-radius: 22px;
    z-index: -1;
    animation: borderGlow 3s linear infinite;
}

.recharge-form::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes borderGlow {
    0% { background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff, #00ffff); }
    25% { background: linear-gradient(45deg, #00ffff, #ff00ff, #00ffff, #ff00ff); }
    50% { background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff, #00ffff); }
    75% { background: linear-gradient(45deg, #00ffff, #ff00ff, #00ffff, #ff00ff); }
    100% { background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff, #00ffff); }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}



.form-section {
    margin-bottom: 25px;
}

.form-section h3 {
    font-family: 'Orbitron', monospace;
    font-size: 22px;
    margin-bottom: 25px;
    color: #00ffff;
    display: flex;
    align-items: center;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #00ffff;
}

.form-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #ff00ff, #00ffff);
    border-radius: 2px;
    box-shadow: 0 0 10px #00ffff;
    animation: lineGlow 2s ease-in-out infinite alternate;
}

.form-section h3 i {
    margin-right: 12px;
    color: #ff00ff;
    font-size: 24px;
    text-shadow: 0 0 10px #ff00ff;
    animation: iconPulse 2s ease-in-out infinite alternate;
}

@keyframes lineGlow {
    0% { box-shadow: 0 0 5px #00ffff; }
    100% { box-shadow: 0 0 20px #00ffff, 0 0 30px #00ffff; }
}

@keyframes iconPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

@keyframes lineGlow {
    0% { box-shadow: 0 0 5px #00ffff; }
    100% { box-shadow: 0 0 20px #00ffff, 0 0 30px #00ffff; }
}

@keyframes iconPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}



/* 自定义金额输入 */
.custom-amount {
    margin-top: 25px;
}

.custom-amount label {
    display: block;
    margin-bottom: 15px;
    font-family: 'Rajdhani', monospace;
    font-weight: 600;
    color: #00ff88;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px #00ff88;
}

.input-group {
    position: relative;
    margin-bottom: 12px;
}

.currency {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff00ff;
    font-weight: 700;
    font-size: 20px;
    text-shadow: 0 0 10px #ff00ff;
    z-index: 2;
}

#amount {
    width: 100%;
    padding: 22px 22px 22px 55px;
    border: 2px solid #00ffff;
    border-radius: 12px;
    font-size: 22px;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.7);
    color: #00ffff;
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    text-shadow: 0 0 10px #00ffff;
}

#amount:focus {
    outline: none;
    border-color: #ff00ff;
    box-shadow:
        0 0 30px rgba(255, 0, 255, 0.5),
        0 0 60px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(255, 0, 255, 0.1);
    transform: translateY(-2px);
    text-shadow: 0 0 15px #00ffff;
}

#amount::placeholder {
    color: rgba(0, 255, 255, 0.5);
    font-weight: 400;
}

.amount-tips {
    color: #00ff88;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
    font-family: 'Rajdhani', monospace;
    text-shadow: 0 0 5px #00ff88;
    letter-spacing: 0.5px;
}

/* 免责声明样式 */
.disclaimer-section {
    margin-bottom: 30px;
}

.disclaimer-content {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 255, 0.3);
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    max-height: 150px;
    overflow-y: auto;
    box-shadow:
        0 0 15px rgba(0, 255, 255, 0.2),
        inset 0 0 15px rgba(0, 255, 255, 0.05);
}

.disclaimer-content p {
    margin-bottom: 10px;
    font-size: 14px;
    color: #00ff88;
    line-height: 1.6;
    font-family: 'Rajdhani', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

/* 复选框样式 */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: all 0.3s ease;
}

.checkbox-container:hover {
    color: #667eea;
    transform: translateX(2px);
}

.checkbox-container input {
    margin-right: 8px;
}

/* 充值按钮 */
.recharge-btn {
    width: 100%;
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.8);
    color: #00ffff;
    border: 2px solid #00ffff;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow:
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    text-shadow: 0 0 10px #00ffff;
}

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

.recharge-btn:hover:not(:disabled)::before {
    left: 100%;
}

.recharge-btn i {
    margin-right: 10px;
    font-size: 20px;
    text-shadow: 0 0 10px #00ffff;
}

.recharge-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    border-color: #ff00ff;
    color: #ff00ff;
    box-shadow:
        0 0 30px rgba(255, 0, 255, 0.5),
        0 0 60px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(255, 0, 255, 0.1);
    text-shadow: 0 0 15px #ff00ff;
}

.recharge-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.recharge-btn:disabled {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(0, 255, 255, 0.3);
    color: rgba(0, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
    text-shadow: none;
}

.recharge-btn:disabled::before {
    display: none;
}

@keyframes buttonBorderGlow {
    0% { background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff, #00ffff); }
    25% { background: linear-gradient(45deg, #00ffff, #ff00ff, #00ffff, #ff00ff); }
    50% { background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff, #00ffff); }
    75% { background: linear-gradient(45deg, #00ffff, #ff00ff, #00ffff, #ff00ff); }
    100% { background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff, #00ffff); }
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* 支付方式弹窗 */
.payment-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.payment-modal.show {
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 380px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.payment-modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

@keyframes modalBorderGlow {
    0% { background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff, #00ffff); }
    25% { background: linear-gradient(45deg, #00ffff, #ff00ff, #00ffff, #ff00ff); }
    50% { background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff, #00ffff); }
    75% { background: linear-gradient(45deg, #00ffff, #ff00ff, #00ffff, #ff00ff); }
    100% { background: linear-gradient(45deg, #ff00ff, #00ffff, #ff00ff, #00ffff); }
}

.modal-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    color: #333;
}

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

.close:hover {
    color: #333;
    transform: rotate(90deg);
}

.payment-amount {
    padding: 15px 25px;
    text-align: center;
    background: #f8f9ff;
    font-size: 16px;
    color: #333;
}

.amount-display {
    font-weight: 600;
    color: #667eea;
    font-size: 20px;
}

@keyframes amountPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.payment-methods {
    padding: 25px 30px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 当只有一个支付方式时的样式优化 */
.payment-methods:has(.payment-option:only-child) {
    justify-content: center;
    min-height: 120px;
}

.payment-methods:has(.payment-option:only-child) .payment-option {
    max-width: 280px;
    width: 100%;
    margin-bottom: 0;
    transform: scale(1.02);
    border-color: #667eea;
    background: linear-gradient(145deg, #f8f9ff 0%, #ffffff 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

/* 兼容不支持:has()的浏览器 */
.payment-methods.single-payment {
    justify-content: center;
    min-height: 120px;
}

.payment-methods.single-payment .payment-option {
    max-width: 280px;
    width: 100%;
    margin-bottom: 0;
    transform: scale(1.02);
    border-color: #667eea;
    background: linear-gradient(145deg, #f8f9ff 0%, #ffffff 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    border: 2px solid #f0f2f5;
    border-radius: 16px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    position: relative;
    overflow: hidden;
    min-height: 70px;
}

/* 隐藏空白或无效的支付选项 */
.payment-option:empty,
.payment-option[data-method=""],
.payment-option:not([data-method]) {
    display: none !important;
}

/* 确保图标正确显示 */
.payment-option .payment-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.1);
}

.payment-option .payment-icon i {
    font-size: 24px !important;
    line-height: 1;
}

/* 微信图标颜色 */
.payment-option[data-method="wxpay"] .payment-icon i {
    color: #07c160 !important;
}

/* 支付宝图标颜色 */
.payment-option[data-method="alipay"] .payment-icon i {
    color: #1677ff !important;
}

.payment-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.05), transparent);
    transition: left 0.5s;
}

.payment-option:hover::before {
    left: 100%;
}

.payment-option:hover {
    border-color: #667eea;
    background: linear-gradient(145deg, #f8f9ff 0%, #ffffff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

/* 旧的图标样式已移除，使用上面的新样式 */

.payment-info h4 {
    font-size: 16px;
    margin-bottom: 2px;
    color: #333;
}

.payment-info p {
    font-size: 12px;
    color: #666;
}

.payment-arrow {
    margin-left: auto;
    color: #ccc;
    transition: all 0.3s ease;
}

.payment-option:hover .payment-arrow {
    transform: translateX(5px);
    color: #667eea;
}

/* 加载遮罩 */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 40px;
    margin-bottom: 15px;
}

.loading-spinner p {
    font-size: 16px;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

@keyframes slideUp {
    from {
        transform: scale(0.8) translateY(30px) rotateX(20deg);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0) rotateX(0deg);
        opacity: 1;
    }
}

/* 微交互效果 */
.form-section {
    transition: all 0.3s ease;
}

.form-section:hover {
    transform: translateY(-1px);
}

.checkbox-container {
    transition: all 0.3s ease;
}

.checkbox-container:hover {
    transform: translateX(2px);
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 28px;
    }

    .recharge-form {
        padding: 25px 20px;
        border-radius: 20px;
    }

    #amount {
        font-size: 18px;
        padding: 18px 18px 18px 45px;
    }

    .recharge-btn {
        padding: 16px 20px;
        font-size: 16px;
    }

    .modal-content {
        width: 95%;
        max-width: 340px;
    }

    .payment-option {
        padding: 16px 18px;
    }
}
