:root {
    --primary: #6c63ff;
    --primary-dark: #4a42d4;
    --bg: #0d0d1a;
    --bg2: #13132a;
    --bg3: #1a1a35;
    --text: #ffffff;
    --text2: #a0a0c0;
    --card-radius: 12px;
    --header-h: 64px;
}

body {
    background: var(--bg);
    color: var(--text);
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

header {
    height: var(--header-h);
    background: var(--bg2);
    border-bottom: 1px solid rgba(108, 99, 255, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 20px;
}

.logo {
    width: 200px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), #ff6584);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.5px;
}

.logo-text span {
    color: var(--primary);
}

nav {
    flex: 1;
    overflow: hidden;
}

nav ul {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 4px 0;
}

nav ul::-webkit-scrollbar {
    display: none;
}

nav ul li a {
    display: block;
    padding: 6px 14px;
    border-radius: 20px;
    color: var(--text2);
    font-size: 13px;
    white-space: nowrap;
    transition: all 0.2s;
}

nav ul li a:hover {
    background: rgba(108, 99, 255, 0.2);
    color: var(--text);
}

/* All Games 跳转按钮 */
nav ul li a.nav-all-btn {
    background: rgba(108, 99, 255, 0.15);
    color: var(--primary);
    border: 1px solid rgba(108, 99, 255, 0.35);
    font-weight: 600;
}

nav ul li a.nav-all-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.searchBtn,
.menuBtn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    color: var(--text2);
    font-size: 18px;
    transition: all 0.2s;
}

.searchBtn:hover,
.menuBtn:hover {
    background: rgba(108, 99, 255, 0.3);
    color: var(--text);
}

.menuBtn {
    display: none;
}

.searchBar {
    width: 350px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg3);
    border: 1px solid rgba(108, 99, 255, 0.25);
    border-radius: 10px;
    padding: 0 6px 0 14px;
    transition: border-color 0.2s;
}

.searchBar:focus-within {
    border-color: rgba(108, 99, 255, 0.7);
}

.searchBar input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 0;
    color: var(--text);
    font-size: 14px;
}

.searchBar input::placeholder {
    color: var(--text2);
}

.searchBar button {
    padding: 6px 14px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    transition: background 0.2s;
}

.searchBar button:hover {
    background: var(--primary-dark);
}

.peBtn {
    display: none;
}

@media (max-width: 769px) {
    nav {
        display: none;
        height: 100vh;
    }

    .head-top {
        display: flex;
        width: 100%;
        justify-content: space-between;
    }

    .peBtn {
        display: block;
    }

    .searchBar {
        width: 100%;
    }

    nav ul {
        flex-direction: column;
    }

    nav.active {
        display: block;
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: var(--bg2);
        border-bottom: 1px solid rgba(108, 99, 255, 0.2);
        padding: 12px;
        z-index: 998;
    }

    nav.active ul {
        flex-wrap: wrap;
    }

    .menuBtn {
        display: flex;
    }

    .searchBar {
        display: none;
        position: fixed;
        top: var(--header-h);
        left: 0;
        height: 100vh;
        right: 0;
        border-radius: 0;
        align-items: start;
        border: none;
        border-bottom: 1px solid rgba(108, 99, 255, 0.2);
        background: var(--bg2);
        padding: 10px 16px;
        z-index: 997;
    }

    .searchBar.active {
        display: flex;
    }
}