﻿/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    background: #f5f7fa;
    color: #2c3e50;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    padding: 0 16px;
    margin: 0 auto;
    max-width: 1200px;
}

/* ==================== 统一头部导航样式 ==================== */
header {
    background: #1a4b6d;
    color: white;
    padding: 8px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
    min-width: 0; /* 防止flex溢出 */
}

.logo {
    flex-shrink: 0;
    min-width: fit-content;
}

    .logo h1 {
        font-size: clamp(1rem, 4vw, 1.5rem); /* 响应式字体 */
        font-weight: 600;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .logo span {
        color: #f9c74f;
        font-size: clamp(0.6rem, 2vw, 0.8rem);
        font-weight: normal;
        white-space: nowrap;
    }

/* 导航菜单容器 - 允许横向滚动 */
nav {
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin: 0;
    padding: 0;
    min-width: 0; /* 防止flex溢出 */
}

    nav::-webkit-scrollbar {
        display: none;
    }

    nav ul {
        display: flex;
        gap: 4px;
        list-style: none;
        margin: 0;
        padding: 2px 0;
        flex-wrap: nowrap;
        justify-content: flex-end;
        min-width: min-content; /* 保证内容不压缩 */
    }

        nav ul li {
            flex-shrink: 0;
        }

            nav ul li a {
                color: white;
                text-decoration: none;
                font-weight: 500;
                padding: 6px 10px;
                border-radius: 30px;
                background: rgba(255,255,255,0.1);
                transition: all 0.2s;
                display: flex;
                align-items: center;
                gap: 4px;
                font-size: clamp(0.75rem, 3vw, 0.95rem);
                white-space: nowrap;
                line-height: 1.2;
            }

                nav ul li a i {
                    font-size: clamp(0.8rem, 3vw, 1rem);
                    width: 16px;
                    text-align: center;
                }

                nav ul li a:hover,
                nav ul li a.active {
                    background: #f9c74f;
                    color: #1a4b6d;
                }

/* 响应式断点优化 */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.2rem;
    }

    .logo span {
        font-size: 0.7rem;
    }

    nav ul li a {
        padding: 6px 8px;
        font-size: 0.85rem;
    }

        nav ul li a i {
            font-size: 0.9rem;
        }
}

@media (max-width: 360px) {
    .logo h1 {
        font-size: 1rem;
    }

    .logo span {
        display: none;
    }

    nav ul li a span {
        display: none;
    }

    nav ul li a i {
        font-size: 1.1rem;
        width: auto;
        margin: 0;
    }

    nav ul li a {
        padding: 8px 12px;
    }
}

/* 极小屏幕下确保菜单可滚动 */
@media (max-width: 320px) {
    .header-content {
        gap: 4px;
    }

    nav ul {
        gap: 2px;
    }

        nav ul li a {
            padding: 6px 8px;
        }
}

/* ==================== 主要内容区域 ==================== */
main {
    flex: 1;
    padding: 30px 0;
}

/* ==================== 页脚 ==================== */
footer {
    background: #1a4b6d;
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: auto;
}

    footer p {
        font-size: 0.9rem;
        opacity: 0.9;
    }

/* ==================== 通用卡片样式 ==================== */
.card {
    background: white;
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #1a4b6d;
    border-left: 6px solid #f9c74f;
    padding-left: 18px;
}

/* ==================== 按钮样式 ==================== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #1a4b6d;
    color: white;
}

    .btn-primary:hover {
        background: #0d2e44;
    }

.btn-warning {
    background: #f9c74f;
    color: #1a4b6d;
}

    .btn-warning:hover {
        background: #f7b731;
    }

/* ==================== 表单样式 ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    color: #1a4b6d;
    margin-bottom: 8px;
    display: block;
}

.form-control {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid #e9ecef;
    border-radius: 40px;
    font-size: 1rem;
    transition: 0.2s;
}

    .form-control:focus {
        outline: none;
        border-color: #f9c74f;
        box-shadow: 0 0 0 4px rgba(249,199,79,0.15);
    }
