/* 自学党 - 自驱式学习平台样式 */
:root {
    --primary-color: #ffffff;
    --secondary-color: #f8f9ff;
    --accent-light: #e8f0ff;
    --accent-blue: #3366ff;
    --accent-orange: #3366ff;
    --text-primary: #222222;
    --text-secondary: #555555;
    --gradient-blue: linear-gradient(135deg, #3366ff 0%, #2244cc 100%);
    --gradient-orange: linear-gradient(135deg, #3366ff 0%, #3366ff 100%);
    --gradient-light: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
    --shadow-light: 0 8px 30px rgba(51, 102, 255, 0.1);
    --shadow-medium: 0 12px 40px rgba(51, 102, 255, 0.15);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--primary-color);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* 隐藏从CSS加载的内容，供屏幕阅读器使用 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 增强焦点可见性，提升可访问性 */
a:focus,
button:focus,
input:focus {
    outline: 3px solid var(--accent-blue);
    outline-offset: 3px;
}

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

/* 语义化头部 - 使用header和nav标签 */
header {
    background-color: rgba(255, 255, 255, 0.98);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 102, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-blue);
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-orange);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* 主导航 - 使用nav标签 */
nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    font-size: 1rem;
}

.nav-links a:hover {
    color: var(--accent-orange);
}

.nav-links a.active {
    color: var(--accent-orange);
    font-weight: 600;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-orange);
    border-radius: 3px;
}

.auth-buttons {
    display: flex;
    gap: 16px;
    margin-left: 20px;
}

.btn-login, .btn-register {
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-login {
    background-color: transparent;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
}

.btn-login:hover {
    background-color: rgba(51, 102, 255, 0.08);
}

.btn-register {
    background: var(--gradient-orange);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.2);
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.3);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--accent-blue);
    cursor: pointer;
}

/* 主内容区域 - 使用main和section标签 */
main {
    display: block;
}

/* 英雄区域 - 使用语义化标记 */
.hero {
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
    background: var(--gradient-light);
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: var(--gradient-orange);
    opacity: 0.05;
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    background: var(--gradient-blue);
    opacity: 0.05;
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 107, 53, 0.1);
    color: var(--accent-orange);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 24px;
    line-height: 1.2;
    color: var(--text-primary);
    font-weight: 700;
}

.hero-highlight {
    color: var(--accent-orange);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
}

.btn-primary {
    padding: 16px 36px;
    background: var(--gradient-orange);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    padding: 16px 36px;
    background: white;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background-color: rgba(51, 102, 255, 0.05);
    transform: translateY(-3px);
}

/* 统计数据区域 - 使用语义化标记 */
.stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-orange);
    line-height: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 8px;
}

/* 平台特色区域 */
.features {
    padding: 100px 0;
    background-color: var(--primary-color);
}

.section-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5rem;
    color: var(--text-primary);
    font-weight: 700;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-orange);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    border: 1px solid rgba(51, 102, 255, 0.1);
    text-align: center;
}

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

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    background: rgba(51, 102, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: var(--accent-blue);
}

.feature-card:nth-child(2) .feature-icon {
    background: rgba(255, 107, 53, 0.1);
    color: var(--accent-orange);
}

.feature-card:nth-child(3) .feature-icon {
    background: rgba(102, 204, 0, 0.1);
    color: #66cc00;
}

.feature-card:nth-child(4) .feature-icon {
    background: rgba(153, 51, 255, 0.1);
    color: #9933ff;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

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

/* 专业课程区域 - 使用语义化标记 */
.specialties {
    padding: 100px 0;
    background-color: var(--secondary-color);
    position: relative;
    overflow: hidden;
}

.specialties::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: var(--gradient-blue);
    opacity: 0.05;
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.specialties-subtitle {
    text-align: center;
    color: var(--accent-orange);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.specialty-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    height: 100%;
    border: 1px solid rgba(51, 102, 255, 0.1);
}

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

.specialty-header {
    padding: 28px 28px 20px;
    background: var(--gradient-light);
    position: relative;
}

.specialty-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-blue);
    box-shadow: 0 8px 20px rgba(51, 102, 255, 0.15);
    margin-bottom: 20px;
}

.specialty-card:nth-child(2) .specialty-icon {
    color: var(--accent-orange);
}

.specialty-card:nth-child(3) .specialty-icon {
    color: #9933ff;
}

.specialty-card:nth-child(4) .specialty-icon {
    color: #66cc00;
}

.specialty-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

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

.specialty-footer {
    padding: 20px 28px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.specialty-source {
    font-size: 0.85rem;
    color: var(--accent-blue);
    font-weight: 500;
}

.specialty-btn {
    padding: 10px 20px;
    background: rgba(255, 107, 53, 0.1);
    color: var(--accent-orange);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.specialty-btn:hover {
    background: rgba(255, 107, 53, 0.2);
}

/* 注册模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(30px);
    transition: transform 0.4s;
    position: relative;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.modal h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.modal-subtitle {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(51, 102, 255, 0.2);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(51, 102, 255, 0.1);
}

.modal-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-orange);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.modal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 107, 53, 0.2);
}

.modal-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-secondary);
}

.modal-footer a {
    color: var(--accent-blue);
    font-weight: 600;
    text-decoration: none;
}

/* 页脚 - 使用footer标签 */
footer {
    background-color: #1a1a2e;
    color: white;
    padding: 70px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-column h3 {
    margin-bottom: 24px;
    font-size: 1.3rem;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 14px;
}

.footer-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.copyright a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.copyright a:hover {
    color: white;
    text-decoration: underline;
}

/* 打印样式优化 */
@media print {
    .modal-overlay,
    .mobile-menu-btn,
    .auth-buttons,
    .hero-actions {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .specialties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links, .auth-buttons {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions button {
        width: 100%;
        max-width: 300px;
    }
    
    .specialties-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .stats {
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.9rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .modal {
        padding: 30px 20px;
    }
}