/* 充值页面样式 - 全新设计 */

/* 全局重置和基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #c42427 0%, #a31f22 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* 添加装饰性背景元素 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
 

/* 主容器 */
.recharge-container {
    max-width: 1200px;
    margin: 0 auto;
    /* padding: 30px 20px; */
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    position: relative;
}

/* 页面标题 */
.recharge-container h1 {
    text-align: center;
    color: #ffffff;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(196, 36, 39, 0.3);
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.recharge-container h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(196, 36, 39, 0.8), transparent);
    border-radius: 2px;
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scaleX(0.8); }
    50% { opacity: 1; transform: translateX(-50%) scaleX(1); }
}

/* 内容卡片容器 */
.content-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 30px;
}

/* 用户信息卡片 */
.user-info-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-radius: 28px;
    padding: 30px 30px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.user-info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25);
}

/* 用户头像 */
.user-avatar {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.user-avatar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    background: linear-gradient(135deg, #c42427 0%, #a31f22 100%);
    border-radius: 50%;
    z-index: 1;
    animation: avatarPulse 4s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.9; }
}

.user-avatar img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 5px solid white;
    object-fit: cover;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.user-avatar:hover img {
    transform: scale(1.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

/* 用户详情 */
.user-details {
    text-align: center;
}

.user-details h2 {
    color: #c42427;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.user-details p {
    color: #718096;
    font-size: 20px;
    margin-bottom: 25px;
    font-weight: 500;
}

.balance {
    display: block;
    font-size: 52px;
    font-weight: 900;
    color: #c42427;
    margin: 20px 0;
    font-family: 'SF Pro Display', 'PingFang SC', sans-serif;
    text-shadow: 0 4px 15px rgba(196, 36, 39, 0.35);
    animation: balanceGlow 3s ease-in-out infinite;
}

@keyframes balanceGlow {
    0%, 100% { text-shadow: 0 4px 15px rgba(196, 36, 39, 0.35); }
    50% { text-shadow: 0 4px 25px rgba(196, 36, 39, 0.55); }
}

/* 登录提示卡片 */
.login-prompt-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-radius: 28px;
    padding: 80px 40px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    margin-top: 10px;
}

.login-prompt-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25);
}

.login-prompt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #cc2529, #b32124, #cc2529);
    animation: gradientSlide 3s linear infinite;
}

@keyframes gradientSlide {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.login-prompt-card h2 {
    color: #c42427;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.login-prompt-card p {
    color: #718096;
    font-size: 20px;
    margin-bottom: 45px;
    line-height: 1.7;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.login-button {
    display: inline-block;
    background: linear-gradient(135deg, #c42427 0%, #a31f22 100%);
    color: white;
    padding: 22px 56px;
    text-decoration: none;
    border-radius: 60px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 20px;
    box-shadow: 0 12px 35px rgba(196, 36, 39, 0.45);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    position: relative;
    overflow: hidden;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.login-button:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(196, 36, 39, 0.6);
    letter-spacing: 2px;
}

.login-button:hover::before {
    left: 100%;
}

/* 充值选项区域 */
.recharge-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-radius: 28px;
    padding: 40px 30px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 30px;
    transition: all 0.4s ease;
}

.recharge-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.recharge-section h2 {
    text-align: center;
    color: #c42427;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 30px;
    letter-spacing: -1px;
    font-family: 'SF Pro Display', 'PingFang SC', sans-serif;
}

/* 套餐选择区域 */
.packages-section {
    margin-bottom: 0;
}

/* 套餐滑块 */
.package-slider {
    display: flex;
    gap: 36px;
    overflow-x: auto;
    padding: 10px 5% 20px 5%;
    scrollbar-width: thin;
    scrollbar-color: #cc2529 #f0f0f0;
}

.package-slider::-webkit-scrollbar {
    height: 8px;
}

.package-slider::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.package-slider::-webkit-scrollbar-thumb {
    background: #cc2529;
    border-radius: 4px;
}

.package-slider::-webkit-scrollbar-thumb:hover {
    background: #b32124;
}

/* 套餐卡片 */
.package-card {
    flex: 0 0 220px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.package-card.active {
    border-color: #c42427;
    box-shadow: 0 0 0 3px rgba(196, 36, 39, 0.1);
    transform: translateY(-5px);
}

.package-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(196, 36, 39, 0.15);
    border-color: #c42427;
}

/* 套餐卡片内部元素 */
.discount-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #c42427;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.package-price {
    font-size: 36px;
    font-weight: 900;
    color: #c42427;
    margin: 15px 0 5px;
    line-height: 1;
}

.package-original {
    font-size: 14px;
    color: #94a3b8;
    text-decoration: line-through;
    margin-bottom: 15px;
}

.package-period {
    font-size: 16px;
    color: #4a5568;
    margin-bottom: 10px;
    font-weight: 600;
}

.package-price-per-month {
    font-size: 14px;
    color: #64748b;
}

.selected-mark {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    background: #c42427;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

/* 新用户专享套餐 */
.new-user-only {
    background: #fef2f2;
    border-color: #fee2e2;
}

.new-user-tag {
    background: #fef2f2;
    color: #c42427;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 10px 0;
    display: inline-block;
    font-weight: bold;
}

.trial-desc {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 5px;
}

.trial-expire {
    font-size: 12px;
    color: #94a3b8;
}

/* 套餐详情 */
.package-details {
    background: #f8fafc;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    border: 1px solid #e2e8f0;
}

.details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
}

.details-row:last-child {
    border-bottom: none;
}

.details-label {
    font-size: 16px;
    color: #4a5568;
    font-weight: 600;
}

.details-value {
    font-size: 16px;
    color: #2d3748;
    font-weight: 700;
}

/* 数量控制 */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    color: #4a5568;
}

