/* ========================================
   组件样式 - 导航栏与页脚
   从 components/navbar.html 和 footer.html 提取
   供所有页面内联导航栏/页脚时使用
   ======================================== */

/* 导航栏基础样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(230, 57, 70, 0.2);
}

.logo {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    letter-spacing: 1px;
}

.logo span {
    background: linear-gradient(45deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin: 0 10px;
    position: relative;
}

.nav-links > li > a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.dropdown-menu a {
    color: var(--text-gray);
    font-size: 13px;
    font-weight: 400;
    padding-left: 15px;
    position: relative;
}

.dropdown-menu a:before {
    content: '•';
    color: var(--accent);
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8px;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover:after {
    width: 100%;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 10px 0;
    margin: 0;
    list-style: none;
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-open .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.nav-links li:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu li {
    width: 100%;
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 8px 10px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s;
    font-size: 13px;
}

.dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    padding-left: 18px;
}

.menu-toggle {
    display: none;
    font-size: 32px;
    color: var(--text-light);
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
    background: rgba(230, 57, 70, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
}

.menu-toggle:hover {
    background: rgba(230, 57, 70, 0.2);
    transform: scale(1.1);
}

.menu-toggle:active {
    transform: scale(0.95);
}

/* 页脚基础样式 */
footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.footer-column h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.footer-column p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(3px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-gray);
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background: rgba(10, 10, 20, 0.95);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        transition: 0.5s;
        z-index: 1000;
        padding: 100px 0 20px;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 2px 0;
        width: 100%;
        text-align: left;
    }

    .dropdown-menu {
        position: static !important;
        background-color: rgba(255, 255, 255, 0.03);
        margin-top: 3px;
        width: 90%;
        left: 5%;
        opacity: 1 !important;
        transform: translateY(0) !important;
        transition: all 0.3s ease;
        padding: 5px 0;
        border-left: 2px solid var(--accent);
    }

    .nav-links > li > a {
        font-size: 15px;
        font-weight: 550;
        color: var(--text-gray);
        display: block;
        padding: 10px 15px;
        border-radius: 4px;
        position: relative;
        overflow: hidden;
    }

    .nav-links > li > a:hover {
        color: var(--accent);
        background-color: rgba(255, 255, 255, 0.05);
        padding-left: 20px;
    }

    .dropdown-menu a {
        padding-left: 20px;
        font-size: 16px;
        font-weight: 600;
        color: var(--text-light);
        padding: 6px 15px;
    }

    .dropdown-menu a:before {
        left: 10px;
        font-size: 10px;
    }

    .dropdown-menu a:hover {
        color: var(--accent);
        background-color: rgba(230, 57, 70, 0.1);
    }

    .nav-links.active .dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
    }

    .nav-links li:hover .dropdown-menu {
        display: block !important;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-column {
        width: 100%;
    }
}
