/* 全局样式 */
:root {
    --primary-color: #667eea;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    --border-radius: 15px;
    --box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* 导航栏样式 */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
}

.navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

/* Hero区域样式 */
.hero-section {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    min-height: 70vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/images/hero-bg-pattern.png') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* 功能卡片样式 */
.feature-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.feature-icon {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* 统计数据样式 */
.stat-item {
    padding: 2rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    background-color: rgba(0, 123, 255, 0.05);
}

/* 下载按钮样式 */
.download-buttons .btn {
    margin: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 二维码样式 */
.qr-codes img {
    max-width: 120px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.qr-codes img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* 页脚样式 */
footer {
    background-color: #1a1a1a !important;
}

footer .text-muted {
    color: #888 !important;
}

footer a:hover {
    color: var(--primary-color) !important;
    text-decoration: none;
}

/* 协议页面样式 */
.terms-content h2,
.privacy-content h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.terms-content h3,
.privacy-content h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
}

.terms-content ul,
.privacy-content ul {
    padding-left: 1.5rem;
}

.terms-content li,
.privacy-content li {
    margin-bottom: 0.5rem;
}

.contact-info {
    border-left: 4px solid var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .download-buttons {
        text-align: center;
    }
    
    .download-buttons .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .qr-codes .col-6 {
        text-align: center;
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section .container {
        padding: 1rem;
    }
    
    .feature-section {
        padding: 3rem 0;
    }
    
    .stats-section {
        padding: 3rem 0;
    }
    
    .download-section {
        padding: 3rem 0;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 按钮悬停效果 */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 卡片阴影 */
.shadow-sm {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

/* 文本选择样式 */
::selection {
    background-color: var(--primary-color);
    color: white;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .stats-section .display-4 {
        font-size: 2rem;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    .download-buttons {
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .display-4 {
        font-size: 1.8rem;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
}

/* 新增现代化样式 */

/* 浮动动画 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.floating-element {
    animation: float 3s ease-in-out infinite;
}

/* 悬停阴影效果 */
.hover-shadow {
    transition: var(--transition);
}

.hover-shadow:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-5px);
}

/* 渐变背景 */
.bg-gradient-primary {
    background: var(--primary-gradient) !important;
}

/* 现代化按钮样式 */
.btn-modern {
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-modern::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;
}

.btn-modern:hover::before {
    left: 100%;
}

/* 卡片现代化样式 */
.card-modern {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* 功能特色标签 */
.feature-tags .badge {
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    margin-bottom: 5px;
}

/* 文本框现代化样式 */
.form-control-modern {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px 20px;
    font-size: 16px;
    transition: var(--transition);
}

.form-control-modern:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* 时间轴样式 */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 4rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.timeline-year {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* 段位系统样式 */
.rank-item {
    transition: var(--transition);
    cursor: pointer;
}

.rank-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* 教材图标样式 */
.textbook-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.textbook-icon:hover {
    transform: scale(1.1);
}

/* 二维码卡片样式 */
.qr-card {
    transition: var(--transition);
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.qr-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

.qr-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* 统计数据增强样式 */
.stat-icon {
    opacity: 0.8;
    transition: var(--transition);
}

.stat-item:hover .stat-icon {
    opacity: 1;
    transform: scale(1.1);
}

/* 联系方式卡片 */
.contact-method {
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.contact-method::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;
}

.contact-method:hover::before {
    left: 100%;
}

.contact-method:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 波浪动画 */
@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

.wave-animation {
    animation: wave 2s ease-in-out infinite;
}

/* 脉冲动画 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* 渐变文字 */
.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 玻璃拟态效果 */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* 粒子背景动画 */
.particles-bg {
    position: relative;
    overflow: hidden;
}

.particles-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    animation: particles-float 20s ease-in-out infinite;
}

@keyframes particles-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(30px) rotate(240deg); }
}

/* 手机适配优化 */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item::before {
        left: 30px;
    }
    
    .timeline-content {
        padding-left: 60px;
    }
    
    .hero-stats {
        margin-top: 2rem;
    }
    
    .hero-stats .col-4 {
        margin-bottom: 1rem;
    }
    
    .feature-tags {
        text-align: center;
    }
    
    .download-buttons .btn {
        margin-bottom: 1rem;
    }
}

/* 无障碍优化 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 平滑滚动优化 */
.nav-link {
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* 锚点偏移（考虑固定导航栏） */
section[id] {
    scroll-margin-top: 80px;
}

/* FAQ样式 */
.faq-item {
    padding: 1rem;
    border-left: 3px solid var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
    border-radius: 5px;
    margin-bottom: 1rem;
}

.faq-item h6 {
    color: var(--primary-color);
}

/* 优势卡片样式 */
.advantage-card {
    padding: 1.5rem;
    transition: var(--transition);
}

.advantage-card:hover {
    transform: translateY(-5px);
}

.advantage-icon {
    transition: var(--transition);
}

.advantage-card:hover .advantage-icon {
    transform: scale(1.1);
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .card-modern {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .form-control-modern {
        background-color: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
} 