/* 认证页面统一样式 - 登录/注册/充值 */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #0a0e1a;
    --card-bg: rgba(15, 23, 42, 0.85);
    --border-color: rgba(99, 102, 241, 0.2);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
    --gradient-3: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 动态背景 */
.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.auth-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.08) 0%, transparent 40%);
    animation: bgRotate 30s linear infinite;
}

@keyframes bgRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 网格背景 */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
}

/* 浮动粒子 */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.4;
    animation: float 15s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 20s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 18s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 22s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 16s; }
.particle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 19s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 21s; }
.particle:nth-child(7) { left: 70%; animation-delay: 2s; animation-duration: 17s; }
.particle:nth-child(8) { left: 80%; animation-delay: 4s; animation-duration: 23s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1s; animation-duration: 20s; }

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
        transform: translateY(80vh) scale(1);
    }
    90% {
        opacity: 0.6;
        transform: translateY(10vh) scale(1);
    }
    100% {
        transform: translateY(-10vh) scale(0);
        opacity: 0;
    }
}

/* 主容器 */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* 认证卡片 */
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-2);
}

/* Logo区域 */
.auth-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4); }
}

.auth-logo h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 表单样式 */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    transition: color 0.3s;
}

.form-group:focus-within label {
    color: var(--primary-color);
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: color 0.3s;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-wrapper input:focus + i,
.input-wrapper input:focus ~ i {
    color: var(--primary-color);
}

.input-wrapper input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

/* 密码显示切换 */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.3rem;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* 记住我和忘记密码 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s;
}

.forgot-password:hover {
    opacity: 0.8;
}

/* 提交按钮 */
.auth-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--gradient-2);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
}

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

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.auth-submit:hover::before {
    left: 100%;
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-submit i {
    margin-left: 0.5rem;
}

/* 分隔线 */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* 第三方登录 */
.social-login {
    display: flex;
    gap: 1rem;
}

.social-btn {
    flex: 1;
    padding: 0.9rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.social-btn.wechat:hover {
    border-color: #07c160;
    color: #07c160;
}

.social-btn.qq:hover {
    border-color: #12b7f5;
    color: #12b7f5;
}

/* 底部链接 */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}

.auth-footer a:hover {
    opacity: 0.8;
}

/* 返回首页 */
.back-home {
    position: fixed;
    top: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.8rem 1.2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    z-index: 100;
}

.back-home:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

/* 错误提示 */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 1rem;
    color: #ef4444;
    font-size: 0.9rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.error-message.show {
    display: flex;
}

/* 成功提示 */
.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    padding: 1rem;
    color: #10b981;
    font-size: 0.9rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.success-message.show {
    display: flex;
}

/* 加载状态 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .auth-logo-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .auth-logo h1 {
        font-size: 1.5rem;
    }
    
    .back-home {
        top: 1rem;
        left: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* ========== 充值页面专用样式 ========== */
.recharge-card {
    max-width: 600px;
}

.points-packages {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.package-item {
    background: var(--glass-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.package-item:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-3px);
}

.package-item.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.12);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.package-item.popular::before {
    content: '热门';
    position: absolute;
    top: 10px;
    right: -25px;
    background: var(--gradient-3);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 2rem;
    transform: rotate(45deg);
}

.package-points {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.3rem;
}

.package-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.package-price {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--warning-color);
}

.package-price small {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.package-bonus {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--success-color);
}

/* 支付方式 */
.payment-methods {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.payment-method {
    flex: 1;
    background: var(--glass-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-method:hover {
    border-color: var(--primary-color);
}

.payment-method.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.payment-method i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.payment-method.wechat i {
    color: #07c160;
}

.payment-method.alipay i {
    color: #1677ff;
}

.payment-method span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 用户点数余额显示 */
.user-balance {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.balance-info h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.balance-amount {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.balance-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ========== 用户中心样式 ========== */
.user-center-card {
    max-width: 800px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: var(--gradient-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.user-details h2 {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.user-details p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
}

.stat-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-card .label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

/* 消费记录 */
.history-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-section h3 i {
    color: var(--primary-color);
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--glass-bg);
    border-radius: 10px;
    margin-bottom: 0.8rem;
    transition: all 0.3s;
}

.history-item:hover {
    background: rgba(99, 102, 241, 0.08);
}

.history-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.history-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.history-icon.consume {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.history-icon.recharge {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.history-text h4 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.history-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.history-amount {
    font-weight: 600;
    font-size: 1.1rem;
}

.history-amount.negative {
    color: #ef4444;
}

.history-amount.positive {
    color: #10b981;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.action-btn {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.action-btn.primary {
    background: var(--gradient-2);
    border: none;
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.action-btn.secondary {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.action-btn.secondary:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

/* 顶部导航条 (用于用户中心) */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.top-nav .logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.top-nav .logo i {
    font-size: 1.5rem;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.top-nav .logo span {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.top-nav .user-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.top-nav .points-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(245, 158, 11, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--warning-color);
    font-weight: 600;
}

.top-nav .user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.top-nav .user-btn:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

/* 带顶部导航的页面内容区 */
.page-with-nav {
    padding-top: 80px;
}