.quantity-btn:hover {
    background: #f1f5f9;
    border-color: #c42427;
    color: #c42427;
}

.quantity-btn:active {
    transform: scale(0.95);
}

#quantity {
    width: 60px;
    height: 36px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    background: white;
}

#quantity:focus {
    outline: none;
    border-color: #c42427;
    box-shadow: 0 0 0 3px rgba(196, 36, 39, 0.1);
}

/* 总价信息 */
.total-row {
    padding-top: 30px;
}

.total-price {
    text-align: right;
}

.original-price {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 5px;
    text-decoration: line-through;
}

.discount-price {
    font-size: 14px;
    color: #ef4444;
    margin-bottom: 10px;
    font-weight: 600;
}

.final-price {
    font-size: 24px;
    font-weight: 900;
    color: #c42427;
    margin-bottom: 5px;
}

.expire-date {
    font-size: 14px;
    color: #64748b;
}

/* 支付方式 */
.payment-section {
    margin-bottom: 40px;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-label {
    font-size: 16px;
    color: #4a5568;
    font-weight: 600;
}

.payment-methods {
    background: transparent;
    border: none;
    padding: 0;
}

.payment-options {
    display: flex;
    gap: 20px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    min-width: 140px;
    justify-content: center;
}

.payment-option.active {
    border-color: #c42427;
    box-shadow: 0 0 0 3px rgba(196, 36, 39, 0.1);
}

.payment-option:hover {
    border-color: #c42427;
    background: #fef2f2;
}

.payment-option img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.payment-option span {
    font-size: 14px;
    color: #4a5568;
    font-weight: 600;
}

/* 购买协议 */
.agreement-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 0;
    background: transparent;
    border: none;
}

.agreement-checkbox {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
    line-height: 1.7;
    transition: all 0.3s ease;
}

.agreement-checkbox:hover {
    transform: translateY(-2px);
}

.agreement-checkbox input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #cc2529;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.agreement-checkbox a {
    color: #c42427;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 2px;
}

.agreement-checkbox a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #c42427;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.agreement-checkbox a:hover {
    color: #a31f22;
}

.agreement-checkbox a:hover::after {
    transform: scaleX(1);
    background: #a31f22;
}

/* 充值按钮 */
.recharge-button-container {
    text-align: center;
    margin-top: 40px;
}

