/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #fff;
    /* linear-gradient(135deg, #FFA057 0%, #FF8A3D 100%); */
    min-height: 100vh;
    color: #333;
}

a{
    text-decoration: none;
    color: #fff;
}

/* CSS变量定义 */
:root {
    --tw-blur: ;
    --tw-brightness: ;
    --tw-contrast: ;
    --tw-grayscale: ;
    --tw-hue-rotate: ;
    --tw-invert: ;
    --tw-saturate: ;
    --tw-sepia: ;
    --tw-drop-shadow: ;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 导航栏 */
.header {
    background: #FF8A3D;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-btn-icon:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.search-btn-icon svg {
    width: 24px;
    height: 24px;
}

.menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 5px;
}

.menu-btn span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 下拉菜单 */
.dropdown-menu {
    background: #fff;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.dropdown-menu.active {
    max-height: 300px;
}

.dropdown-menu a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
    font-weight: 700;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 横向滚动分类菜单 */
.category-scroll {
    background: #F7CB9F;
    padding: 20px 0;
    /* margin-top: 10px; */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.category-scroll::-webkit-scrollbar {
    height: 4px;
}

.category-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.category-list {
    display: flex;
    gap: 15px;
    padding: 0 15px;
    min-width: max-content;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: #FF8A3D;
    padding: 15px 20px;
    border-radius: 15px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    min-width: 100px;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.category-item .emoji {
    font-size: 32px;
}

.category-item .text {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

/* 主内容 */
.main-content {
    padding: 30px 0;
    background: rgba(255, 255, 255, 0.3);
}

.game-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 24px;
    font-weight: bold;
    color: #FAB929;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

@media (max-width: 768px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

.game-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    /* padding: 5px; */
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); */
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.game-image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    overflow: hidden;
    /* background-size: cover;
    background-position: center; */
}

.effect-2 {
    --tw-blur: blur(5px);
    --tw-brightness: brightness(0.95);
    filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
    
    border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
    border: 3px solid rgba(255,255,255, .5);
    /* padding: 5px; */
    background-color: #f9f9f9;
}

/* .game-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    z-index: 1;
} */

.game-image .bg-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 115%;
    height: 108%;
    object-fit: cover;
    z-index: 2;
  
    /* border-radius: 8px; */
    /* filter: blur(15px); */
}

.game-image .up-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110%;
    height: 70%;
    object-fit: cover;
    z-index: 2;
    border-radius: 8px;
}

.game-rating {
    padding: 5px 15px 8px 15px;
    display: flex;
    gap: 0px;
    justify-content: center;
    span{
        font-size: 13px;
        color: #999;
        /* padding-left: 5px; */
    }
}

.star {
    color: #ddd;
    font-size: 15px;
}

.star.filled {
    color: #FFD700;
}

/* 页脚 */
.footer {
    background: #FF8A3D;
    margin-top: 50px;
    padding: 40px 0 20px;
    color: white;
}

.footer-content {
    margin-bottom: 30px;
}

.footer-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
}

.footer-text {
    line-height: 1.8;
    opacity: 0.9;
    max-width: 800px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    text-align: center;
    opacity: 0.8;
    font-size: 14px;
}

/* 搜索框样式 */
.search-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-box {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #FF8A3D;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #FF7A2D;
    box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.1);
}

.search-btn {
    padding: 15px 30px;
    background: #FF8A3D;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #FF7A2D;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 138, 61, 0.3);
}

/* 详情页样式 */
.detail-hero {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.detail-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
}

.detail-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
}

.detail-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-content {
    padding: 30px;
}

.detail-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    align-items: center;
}

.detail-category {
    background: #FF8A3D;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.detail-description {
    line-height: 1.8;
    color: #666;
    margin-bottom: 30px;
}

.play-btn {
    display: inline-block;
    padding: 15px 40px;
    background: #FF8A3D;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.play-btn:hover {
    background: #FF7A2D;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 138, 61, 0.3);
}

.recommendations {
    margin-top: 50px;
}

.recommendations .section-title {
    font-size: 28px;
}

/* 分类页样式 */
.category-hero {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.category-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.category-description {
    font-size: 18px;
    line-height: 1.8;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

.category-games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* PC端适配 */
@media (min-width: 769px) {
    .category-scroll {
        padding: 30px 0;
    }

    .category-list {
        justify-content: center;
    }

    .game-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-games {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .logo {
        font-size: 28px;
    }

    .section-title {
        font-size: 28px;
    }
}

/* 搜索标签样式 */
.search-tag {
    padding: 10px 20px;
    background: white;
    color: #FF8A3D;
    border: 2px solid #FF8A3D;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-tag:hover {
    background: #FF8A3D;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 138, 61, 0.3);
}

/* 响应式 */
@media (max-width: 480px) {
    .category-item {
        min-width: 80px;
        padding: 12px 15px;
    }

    .category-item .emoji {
        font-size: 28px;
    }

    .footer-title {
        font-size: 20px;
    }

    .detail-title {
        font-size: 24px;
    }

    .category-title {
        font-size: 28px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }
}
