/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a6bff;
    --secondary-color: #3851e0;
    --accent-color: #ff6b6b;
    --background: #ffffff;
    --background-light: #f5f7fa;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e5ec;
    --card-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
    --small-radius: 8px;
    --gradient-primary: linear-gradient(135deg, #4a6bff 0%, #6b4aff 100%);
    --gradient-secondary: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    --transition-speed: 0.3s;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-light);
    background-attachment: fixed;
    background-size: cover;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 107, 255, 0.3);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 107, 255, 0.4);
}

.btn-secondary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn-secondary:hover {
    background: #e55c5c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: rgba(74, 107, 255, 0.1);
    transform: translateY(-2px);
}

.btn-login {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 8px 16px;
    border-radius: var(--small-radius);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-register {
    background: white;
    color: var(--primary-color);
    padding: 8px 16px;
    margin-left: 10px;
    border-radius: var(--small-radius);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-register:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-download {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    margin-right: 10px;
    padding: 12px 24px;
}

.btn-download:hover {
    background: #e55c5c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

/* 头部样式 */
.main-header {
    background: var(--gradient-primary);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    font-size: 1.8rem;
    margin-right: 8px;
}

.main-nav ul {
    display: flex;
}

.main-nav li {
    margin: 0 15px;
}

.main-nav a {
    position: relative;
    padding: 5px 0;
    font-weight: 500;
}

.main-nav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: white;
    bottom: 0;
    left: 0;
    transition: width var(--transition-speed);
}

.main-nav a:hover:after,
.main-nav a.active:after {
    width: 100%;
}

.user-actions {
    display: flex;
    align-items: center;
}

/* 页面标题 */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--text-color);
    position: relative;
    padding-bottom: 15px;
    font-weight: 700;
}

.section-title:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
}

/* 卡片通用样式 */
.card {
    background: var(--background);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    border: none;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--hover-shadow);
}

/* 头像样式 */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* 页脚样式 */
.main-footer {
    background: var(--primary-color);
    color: white;
    padding: 50px 0 20px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    gap: 20px;
}

.main-footer a:hover {
    color: white;
    opacity: 0.8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }
    
    .footer-links {
        width: 100%;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .main-header .container {
        flex-wrap: wrap;
    }
    
    .main-nav {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }
    
    .main-nav ul {
        justify-content: center;
    }
    
    .footer-section {
        min-width: 150px;
    }
}

@media (max-width: 576px) {
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .main-nav li {
        margin: 0 10px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: var(--small-radius);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    z-index: 2000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.message.error {
    background-color: #e74c3c;
}

.message.success {
    background-color: #2ecc71;
}

.message.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 支付成功弹窗 */
.payment-success {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(100%);
    transition: transform 0.5s ease;
}

.payment-success.show {
    transform: translateY(0);
}

.success-icon {
    font-size: 5rem;
    color: #2ecc71;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
    }
    70% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(0.95);
    }
}

.payment-success h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--text-color);
    font-weight: 700;
}

.payment-success p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-light);
}

.payment-success p span {
    color: var(--primary-color);
    font-weight: 700;
}

.payment-success button {
    padding: 12px 35px;
    font-size: 1.1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(74, 107, 255, 0.3);
    transition: all 0.3s;
}

.payment-success button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 107, 255, 0.4);
}

/* 余额更新动画 */
.balance-updated {
    animation: highlight-balance 2s ease;
}

@keyframes highlight-balance {
    0% {
        color: var(--primary-color);
        transform: scale(1);
    }
    50% {
        color: var(--accent-color);
        transform: scale(1.2);
    }
    100% {
        color: var(--primary-color);
        transform: scale(1);
    }
} 