/* 现代科技蓝主题 - 微先生AI */

/* 明亮主题变量 */
:root {
    /* 明亮蓝色主题 */
    --primary-blue: #0ea5e9;
    --primary-blue-dark: #0284c7;
    --primary-blue-light: #38bdf8;
    --accent-cyan: #14b8a6;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;

    /* 明亮背景 */
    --bg-gradient-start: #ffffff;
    --bg-gradient-end: #f8fafc;
    --bg-subtle: #f1f5f9;

    /* 明亮文字 */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    /* 明亮边框和卡片 */
    --border-color: #e2e8f0;
    --border-subtle: #cbd5e1;
    --card-bg: #ffffff;
    --card-bg-hover: #ffffff;

    /* 明亮交互 */
    --hover-bg: rgba(14, 165, 233, 0.08);
    --active-bg: rgba(14, 165, 233, 0.15);

    /* 明亮阴影 */
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* 渐变背景 */
    --bg-gradient-main: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    --primary-gradient: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-cyan) 100%);
    --accent-gradient: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
}

/* 暗色主题变量 */
[data-theme="dark"] {
    /* 暗色蓝色主题 */
    --primary-blue: #38bdf8;
    --primary-blue-dark: #0284c7;
    --primary-blue-light: #7dd3fc;
    --accent-cyan: #22d3ee;
    --accent-purple: #a78bfa;
    --accent-pink: #f472b6;

    /* 暗色背景 */
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e293b;
    --bg-subtle: #334155;

    /* 暗色文字 */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    /* 暗色边框和卡片 */
    --border-color: #475569;
    --border-subtle: #64748b;
    --card-bg: rgba(30, 41, 59, 0.8);
    --card-bg-hover: rgba(30, 41, 59, 0.9);

    /* 暗色交互 */
    --hover-bg: rgba(56, 189, 248, 0.1);
    --active-bg: rgba(56, 189, 248, 0.2);

    /* 暗色阴影 */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.2);

    /* 暗色渐变背景 */
    --bg-gradient-main: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    --primary-gradient: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-cyan) 100%);
    --accent-gradient: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
}

/* 全局样式重置 */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-gradient-main);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* 导航栏样式 */
#header {
    width: 100%;
    position: fixed;
    z-index: 1000;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    top: 0;
    left: 0;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

#header .inner {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* margin: 0;
    padding: 0; */
}

/* Logo样式 */
a#logo {
    display: flex;
    align-items: center;
    color: var(--text-primary);
    text-decoration: none;
    gap: 15px;
    transition: opacity 0.3s ease;
}

a#logo:hover {
    opacity: 0.8;
}

#logo img {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

#logo div h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#logo div p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

/* 导航菜单样式 */
ul#navs {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 确保大屏幕上导航菜单始终显示 */
@media (min-width: 769px) {
    ul#navs {
        display: flex !important;
    }
}

#navs li {
    position: relative;
}

#navs a {
    display: block;
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

#navs a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    transition: left 0.5s ease;
}

#navs a:hover::before {
    left: 100%;
}

#navs a:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

#navs li.selected a {
    color: var(--primary-blue-light);
    background: var(--hover-bg);
}

/* 移动端菜单按钮 */
#btnSwitchMenu {
    display: none;
    flex-direction: column;
    gap: 3px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
}

#btnSwitchMenu:hover {
    background: var(--hover-bg);
}

#btnSwitchMenu span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
    margin: 3px 0;
}

/* 主要内容区域 */
#main {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    width: 100%;
}

/* 顶部横幅区域 */
#sectionTop {
    position: relative;
    background: var(--primary-gradient);
    overflow: hidden;
}

#sectionTop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="30" cy="30" r="1"/></g></svg>');
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

#sectionTop .inner {
    padding: 80px 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

#sectionTop h3 {
    margin: 0;
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -1px;
    margin-bottom: 20px;
}

#sectionTop h3 span {
    color: var(--accent-cyan);
}

/* 底部区域 */
#footer {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 60px;
}

#footer .inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

#footer .left {
    flex: 1;
}

#footer .left h2 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

#footer .left h2 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

#footer .left h2 a:hover {
    color: var(--primary-blue-light);
}

#footer .right {
    width: 200px;
    text-align: center;
    color: var(--text-secondary);
}

#footer .right img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

#footer .right p {
    margin: 5px 0;
    font-size: 14px;
}

#footer .right p strong {
    color: var(--text-primary);
    font-weight: 600;
}

.line-copy {
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    top: 90px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 1001;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-lg);
}

/* 按钮样式 */
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .inner {
        padding: 0 15px;
    }

    #navs {
        display: none !important; /* 强制隐藏默认状态 */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        border-top: 1px solid var(--border-color);
        box-shadow: var(--shadow-xl);
        z-index: 999;
    }

    #navs.active {
        display: flex !important; /* 只有添加active类时才显示 */
    }

    #navs li {
        width: 100%;
        margin: 0 0 10px 0;
    }

    #navs li:last-child {
        margin-bottom: 0;
    }

    #navs a {
        padding: 15px 20px;
        border-radius: 8px;
        width: 100%;
        box-sizing: border-box;
        font-size: 16px;
        text-align: center;
        border: 1px solid var(--border-color);
        background: rgba(255, 255, 255, 0.05);
    }

    #navs a:hover {
        background: var(--hover-bg);
    }

    #btnSwitchMenu {
        display: flex;
        z-index: 1001;
    }

    #sectionTop h3 {
        font-size: 32px;
    }

    #footer .inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    #footer .right {
        width: auto;
        max-width: 200px;
    }
}