/*
 * moyun 主题 - 主样式表
 * 采用 BEM 命名规范，支持明暗双主题切换
 */

:root {
    /* 明亮主题变量 */
    --primary-color: #2d81ff;
    --primary-hover: #1a66e6;
    --bg-color: #ffffff;
    --section-bg: #f8f9fa;
    --text-color: #333333;
    --text-muted: #666666;
    --border-color: #eeeeee;
    --card-bg: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.9);
    --footer-bg: #1a1a1a;
    --footer-text: #ffffff;
}

[data-theme="dark"] {
    /* 暗黑主题变量 */
    --primary-color: #3d8bff;
    --primary-hover: #5a9bff;
    --bg-color: #121212;
    --section-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --text-muted: #aaaaaa;
    --border-color: #333333;
    --card-bg: #242424;
    --header-bg: rgba(18, 18, 18, 0.9);
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

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

/* 顶部导航 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    height: 70px;
    transition: all 0.3s;
}

.header--scrolled {
    height: 60px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.header__logo img {
    height: 40px;
    transition: height 0.3s;
}

.header--scrolled .header__logo img {
    height: 32px;
}

.header__nav {
    display: flex;
    gap: 30px;
    height: 100%;
    margin-left: auto;
    margin-right: 20px;
}

/* 统一操作区 */
.header__controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header__mobile-btn {
    display: none;
}

.header__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border-radius: 50%;
    overflow: hidden;
    color: var(--text-color);
    font-size: 24px;
    transition: all 0.3s;
    background-color: var(--border-color);
}

.header__mobile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    overflow: hidden;
    color: var(--text-color);
    font-size: 20px;
    transition: all 0.3s;
    background-color: var(--border-color);
}

.header__avatar:hover {
    color: var(--primary-color);
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header__nav-item-wrapper {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.header__nav-item {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.header__nav-item:hover, .header__nav-item.active {
    color: var(--primary-color);
}

.header__submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--bg-color);
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.header__nav-item-wrapper:hover .header__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.header__submenu-item {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.header__submenu-item:hover {
    background-color: var(--border-color);
    color: var(--primary-color);
}

/* 底部友情链接 */
.footer__friendly-links {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
}

.footer__friendly-title {
    color: var(--text-muted);
    margin-right: 10px;
}

.footer__friendly-link {
    color: var(--text-muted);
    text-decoration: none;
    margin-right: 15px;
    transition: color 0.3s;
}

.footer__friendly-link:hover {
    color: var(--primary-color);
}

.btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn--primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn--primary:hover {
    background-color: var(--primary-hover);
}

.btn--outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn--outline:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Hero 区域 */
.hero {
    padding-top: 150px;
    padding-bottom: 100px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--section-bg) 100%);
    text-align: center;
}

.hero__title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-color);
}

.hero__subtitle {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 功能卡片 */
.features {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    padding: 40px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.feature-card__icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.feature-card__desc {
    color: var(--text-muted);
    font-size: 15px;
}

/* 客户案例/数据展示 */
.stats {
    padding: 80px 0;
    background-color: var(--section-bg);
    text-align: center;
}

.stats__grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 40px;
}

.stat-item__value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-item__label {
    font-size: 16px;
    color: var(--text-muted);
}

/* 页脚 */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 30px;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer__logo img {
    height: 40px;
    margin-bottom: 20px;
}

.footer__desc {
    color: #aaaaaa;
    font-size: 14px;
}

.footer__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer__link {
    display: block;
    color: #aaaaaa;
    margin-bottom: 10px;
    font-size: 14px;
}

.footer__link:hover {
    color: #ffffff;
}

.footer__bottom {
    border-top: 1px solid #333333;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #888888;
}

.footer__social {
    display: flex;
    gap: 15px;
}

.footer__social-icon {
    font-size: 20px;
    color: #888888;
}

.footer__social-icon:hover {
    color: #ffffff;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header__inner {
        height: 60px;
    }

    .header__nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        z-index: 1001;
    }

    .header__nav.active {
        display: flex;
    }

    .header__controls {
        gap: 15px;
    }

    .hero__title {
        font-size: 32px;
    }

    .hero__subtitle {
        font-size: 16px;
    }

    .features__grid {
        grid-template-columns: 1fr;
    }

    .stats__grid {
        grid-template-columns: 1fr 1fr;
    }

    .header__mobile-btn {
        display: block;
        background: none;
        border: none;
        font-size: 24px;
        color: var(--text-color);
        cursor: pointer;
    }

    .footer__grid {
        grid-template-columns: 1fr;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

.header__mobile-btn {
    display: none;
}
