:root {
    --primary-dark: #0a192f; /* 深蓝主色 */
    --primary-blue: #1e3a8a; /* 中蓝 */
    --accent-blue: #2b6cb0; /* 强调蓝 */
    --text-light: #f0f6ff; /* 亮色文字 */
    --text-dark: #2d3748; /* 深色文字 */
    --footer-bg: #000000; /* 页脚黑色背景 */
    --footer-text: #e2e8f0; /* 页脚文字浅灰 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    margin: 0;
    padding: 0;
}
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
   
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

/* ===== 导航栏样式 ===== */
.navbar {
    background: var(--primary-dark);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
/* 导航链接默认样式 */
.nav-link {
    transition: color 0.3s, border-bottom 0.3s;
    padding-bottom: 0.25rem;
}

    /* 鼠标悬停：改变文字颜色 */
    .nav-link:hover {
        color: #DC3545 !important; /* Bootstrap 主题蓝色，可自定义 */
    }

    /* 当前激活项：底部横线 + 文字颜色 */
    .nav-link.active {
        color: #0a192f !important;
        border-bottom: 2px solid #0d6efd;
    }
.logo a {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-menu ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

    .nav-menu a:hover {
        color: var(--accent-blue);
    }

.nav-user {
    display: flex;
    gap: 1rem;
}

.btn-login, .btn-register {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
}

    .btn-login:hover {
        background: var(--accent-blue);
    }

.btn-register {
    background: var(--accent-blue);
}

    .btn-register:hover {
        background: var(--primary-blue);
    }

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.4s;
}

/* ===== 首页Hero区样式 ===== */

.hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: auto;
    display: flex;
    align-items: center;
   
    padding: 4rem 0;
}

.hero-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 2rem;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-text {
    flex: 1;
}

    .hero-text h1 {
        font-size: 3.5rem;
        color: var(--primary-dark);
        margin-bottom: 1.5rem;
    }

    .hero-text p {
        font-size: 1.2rem;
        color: #4a5568;
        margin-bottom: 2rem;
    }

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 1.8rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

    .btn-primary:hover {
        background: var(--accent-blue);
    }

.btn-secondary {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

    .btn-secondary:hover {
        background: var(--primary-blue);
        color: white;
    }

.hero-image {
    flex: 1;
}

    .hero-image img {
        width: 100%;
        max-width: 100%;
    }

/* ===== 页脚样式 ===== */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 4rem 0 2rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p, .footer-section li {
    color: var(--footer-text);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.3s;
}

    .footer-section a:hover {
        color: var(--accent-blue);
    }

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

    .social-links a {
        color: white;
        font-size: 1.5rem;
    }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    font-size: 0.9rem;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--primary-dark);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
    }

        .nav-menu.active {
            left: 0;
        }

        .nav-menu ul {
            flex-direction: column;
            padding: 2rem 0;
        }

    .hamburger {
        display: flex;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }
}
