* {
    -webkit-tap-highlight-color: transparent;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "微软雅黑",sans-serif
}

body {
    background-color: #f5f5f5;
    padding: 6px
}

.category-tabs {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 12px;
    padding: 10px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center
}

.tab-btn {
    flex: 0 0 calc(33.33% - 7px);
    max-width: calc(33.33% - 7px);
    border: none;
    padding: 7px 0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f5f5f5;
    color: #5a4570
}



.tab-btn:hover:not(.active) {
    transform: scale(1.03);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1)
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 12px;
    padding: 0 2px
}

.page-title {
    color: #333;
    font-size: 18px;
    font-weight: bold
}

.game-search {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 20px;
    padding: 5px 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease
}

.game-search:focus-within {
    box-shadow: 0 3px 8px rgba(0,0,0,0.12)
}

.game-search input {
    border: none;
    outline: none;
    font-size: 13px;
    padding: 3px 0;
    width: 100px;
    background: transparent
}

.game-search input::placeholder {
    color: #aaa;
    font-size: 12px
}

.game-container {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 10px;
    max-width: 1400px;
    margin: 0 auto;
    padding-bottom: 70px
}

.skeleton {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 8px
}

.skeleton-img {
    width: 100%;
    padding-top: 100%;
    background: linear-gradient(90deg,#f0f0f0 25%,#f8f8f8 50%,#f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite
}

.skeleton-text {
    width: 80%;
    height: 12px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-top: 8px;
    animation: skeleton-loading 1.5s infinite
}

.load-status {
    grid-column: 1/-1;
    text-align: center;
    padding: 30px 0;
    color: #666;
    font-size: 14px
}

.load-spin {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #eee;
    border-top-color: #ff7d00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px
}

.retry-btn {
    border: none;
    background: #ff7d00;
    color: #fff;
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.2s ease
}

.retry-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15)
}

.game-card {
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s ease,box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding-bottom: 8px;
    cursor: pointer
}

.game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12)
}

.img-container {
    width: 100%;
    padding-top: 100%;
    position: relative;
    background-color: #f8f8f8
}

.game-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    background-color: #f8f8f8
}

.game-img.error {
    color: #999;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center
}

.game-name-cn {
    font-size: 12px;
    color: #333;
    font-weight: 600;
    text-align: center;
    padding: 4px 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%
}

.no-result {
    grid-column: 1/-1;
    text-align: center;
    padding: 30px 0;
    color: #999;
    font-size: 14px;
    display: none
}

.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 1400px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.08);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #333;
    z-index: 999
}

.game-count {
    font-weight: 600
}

.copyright {
    font-style: normal;
    color: #666
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0
    }

    100% {
        background-position: -200% 0
    }
}

@media (min-width: 768px) {
    .tab-btn {
        flex:0 0 calc(25% - 8px);
        max-width: calc(25% - 8px);
        font-size: 14px;
        padding: 8px 0
    }

    .top-bar {
        margin: 12px 0 16px;
        padding: 0 4px
    }

    .page-title {
        font-size: 20px
    }

    .game-search input {
        width: 160px;
        font-size: 14px
    }

    .game-container {
        grid-template-columns: repeat(4,1fr);
        gap: 12px;
        padding-bottom: 80px
    }

    .game-name-cn {
        font-size: 13px;
        padding-top: 6px
    }

    .no-result {
        font-size: 16px
    }

    .footer-bar {
        font-size: 15px;
        padding: 14px 25px
    }
}

@media (min-width: 1200px) {
    .tab-btn {
        font-size:14px;
        padding: 9px 0
    }

    .game-search input {
        width: 220px
    }

    .game-container {
        grid-template-columns: repeat(5,1fr);
        gap: 15px;
        padding-bottom: 80px
    }

    .game-card {
        padding-bottom: 10px
    }

    .game-name-cn {
        font-size: 14px
    }
}
