* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* 导航栏样式 */
.navbar {
    background: #2c3e50;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 0;
    letter-spacing: 1px;
}

.logo img {
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover img {
    transform: scale(1.08);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.nav-link:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #fff;
    transform: translateY(-2px);
}

.nav-link.active {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.12);
}

.nav-link.has-dropdown {
    padding: 14px 24px 14px 20px;
}

.nav-link.has-dropdown::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    border-radius: 3px;
    opacity: 0;
    transition: all 0.3s ease;
}

.nav-item:hover .nav-link.has-dropdown::after {
    opacity: 1;
    width: 30px;
}

.nav-link .arrow {
    font-size: 11px;
    transition: transform 0.3s ease;
    color: rgba(255,255,255,0.6);
}

.nav-item:hover .arrow {
    transform: rotate(180deg);
    color: #3b82f6;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    list-style: none;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    color: #475569;
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 14px;
    font-weight: 500;
}

.dropdown-link:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #f0f5ff 100%);
    color: #1d4ed8;
    padding-left: 26px;
}

.dropdown-link::before {
    content: "";
    width: 6px;
    height: 6px;
    background: #cbd5e1;
    border-radius: 50%;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.dropdown-link:hover::before {
    background: #3b82f6;
    transform: scale(1.3);
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 6px 0;
}

.dropdown-header {
    padding: 10px 22px 6px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-link {
    margin-left: 24px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.admin-link:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.45);
}

/* 汉堡菜单按钮 */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.hamburger:hover {
    background: rgba(255,255,255,0.25);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 移动端导航遮罩 */
.nav-overlay {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
}

/* 主内容区域 */
main {
    flex: 1;
}

/* Footer样式 */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 30px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 20px;
}

.footer-section h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #fff;
}

.footer-section p,
.footer-section a {
    color: #bdc3c7;
    font-size: 14px;
    line-height: 1.8;
    text-decoration: none;
}

.footer-section a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #3d566e;
    font-size: 14px;
    color: #95a5a6;
}

.footer-btn {
    color: #fff !important;
    text-decoration: none;
    padding: 6px 14px;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    margin: 0 4px;
    transition: all 0.3s;
}

.footer-btn:hover {
    background: rgba(255,255,255,0.25) !important;
    color: #fff !important;
}

/* 响应式 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        background: #2c3e50;
        padding: 16px 20px 40px;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

    .nav-menu.mobile-open {
        transform: translateX(0);
    }

    .nav-menu .nav-item {
        width: 100%;
    }

    .nav-menu .nav-link {
        width: 100%;
        padding: 14px 16px;
        font-size: 16px;
        border-radius: 8px;
        justify-content: space-between;
    }

    .nav-menu .nav-link:hover {
        background: rgba(255,255,255,0.12);
    }

    /* 移动端下拉展开 */
    .nav-menu .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(255,255,255,0.08);
        border-radius: 8px;
        margin: 4px 0 8px 16px;
        min-width: auto;
        display: none;
    }

    .nav-item.dropdown-open .dropdown {
        display: block;
    }

    .nav-menu .dropdown-link {
        color: rgba(255,255,255,0.85);
        padding: 10px 20px;
        font-size: 14px;
    }

    .nav-menu .dropdown-link:hover {
        background: rgba(255,255,255,0.1);
        color: #fff;
    }

    .navbar .container {
        justify-content: space-between;
    }

    .logo {
        font-size: 18px;
    }

    .logo img {
        height: 52px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
}
