/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #0a0a14;
    overflow-x: hidden;
}

#header-component, .logo-container {
    overflow-x: hidden;
  }

/* 导入 Racing Sans One 字体 */
@import url('https://fonts.googleapis.com/css2?family=Racing+Sans+One&display=swap');

/* ====== 头部组件样式 - 整合后的科技风格 ====== */
#header-component {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

/* 头部样式 */
header {
    background-color: rgba(10, 10, 20, 0.8);
    color: #00f3ff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    position: relative;
    min-height: 60px;
}

/* Logo 容器样式 */
.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    padding: 0.5rem;
    margin: 0 auto;
    height: 100%;
}

.logo-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.3) 0%, transparent 70%);
    filter: blur(10px);
    z-index: -1;
}

.site-title {
    font-family: 'Orbitron', sans-serif;
    color: #00f3ff;
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.5), 0 0 15px rgba(0, 243, 255, 0.3);
    position: relative;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
}

.subtitle {
    font-family: 'Orbitron', sans-serif;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-left: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 速度线效果 */
.site-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 150%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 243, 255, 0.2) 45%,
        rgba(0, 243, 255, 0.7) 50%,
        rgba(0, 243, 255, 0.2) 55%,
        transparent 100%
    );
    animation: speedLines 2s infinite;
    transform: skewX(-20deg);
    pointer-events: none;
    z-index: 1;
    will-change: transform;
    backface-visibility: hidden;
}

/* 底边装饰线 */
.site-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        90deg,
        #00f3ff,
        #0095ff,
        #00f3ff
    );
    animation: racingStripe 2s linear infinite;
    box-shadow: 0 0 8px rgba(0, 243, 255, 0.7);
    will-change: transform;
    backface-visibility: hidden;
}

/* 导航菜单样式 */
nav {
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

nav li {
    position: relative;
    width: auto;
}

nav a {
    font-family: 'Digital-7', 'DS-Digital', monospace;
    color: #00f3ff;
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.6);
    font-size: 1.2rem;
    letter-spacing: 2px;
    background: rgba(10, 10, 20, 0.7);
    border: 1px solid rgba(0, 243, 255, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    display: inline-block;
    text-transform: uppercase;
}

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

nav a:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: rgba(0, 243, 255, 0.8);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.5);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.9);
    transform: translateY(-3px);
}

nav a:hover:before {
    left: 100%;
}

nav a.active {
    background: rgba(0, 243, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.7) inset;
    border-color: rgba(0, 243, 255, 1);
}

nav li::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #00f3ff;
    box-shadow: 0 0 8px rgba(0, 243, 255, 0.7);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav li:hover::after {
    width: 80%;
}

/* 动画关键帧 */
@keyframes speedLines {
    0% {
        left: -50%;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

@keyframes racingStripe {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100px 0;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
}

/* 移动端菜单样式 */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 1rem;
        min-height: 50px;
    }


    #header-component
    {
        overflow-x: visible
    }

    .logo-container {
        padding: 0.25rem;
        max-width: 80%;
        margin: 0 auto;
        position: relative;
        overflow: hidden;
    }

    .site-title::before {
        max-width: 100%; /* 确保不超出容器 */
        left: -40%;
        animation: speedLines 1.5s infinite;
        opacity: 0.8;
    }

    .site-title::after {
        width: 100%;
        animation: racingStripe 2s linear infinite;
    }

    /* 优化移动端动画关键帧 */
    @keyframes speedLines {
        0% {
            left: 0%;
            opacity: 0;
        }
        20% {
            opacity: 0.4;
        }
        80% {
            opacity: 0.4;
        }
        100% {
            left: 60%;
            opacity: 0;
        }
    }
    
    @keyframes racingStripe {
        0% {
            background-position: 0 0;
        }
        100% {
            background-position: 40px 0;
        }
    }

    /* 汉堡菜单按钮 */
    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        cursor: pointer;
        z-index: 9999;
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        padding: 0;
        margin: 0;
    }

    .hamburger-menu span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #00f3ff;
        border-radius: 2px;
        transition: all 0.3s ease;
        box-shadow: 0 0 5px rgba(0, 243, 255, 0.7);
        margin: 0;
        padding: 0;
    }

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

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

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

    /* 导航菜单样式 */
    nav {
        position: fixed;
        top: 0;
        right: -250px;
        width: 250px;
        height: 100vh;
        background-color: rgba(10, 10, 20, 0.95);
        backdrop-filter: blur(10px);
        transition: right 0.4s ease-in-out;
        z-index: 9500;
        padding: 80px 20px 20px;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        border-left: 1px solid rgba(0, 243, 255, 0.2);
        overflow-y: auto;
        display: none;
    }

    nav.active {
        right: 0;
        display: block;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    nav li {
        width: 100%;
    }

    nav a {
        width: 100%;
        font-size: 1rem;
        padding: 0.8rem 1rem;
        text-align: left;
        display: flex;
        align-items: center;
    }

    /* 导航图标 */
    nav a::before {
        content: '>';
        margin-right: 10px;
        font-family: monospace;
        color: #00f3ff;
        display: inline-block;
    }

    nav li::after {
        display: none;
    }

    /* 页面遮罩 */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 9300;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .menu-overlay.active {
        display: block;
        opacity: 1;
    }

    .speed-lines-container, .glow, .track-effect {
        width: 100vw; /* 而不是100%+额外像素 */
        max-width: 100vw;
      }

      .audio-controls, .go-top-btn {
        position: fixed;
        right:20px;
    }
}

