/* ==================== 主页样式 ==================== */

/* ==================== 导航栏样式 ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--content-bg);
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px var(--shadow-color);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo */
.navbar-logo {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform 0.2s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* 导航菜单 */
.navbar-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.menu-item {
    position: relative;
}

.menu-link {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.menu-link:hover {
    background-color: var(--hover-bg);
    color: var(--accent-color);
}

.menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.menu-link:hover::after {
    width: 80%;
}

/* 右侧操作区 */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    position: relative;
}

.action-btn:hover {
    background-color: var(--hover-bg);
    transform: scale(1.1);
}

.theme-icon,
.lang-icon {
    font-size: 1.2rem;
}

/* 用户区域 */
.user-section {
    display: flex;
    align-items: center;
}

.btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background-color: color-mix(in srgb, var(--accent-color) 85%, black);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--accent-color) 30%, transparent);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--hover-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--scrollbar-color);
    transform: translateY(-2px);
}

.btn-large {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

/* 用户头像按钮 */
.user-avatar-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
}

.user-avatar-btn:hover {
    transform: scale(1.1);
}

.user-avatar-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border: 2px solid var(--bg-color);
    border-radius: 50%;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--hover-bg) 0%, var(--content-bg) 100%);
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    font-size: 1.3rem;
    box-shadow: 0 2px 8px var(--shadow-color);
}

/* ==================== Hero 区域 ==================== */
.hero-section {
    padding-top: 140px;
    padding-bottom: 80px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--hover-bg) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, color-mix(in srgb, var(--accent-color) 5%, transparent) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, color-mix(in srgb, var(--accent-color) 5%, transparent) 0%, transparent 50%);
    pointer-events: none;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--muted-text);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Hero 视觉效果 */
.hero-visual {
    position: relative;
    height: 400px;
}

.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
}

.card {
    position: absolute;
    background: var(--content-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 24px var(--shadow-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: floatCard 6s ease-in-out infinite;
}

.card-icon {
    font-size: 2.5rem;
}

.card-text {
    font-weight: 600;
    color: var(--text-color);
}

.card-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 20%;
    right: 15%;
    animation-delay: 1.5s;
}

.card-3 {
    bottom: 25%;
    left: 20%;
    animation-delay: 3s;
}

.card-4 {
    bottom: 15%;
    right: 10%;
    animation-delay: 4.5s;
}

@keyframes floatCard {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(2deg);
    }
    50% {
        transform: translateY(-5px) rotate(-1deg);
    }
    75% {
        transform: translateY(-20px) rotate(1deg);
    }
}

/* ==================== 通用区块样式 ==================== */
section {
    padding: 80px 0;
}

.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--muted-text);
}

/* ==================== 功能特性区域 ==================== */
.features-section {
    background-color: var(--content-bg);
}

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

.feature-card {
    background: var(--bg-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px var(--shadow-color);
    border-color: var(--accent-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--muted-text);
    line-height: 1.6;
}

/* ==================== 对话区域 ==================== */
.chats-section {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--hover-bg) 100%);
}

.chats-preview {
    display: flex;
    justify-content: center;
}

.chat-preview-card {
    background: var(--content-bg);
    border-radius: 20px;
    padding: 3rem;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 8px 32px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.chat-preview-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px var(--shadow-color);
}

.chat-preview-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.chat-preview-icon {
    font-size: 4rem;
}

.chat-preview-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

.chat-preview-description {
    color: var(--muted-text);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* ==================== 文档区域 ==================== */
.docs-section {
    background-color: var(--content-bg);
}

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

.doc-card {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--shadow-color);
    border-color: var(--accent-color);
}

.doc-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.doc-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.doc-description {
    color: var(--muted-text);
    line-height: 1.6;
}

/* ==================== 关于区域 ==================== */
.about-section {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--hover-bg) 100%);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--content-bg);
    border-radius: 16px;
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--shadow-color);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--muted-text);
    font-size: 1rem;
}

/* ==================== 页脚样式 ==================== */
.footer {
    background-color: var(--content-bg);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.footer-section h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--muted-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-copyright {
    color: var(--muted-text);
    font-size: 0.9rem;
}

/* ==================== 语言选择器下拉菜单 ==================== */
.lang-selector-dropdown {
    position: fixed;
    z-index: 1000;
}

.lang-dropdown-menu {
    background: var(--content-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--shadow-color);
    padding: 0.5rem;
    min-width: 180px;
    border: 1px solid var(--border-color);
    position: relative;
}

/* 添加向上箭头 */
.lang-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    width: 12px;
    height: 12px;
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    color: var(--text-color);
}

.lang-dropdown-item:hover {
    background: var(--hover-bg);
}

.lang-dropdown-item.active {
    background: var(--highlight-bg);
    color: var(--accent-color);
}

.lang-dropdown-item .lang-flag {
    font-size: 1.2rem;
}

.lang-dropdown-item .lang-name {
    font-size: 0.95rem;
}

.lang-flag {
    font-size: 1.5rem;
}

.lang-name {
    font-weight: 600;
    color: var(--text-color);
}

/* ==================== 用户下拉菜单 ==================== */
.user-dropdown {
    position: fixed;
    z-index: 1000;
    min-width: 280px;
    box-shadow: 0 8px 24px var(--shadow-color);
}

.user-dropdown-header {
    background: linear-gradient(135deg, var(--hover-bg) 0%, var(--content-bg) 100%);
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar-large {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--hover-bg) 100%);
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    font-size: 1.8rem;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.user-info-text {
    flex: 1;
    overflow: hidden;
}

.user-dropdown-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-email {
    font-size: 0.85rem;
    color: var(--muted-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-menu {
    background: var(--content-bg);
    border-radius: 0 0 12px 12px;
    padding: 0.5rem;
    border-top: none;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    color: var(--text-color);
    font-size: 0.95rem;
}

.user-dropdown-item:hover {
    background: var(--hover-bg);
}

.user-dropdown-logout {
    color: #ef4444;
}

.user-dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.dropdown-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.dropdown-text {
    flex: 1;
    font-weight: 500;
}

.footer-copyright {
    color: var(--muted-text);
    font-size: 0.9rem;
}

/* ==================== 响应式设计（所有@media查询统一放在文件底部）==================== */

/* 大平板和小笔记本 */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        height: 300px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 平板和中等屏幕 */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 1rem;
        height: 60px;
    }

    .navbar-menu {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .section-title {
        font-size: 2rem;
    }

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

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

    .about-stats {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
