/**
 * PicNAS 充值弹窗样式
 * 版本: v2026.01.03.4
 */

/* 弹窗基础样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

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

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 24px;
}

/* 步骤容器 */
.modal-step {
    display: none;
}

.modal-step.active {
    display: block;
    animation: stepFadeIn 0.3s ease;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 登录表单 */
.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.error-message {
    color: #f56565;
    font-size: 14px;
    margin: 10px 0;
    min-height: 20px;
}

/* 用户信息 */
.user-info {
    background: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.user-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #4a5568;
}

.user-info strong {
    color: #2d3748;
}

.user-info span {
    color: #667eea;
    font-weight: 500;
}

/* 套餐选项 */
.plan-options {
    margin: 20px 0;
}

.plan-options h4 {
    margin-bottom: 12px;
    color: #333;
}

/* 月份选择器 */
.month-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.month-btn {
    padding: 12px 8px;
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.month-btn:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.month-btn.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 500;
}

/* 账户数量选择器 */
.account-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.btn-minus,
.btn-plus {
    width: 40px;
    height: 40px;
    border: 2px solid #667eea;
    background: #fff;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-minus:hover,
.btn-plus:hover {
    background: #667eea;
    color: #fff;
}

#accountNum {
    width: 80px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
}

.price-note {
    text-align: center;
    color: #718096;
    font-size: 13px;
    margin-top: 10px;
}

/* 价格汇总 */
.price-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    margin-bottom: 8px;
}

.total-price span {
    font-size: 28px;
    font-weight: bold;
}

.price-detail {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* 支付方式 */
.payment-methods {
    margin: 20px 0;
}

.payment-methods h4 {
    margin-bottom: 12px;
    color: #333;
}

.method-btns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.payment-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-method svg {
    width: 40px;
    height: 40px;
}

.payment-method:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.payment-method.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

/* 按钮样式 */
.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #edf2f7;
    color: #4a5568;
    border: 1px solid #cbd5e0;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* 二维码步骤 */
.qr-code-container {
    text-align: center;
}

.qr-code-title h4 {
    color: #333;
    margin-bottom: 8px;
}

.qr-code-title p {
    color: #718096;
    margin-bottom: 20px;
}

#paymentMethodName {
    color: #667eea;
    font-weight: 500;
}

.qr-code-image {
    margin: 20px auto;
}

.order-info {
    background: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
}

.order-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #4a5568;
}

.qr-note {
    color: #718096;
    font-size: 14px;
    margin: 20px 0;
}

/* 成功步骤 */
.success-container {
    text-align: center;
    padding: 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
    animation: successPulse 0.6s ease;
}

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

.success-container h3 {
    color: #38a169;
    margin-bottom: 8px;
}

.success-container > p {
    color: #718096;
    margin-bottom: 20px;
}

.success-info {
    background: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
}

.success-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #4a5568;
}

.success-info strong {
    color: #2d3748;
}

.success-info span {
    color: #667eea;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .month-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .total-price {
        font-size: 16px;
    }

    .total-price span {
        font-size: 24px;
    }
}