/* 响应式样式 - 移动设备适配 */
@media (max-width: 576px) {
    .logo-container {
        padding: 0.25rem;
        max-width: 80%;
        overflow: hidden;
        position: relative;
    }
    
    .site-title {
        font-size: 1.2rem;
        letter-spacing: 0px;
        padding: 0.15rem 0.3rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .site-title::before {
        max-width: 100%; /* 确保不超出容器 */
        left: -40%;
        animation: speedLines 1s infinite; /* 恢复动画并放慢速度 */
        opacity: 1;      
    }
    
    .site-title::after {
        height: 1px;
        bottom: -1px;
        animation: racingStripe 3s linear infinite; /* 恢复动画并放慢速度 */
        background: linear-gradient(90deg, #00f3ff, #0095ff, #00f3ff);
    }
    
    /* 添加移动设备特有的光标效果 */
    .logo-glow {
        animation: pulseMobile 2s infinite;
    }
    
    @keyframes pulseMobile {
        0% {
            opacity: 0.3;
            filter: blur(8px);
        }
        50% {
            opacity: 0.7;
            filter: blur(12px);
        }
        100% {
            opacity: 0.3;
            filter: blur(8px);
        }
    }
    
    .subtitle {
        font-size: 0.8rem;
    }

    /* 添加移动端专用的动画效果 */
    @keyframes speedLines {
        0% {
            left: -70%;
            opacity: 0;
        }
        20% {
            opacity: 0.4;
        }
        80% {
            opacity: 0.4;
        }
        100% {
            left: 80%;
            opacity: 0;
        }
    }
    
    @keyframes racingStripe {
        0% {
            background-position: 0 0;
        }
        100% {
            background-position: 50px 0;
        }
    }

    /* 汉堡菜单按钮 */
    .hamburger-menu {
        width: 20px;
        height: 16px;
        right: 15px;
    }
    
    .hamburger-menu span {
        height: 2px;
    }
    
    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    body {
        margin-bottom: 130px; /* 为footer和mobile-controls-container留出足够空间 */
    }
}

@media (max-width: 480px) {
    .logo-container {
        max-width: 70%;
        position: relative;
        overflow: hidden;
    }
    
    .site-title {
        font-size: 1rem;
        padding: 0.1rem 0.2rem;
    }
    
    /* 确保动画在小屏幕上也有效果 */
    .site-title::before {
        opacity: 0.8;
        width: 90%;
        left: -60%;
    }
    
    /* 增强光晕效果 */
    .logo-glow {
        opacity: 0.6;
    }
    
    header {
        padding: 0.7rem 1rem;
    }
}

/* 页脚样式 */
footer {
    background-color: rgba(10, 10, 20, 0.8);
    color: #00f3ff;
    text-align: center;
    padding: 1rem;
    width: 100%;
    border-top: 1px solid rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
    backdrop-filter: blur(10px);
    font-family: 'Eurostile', monospace;
    display: block;
    position: relative;
    z-index: 900;
}

/* 回到顶部按钮 */
.go-top-btn {
    position: fixed;
    bottom: 85px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(10, 10, 20, 0.8);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00f3ff;
    text-decoration: none;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 2px solid rgba(0, 243, 255, 0.6);
    z-index: 999;
    transform: translateY(20px);
    font-family: 'Digital-7', 'DS-Digital', monospace;
}

.go-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.go-top-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(0, 243, 255, 0.7);
    border-color: #00f3ff;
    background: rgba(0, 243, 255, 0.2);
}

.go-top-btn::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    z-index: -1;
    opacity: 0;
    background: rgba(0, 243, 255, 0.1);
    transition: opacity 0.3s ease;
}

.go-top-btn:hover::before {
    opacity: 1;
    animation: pulse 2s infinite;
}
   
.go-top-btn svg {
    filter: drop-shadow(0 0 5px rgba(0, 243, 255, 0.8));
}

/* 简化速度线条 */
.speed-lines-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    transform: translateZ(0);
    opacity: 0.3;
    
}



.speed-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(255, 30, 0, 0.3), transparent);
    height: 1px;
    width: 100%;
    animation: speedLine 3s linear infinite;
    opacity: 0;
}

@keyframes speedLine {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 移动设备控制组合优化 */
@media (max-width: 576px) {
    .mobile-controls-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999;
        padding: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: rgba(5, 5, 15, 0.6);
        backdrop-filter: blur(5px);
        border-top: 1px solid rgba(0, 243, 255, 0.3);
        height: 60px;
        box-sizing: border-box;
    }
    
    /* 在非移动视图下隐藏移动控制容器 
    .mobile-controls-container:not(.mobile-view) {
        display: none;
    }
    */
    /* 在桌面版中保持原来的定位 */
    @media (min-width: 577px) {
       
        
        .mobile-controls-container {
            background: transparent;
            border: none;
            padding: 0;
        }
    }
    
    .audio-controls {
        position: static;
        flex-direction: row;
       
    }   
    
    .music-btn {
        width: 40px;
        height: 40px;
        margin: 0;
    }
    
    .go-top-btn {       
        width: 40px;
        height: 40px;
        margin: 0;
    }
    
    .go-top-btn.visible {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    
    .music-notification {
        bottom: 70px;
        left: 10px;
        right: 10px;
        max-width: none;
        width: auto;
        text-align: center;
    }

    /* 为底部控制留出空间 */
    footer {
        margin-bottom: 70px;
    }
}
