:root {
    --color-primary: #1a1a2e;
    --color-secondary: #16213e;
    --color-accent: #e94560;
    --color-accent-hover: #ff6b6b;
    --color-text: #eaeaea;
    --color-text-muted: #a0a0b0;
    --color-bg: #0f0f1a;
    --color-card: #1f1f3a;
    --color-border: #2d2d5a;
    --color-success: #4ade80;
    --color-warning: #fbbf24;
    --font-sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: "JetBrains Mono", monospace;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, .4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, .5);
    --shadow-glow: 0 0 20px rgba(233, 69, 96, .3)
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth
}

body {
    font-family: var(--font-sans), sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    /* -webkit-font-smoothing:antialiased; */
    -moz-osx-font-smoothing: grayscale
}

a {
    color: inherit;
    text-decoration: none
}

img {
    max-width: 100%;
    height: auto;
    display: block
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none
}

.layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg,#0f0f1afa,#0f0f1af2);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    min-height: 64px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px
}

@media (min-width: 768px) {
    .container {
        padding:0 24px
    }
}

@media (min-width: 1024px) {
    .container {
        padding:0 48px
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    transition: opacity .2s;
    text-decoration: none
}

.logo:hover {
    opacity: .8
}

.logo-icon {
    font-size: 1.75rem
}

.logo-text {
    background: linear-gradient(135deg,var(--color-accent) 0%,#ff8a8a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

@media (max-width: 768px) {
    .header {
        min-height:auto;
        height: auto
    }

    .header-inner {
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
        padding: 8px 0 12px
    }

    .logo {
        font-size: 1.25rem;
        order: 1;
        /*flex: 1*/
    }

    .logo-icon {
        font-size: 1.5rem
    }

    .main {
        padding: 20px 0
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding:6px 0 10px
    }
}

.main {
    flex: 1;
    padding: 0
}

.footer {
    background: var(--color-primary);
    border-top: 1px solid var(--color-border);
    padding: 24px 0;
    text-align: center;
    color: var(--color-text-muted);
    font-size: .875rem
}

.home {
    min-height: 100vh;
    background: #0f0f1a
}

.category-nav {
    position: sticky;
    top: 60px;
    z-index: 100;
    background: #0f0f1af2;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 16px 0;
    border-bottom: 1px solid rgba(233,69,96,.2)
}

.category-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px
}

.category-scroll::-webkit-scrollbar {
    height: 4px
}

.category-scroll::-webkit-scrollbar-thumb {
    background: #e94560;
    border-radius: 2px
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #ffffff0d;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 25px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all .3s ease;
    white-space: nowrap;
    text-decoration: none
}

.category-btn:hover,.category-btn.active {
    background: #e94560;
    border-color: #e94560
}

.game-list {
    padding: 20px 0
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff
}

.game-count {
    color: #fff9;
    font-size: 14px
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding: 20px 0
}

.page-btn {
    padding: 10px 24px;
    background: #ffffff1a;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all .3s ease;
    text-decoration: none;
    display: inline-block
}

.page-btn:hover:not(:disabled) {
    background: #e94560;
    border-color: #e94560
}

.page-btn:disabled {
    opacity: .5;
    cursor: not-allowed
}

.page-info {
    color: #ffffffb3;
    font-size: 14px
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 16px
}

.category-nav {
    position: sticky;
    top: 60px;
    z-index: 100;
    background: #0f0f1af2;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 16px 0;
    border-bottom: 1px solid rgba(233,69,96,.2)
}

@media (max-width: 768px) {
    .category-nav {
        position:sticky;
        top: 96px;
        z-index: 100;
        background: #0f0f1af2;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        padding: 16px 0;
        border-bottom: 1px solid rgba(233,69,96,.2)
    }
}

@media (min-width: 640px) {
    .games-grid {
        grid-template-columns:repeat(2,1fr);
        gap: 24px
    }
}

@media (min-width: 1024px) {
    .games-grid {
        grid-template-columns:repeat(3,1fr)
    }
}

@media (min-width: 1280px) {
    .games-grid {
        grid-template-columns:repeat(4,1fr)
    }
}

.game-card {
    display: block;
    background: #ffffff08;
    border-radius: 12px;
    overflow: hidden;
    transition: all .3s ease;
    text-decoration: none
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px #e9456033
}

.card-cover {
    position: relative;
    aspect-ratio: 4/2;
    overflow: hidden
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease
}

.game-card:hover .card-cover img {
    transform: scale(1.05)
}

.card-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    /*background: linear-gradient(to top,rgba(0,0,0,.8),transparent);*/
    display: flex;
    /*align-items: flex-end;*/
    /*justify-content: center;*/
    justify-content: flex-end; /* 将子元素推到右边缘 */
    align-items: flex-start; /* 将子元素推到顶部 */
    padding: 5px;
    opacity: 1;
    transition: opacity .3s ease
}

/*.game-card:hover .card-overlay {*/
/*    opacity: 1*/
/*}*/

.view-btn {
    padding: 5px 10px;
    background: #2c70c3;
    color: #fff;
    border-radius: 7px;
    font-size: 14px
}

@media (max-width: 768px) {

    .view-btn {
        padding: 2px 5px;
        font-size: 12px
    }

}

.card-info {
    padding: .5rem
}

.card-title {
    font-size: .9rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px
}

.tag {
    padding: 4px 10px;
    background: #e9456033;
    color: #e94560;
    border-radius: 12px;
    font-size: 12px
}

.nav {
    display: flex;
    gap: 24px
}

.nav-link {
    color: var(--color-text-muted);
    font-weight: 500;
    transition: color .2s;
    position: relative;
    text-decoration: none
}

.nav-link:hover,.nav-link.router-link-active {
    color: var(--color-accent)
}

.nav-link.router-link-active:after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-accent);
    border-radius: 1px
}
/* 汉堡菜单按钮 */
.hamburger{
    display: none;
    flex-direction: column;
    cursor: pointer;
}
.hamburger span{
    width: 24px;
    height: 3px;
    background: #b6bacf;
    margin: 3px 0;
    border-radius: 2px;

}
@media (max-width: 768px){
    .hamburger{
        display: flex;
        order: 2;
        margin-right: 1rem;
    }
    .hamburger.active span:nth-child(1){
        transform: rotate(45deg) translate(5px, 8px);
    }
    .hamburger.active span:nth-child(2){
        opacity: 0;
    }
    .hamburger.active span:nth-child(3){
        transform: rotate(-45deg) translate(5px, -8px);
    }
}