.recharge-button {
    display: inline-block;
    width: 100%;
    max-width: 300px;
    padding: 22px 60px;
    background: linear-gradient(135deg, #c42427 0%, #a31f22 100%);
    color: white;
    border: none;
    border-radius: 60px;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 12px 35px rgba(196, 36, 39, 0.45);
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.recharge-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.8s ease;
}

.recharge-button:hover:not(:disabled) {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(196, 36, 39, 0.6);
    letter-spacing: 3px;
}

.recharge-button:hover:not(:disabled)::before {
    left: 100%;
}

.recharge-button:active:not(:disabled) {
    transform: translateY(-3px);
}

.recharge-button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    color: #94a3b8;
    letter-spacing: 2px;
}

/* 数据库错误提示 */
.error-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-radius: 28px;
    padding: 80px 50px;
    text-align: center;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 600px;
    margin: 120px auto;
}

.error-container h2 {
    color: #c42427;
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 25px;
}

.error-container p {
    color: #718096;
    font-size: 20px;
    margin-bottom: 50px;
    line-height: 1.7;
}

.nav-button {
    display: inline-block;
    background: linear-gradient(135deg, #c42427 0%, #a31f22 100%);
    color: white;
    padding: 20px 50px;
    text-decoration: none;
    border-radius: 60px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 20px;
    box-shadow: 0 10px 35px rgba(196, 36, 39, 0.4);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.nav-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(196, 36, 39, 0.55);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .user-info-card,
    .login-prompt-card {
        position: static;
    }
    
    .selected-amount {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .recharge-container {
        padding: 40px 20px;
    }
    
    .recharge-container h1 {
        font-size: 42px;
        margin-bottom: 15px;
    }
    
    .recharge-section {
        padding: 50px 35px;
    }
    
    .recharge-section h2 {
        font-size: 32px;
        margin-bottom: 45px;
    }
}

@media (max-width: 768px) {
    .recharge-container {
        padding: 30px 15px;
    }
    
    .recharge-container h1 {
        font-size: 36px;
        margin-bottom: 10px;
    }
    
    .user-info-card,
    .login-prompt-card {
        padding: 40px 25px;
    }
    
    .recharge-section {
        padding: 40px 25px;
    }
    
    .recharge-section h2 {
        font-size: 28px;
        margin-bottom: 35px;
    }
    
    .package-card {
        flex: 0 0 200px;
        padding: 20px 15px;
    }
    
    .package-price {
        font-size: 32px;
    }
    
    .details-row,
    .payment-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        text-align: left;
    }
    
    .quantity-control {
        width: 100%;
        justify-content: flex-end;
    }
    
    .payment-options {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .payment-option {
        flex: 1;
        min-width: 120px;
    }
    
    .recharge-button {
        width: 100%;
        padding: 20px 40px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .recharge-container {
        padding: 20px 10px;
    }
    
    .recharge-container h1 {
        font-size: 28px;
        margin-bottom: 8px;
    }
    
    .user-info-card,
    .login-prompt-card {
        padding: 30px 20px;
    }
    
    .user-details h2 {
        font-size: 24px;
    }
    
    .balance {
        font-size: 42px;
    }
    
    .recharge-section {
        padding: 30px 20px;
    }
    
    .recharge-section h2 {
        font-size: 24px;
        margin-bottom: 30px;
    }
    
    .package-card {
        flex: 0 0 180px;
        padding: 15px 12px;
    }
    
    .package-price {
        font-size: 28px;
    }
    
    .package-details {
        padding: 20px;
    }
    
    .details-row {
        padding: 15px 0;
    }
    
    .payment-option {
        flex: 0 0 100%;
    }
    
    .recharge-button {
        font-size: 18px;
        padding: 18px 32px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 应用动画 */
.content-wrapper,
.recharge-section {
    animation: fadeInUp 0.8s ease-out;
}

.package-card,
.payment-option {
    animation: scaleIn 0.6s ease-out;
}

.package-card:nth-child(1),
.payment-option:nth-child(1) { animation-delay: 0.1s; }
.package-card:nth-child(2),
.payment-option:nth-child(2) { animation-delay: 0.2s; }
.package-card:nth-child(3),
.payment-option:nth-child(3) { animation-delay: 0.3s; }
.package-card:nth-child(4) { animation-delay: 0.4s; }