/* ============================================= */
/* 全局变量和基础样式 */
/* ============================================= */
:root {
    --bg-primary: #f0f2f5; --bg-secondary: #ffffff; --bg-hover: #e9ecef;
    --text-primary: #1a1a1a; --text-muted: #6c757d; --border-color: #dee2e6;
    --accent-color: #0d6efd;
}
body.dark-mode {
    --bg-primary: #121212; --bg-secondary: #1e1e1e; --bg-hover: #343a40;
    --text-primary: #e0e0e0; --text-muted: #888888; --border-color: #333333;
}
body { 
    background-color: var(--bg-primary); 
    color: var(--text-primary); 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    margin: 0; 
    padding: 0 20px; 
    transition: background-color 0.3s, color 0.3s; 
}
.main-container {
    max-width: 1600px;
    margin: 80px auto 20px auto;
}

/* ============================================= */
/* 头部样式 */
/* ============================================= */
.header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 60px;
}
.header-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}
.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.logo {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    padding: 5px 10px;
    background-color: var(--text-primary);
    color: var(--bg-primary);
}
.main-nav { display: flex; gap: 10px; }
.nav-link { color: var(--text-muted); text-decoration: none; font-weight: 500; padding: 8px; border-radius: 6px; transition: background-color 0.2s, color 0.2s; }
.nav-link:hover { color: var(--text-primary); background-color: var(--bg-hover); }
.language-switcher {
    position: relative;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}
.language-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    padding-top: 8px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    min-width: 100px;
}
.language-switcher:hover .language-dropdown { display: block; }
.lang-option { display: block; padding: 10px 15px; color: var(--text-primary); text-decoration: none; font-size: 14px; }
.lang-option:hover { background-color: var(--bg-hover); }
.theme-toggle-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 42px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-muted);
    transition: background-color 0.2s;
}
.theme-toggle-btn:hover { background-color: var(--bg-hover); }

/* ============================================= */
/* 尾部样式 */
/* ============================================= */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 15px 20px;
    margin-top: 20px;
}
.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.footer-links a, .footer-links span { color: var(--text-muted); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: var(--text-primary); }

/* ============================================= */
/* 返回顶部按钮 */
/* ============================================= */
.back-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 1000;
}
.back-to-top-btn.show { opacity: 1; visibility: visible; }
.back-to-top-btn:hover { filter: brightness(1.15); }