.category-search {
    display: flex;
    justify-content: center;
    position: sticky;
    top: 60px;
    z-index: 99;
    background: linear-gradient(180deg, #0f0f1afa, #0f0f1af2);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    min-height: 60px;
    align-items: center;
}
@media (max-width: 768px) {
    .category-search {
        height: auto;
        min-height: 60px;
        display: flex;
        justify-content: center;
        position: sticky;
        top: 56px;
        z-index: 99;
    }
}

.search-container {
    flex: 1;
    max-width: 400px;
    margin: 0 24px
}

.search-box {
    display: flex;
    align-items: center;
    background: #ffffff14;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 24px;
    padding: 6px 12px;
    transition: all .3s ease
}

.search-box:hover {
    background: #ffffff1f;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px #e945601a
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--color-text);
    font-size: 14px;
    padding: 6px 12px;
    outline: none;
    font-family: var(--font-sans)
}

.search-input::placeholder {
    color: var(--color-text-muted)
}

.search-input:disabled {
    opacity: .7;
    cursor: not-allowed
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-accent);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all .3s ease;
    padding: 0;
    opacity: .8
}

.search-btn:hover:not(:disabled) {
    background: var(--color-accent-hover);
    transform: scale(1.05);
    opacity: 1
}

.search-btn:disabled {
    opacity: .5;
    cursor: not-allowed
}

.search-icon {
    width: 16px;
    height: 16px;
    color: #fff
}

@media (max-width: 768px) {
    .nav {
        order: 2;
        margin-left: auto;
    }
    .nav{
        display: none;
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 50%;
        background: #fff;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 5rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    .nav.active{
        right: 0;
        display: flex;
    }
}
@media (min-width: 1024px) {

    .nav {
        padding-right: 1rem;
    }
}

.not-found{
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center
}

.not-found h1{
    font-size: 2rem;
    margin-bottom: 12px
}

.not-found p{
    color: var(--color-text-muted);
    margin-bottom: 24px
}

.home-link{
     display: inline-block;
     padding: 12px 24px;
     background: var(--color-accent);
     border-radius: var(--radius-md);
     color: #fff;
     font-weight: 500;
     text-decoration: none
 }