: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;
    }
}

/* new */
.hero-section {
    position: relative;
    min-height: 220px;
    display: flex;
    align-items: flex-start;
    padding: 28px 0
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.hero-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(to top,var(--color-bg) 0%,rgba(15,15,26,.7) 50%,rgba(15,15,26,.5) 100%)
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    font-size: .9rem;
    margin-bottom: 16px;
    transition: color .2s;
    text-decoration: none
}

.back-link:hover {
    color: var(--color-accent)
}

.game-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0,0,0,.5)
}

.game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 16px
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .95rem;
    color: #ffffffd9
}

.meta-label {
    color: var(--color-text-muted);
    font-size: .85rem
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.tag {
    padding: 6px 14px;
    background: #ffffff26;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    font-size: .85rem;
    color: #fff
}

.main-content {
    padding: 48px 0
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 48px
}

.detail-left {
    display: flex;
    flex-direction: column;
    gap: 40px
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px
}

.cover-carousel {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 16px
}

.carousel-track {
    display: flex;
    transition: transform .4s ease
}

.carousel-slide {
    flex: 0 0 100%
}

.carousel-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block
}

.carousel-nav {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translate(-50%);
    display: flex;
    align-items: center;
    gap: 8px
}

.carousel-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #00000080;
    color: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s
}

.carousel-btn:hover {
    background: #000000bf
}

.carousel-dots {
    display: flex;
    gap: 6px
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff80;
    border: none;
    cursor: pointer;
    transition: background .2s
}

.carousel-dot.active {
    background: #fff
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 12px
}

.screenshot-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s
}

.screenshot-item:hover {
    transform: scale(1.02)
}

.screenshot-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover
}

.description-content {
    background: var(--color-card);
    border-radius: var(--radius-md);
    padding: 24px;
    line-height: 1.8;
    color: var(--color-text-muted)
}

.info-table {
    background: var(--color-card);
    border-radius: var(--radius-md);
    overflow: hidden
}

.info-row {
    display: flex;
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-border)
}

.info-row:last-child {
    border-bottom: none
}

.info-label {
    width: 100px;
    color: var(--color-text-muted);
    font-size: .9rem
}

.info-value {
    flex: 1;
    color: var(--color-text);
    font-size: .9rem
}

.download-card {
    position: sticky;
    top: 100px;
    background: var(--color-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--color-border)
}

.download-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px
}

.download-list {
    display: flex;
    flex-direction: column;
    gap: 16px
}

.download-item {
    background: var(--color-primary);
    border-radius: var(--radius-md);
    padding: 16px
}

.download-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px
}

.download-icon {
    width: 2rem;
    height: 2rem;
    padding: .2rem;
    border-radius: .5rem;
    background-color: #fff
}

.download-name {
    font-weight: 600;
    color: var(--color-text)
}

.download-code {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    margin-bottom: 12px
}

.code-label {
    font-size: .8rem;
    color: var(--color-text-muted)
}

.code-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 2px
}

.copy-btn {
    margin-left: auto;
    padding: 6px 12px;
    background: var(--color-accent);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: .8rem;
    font-weight: 500;
    transition: background .2s
}

.copy-btn:hover {
    background: var(--color-accent-hover)
}

.download-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg,var(--color-accent) 0%,#ff6b8a 100%);
    border-radius: var(--radius-sm);
    color: #fff;
    font-weight: 600;
    transition: all .2s;
    text-decoration: none
}

.download-link:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-glow)
}

.download-link .arrow {
    transition: transform .2s
}

.download-link:hover .arrow {
    transform: translate(4px)
}

.download-tip {
    margin-top: 16px;
    font-size: .85rem;
    color: var(--color-text-muted);
    line-height: 1.5
}

.related-section {
    padding: 48px 0;
    background: var(--color-primary);
    border-top: 1px solid var(--color-border)
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 20px
}

.related-card {
    background: var(--color-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: all .3s;
    text-decoration: none
}

.related-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent)
}

.related-cover {
    aspect-ratio: 16/9;
    overflow: hidden
}

.related-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s
}

.related-card:hover .related-cover img {
    transform: scale(1.05)
}

.related-info {
    padding: 12px
}

.related-info h4 {
    font-size: .95rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px
}

.related-tags {
    font-size: .8rem;
    color: var(--color-text-muted)
}

.lightbox {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    background: #000000f2;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn-de133357 .2s ease
}

@keyframes fadeIn-de133357 {
    0% {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-card);
    border-radius: 50%;
    color: #fff;
    font-size: 2rem;
    transition: background .2s
}

.lightbox-close:hover {
    background: var(--color-accent)
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius-md)
}

.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
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns:1fr
    }

    .download-card {
        position: static
    }

    .related-grid {
        grid-template-columns: repeat(2,1fr)
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height:160px;
        padding: 12px 0
    }

    .game-title {
        font-size: 1.75rem
    }

    .game-meta {
        flex-direction: column;
        gap: 8px
    }

    .main-content {
        padding: 32px 0
    }

    .content-grid {
        gap: 32px
    }

    .screenshots-grid,.related-grid {
        grid-template-columns: 1fr
    }
}