/**
 * 头部组件样式
 * @author Huameitang
 * 这个文件定义了网站头部导航栏的所有样式
 * 包括logo设计、导航链接、响应式布局等
 * 采用模块化设计，便于独立维护和复用
 */

/* 头部样式 */
header {
    padding: 30px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid rgba(100, 100, 200, 0.3);
    background: rgba(10, 8, 20, 0.6);
    backdrop-filter: blur(5px);
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: #9a7fcc;
    letter-spacing: -1px;
    position: relative;
    text-shadow: 0 0 10px rgba(154, 127, 204, 0.3);
    animation: logo-glitch 12s infinite;
    font-family: 'Orbitron', sans-serif;
}

.logo .ember-text {
    color: #EF4444;
    font-family: 'Exo 2', sans-serif;
    font-weight: 300;
}

@keyframes logo-glitch {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(154, 127, 204, 0.3);
    }

    2% {
        text-shadow: -5px 0 5px rgba(255, 0, 0, 0.5), 5px 0 5px rgba(0, 255, 255, 0.5);
    }

    3% {
        text-shadow: none;
    }
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #b8b8d6;
    text-decoration: none;
    font-size: 1.2rem;
    position: relative;
    padding: 5px 0;
    transition: all 0.3s;
    font-weight: 300;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #9a7fcc;
    transition: width 0.4s;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: #d0b0ff;
}

.nav-links a.temp-disabled {
    pointer-events: none;
    user-select: none;
    cursor: default;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(184, 184, 214, 0.8);
}

/* 特殊链接样式 */
.nav-links .special-link {
    position: relative;
    padding: 8px 15px;
    background: linear-gradient(45deg, #9a7fcc, #EF4444);
    border-radius: 4px;
    color: #fff;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.nav-links .special-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(154, 127, 204, 0.4);
}

.nav-links .special-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: 0.5s;
}

.nav-links .special-link:hover::before {
    left: 100%;
}

/* 汉堡菜单样式 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 4px 0;
    transition: 0.4s;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100px;
        /* 调整为header高度 */
        left: 0;
        background: rgba(10, 8, 20, 0.9);
        backdrop-filter: blur(10px);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        text-align: center;
        padding: 15px 0;
        width: 100%;
    }

    .menu-toggle {
        display: flex;
    }
}

/* 添加闪光动画效果 */
@keyframes glow {

    0%,
    100% {
        filter: drop-shadow(0 0 2px rgba(154, 127, 204, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 8px rgba(154, 127, 204, 0.8));
    }
}

.nav-links .special-link {
    animation: glow 3s infinite;
}