/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066cc;
    --secondary-color: #004499;
    --accent-color: #00a8ff;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a1a;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 跳转到内容 */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 9999;
}

.skip-to-content:focus {
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
}

/* 头部导航 */
.main-header {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-section {
    flex: 1;
    min-width: 200px;
}

.logo {
    font-size: 2.5em;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -1px;
}

.logo-subtitle {
    color: var(--text-light);
    font-size: 0.9em;
    margin-top: -5px;
    letter-spacing: 2px;
}

/* 导航菜单 */
.main-nav {
    flex: 2;
    display: flex;
    justify-content: flex-end;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1em;
    padding: 8px 0;
    display: block;
    transition: var(--transition);
    position: relative;
}

.nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu > li:hover > a::after,
.nav-menu > li.active > a::after {
    width: 100%;
}

.nav-menu > li > a:hover,
.nav-menu > li.active > a {
    color: var(--primary-color);
}

/* 下拉菜单 */
.has-submenu > ul.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 10px 0;
    border-radius: 8px;
    margin-top: 10px;
    list-style: none;
    z-index: 100;
}

.has-submenu:hover > ul.submenu {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.submenu li {
    width: 100%;
}

.submenu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.submenu li a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    padding-left: 25px;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
    border-radius: 2px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-outline:hover {
    background: #fff;
    color: var(--primary-color);
}

/* 章节标题 */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5em;
    color: var(--text-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 0 auto 20px;
    border-radius: 2px;
}

.section-description {
    color: var(--text-light);
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto;
}

/* 页脚 */
.main-footer {
    background: linear-gradient(135deg, var(--bg-dark) 0%, #2d2d2d 100%);
    color: #fff;
    padding: 60px 20px 30px;
    margin-top: 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3,
.footer-column h4 {
    margin-bottom: 20px;
    color: #fff;
}

.footer-column h3 {
    font-size: 1.5em;
}

.footer-column p {
    color: #ccc;
    line-height: 1.8;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 30px;
    text-align: center;
    color: #999;
}

.footer-bottom p {
    margin: 5px 0;
}

.admin-link {
    margin-top: 10px;
}

.admin-link a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .mobile-menu-toggle {
        display: flex;
        position: absolute;
        right: 20px;
        top: 20px;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        margin-top: 20px;
        border-top: 1px solid var(--border-color);
        padding-top: 20px;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .has-submenu > ul.submenu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        margin: 0;
        padding-left: 20px;
    }

    .has-submenu.active > ul.submenu {
        display: block;
    }

    .logo {
        font-size: 2em;
    }

    .section-header h2 {
        font-size: 2em;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* 页面过渡动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

