/* 基础重置和响应式设置 */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

/* 容器响应式设置 */
.container {
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* 自定义过渡动画 */
.game-card {
    transition: transform 0.3s ease, shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
}

/* 详情页富文本样式 */
.rich-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* 侧边栏激活状态 */
.nav-active {
    background-color: #4f46e5;
    border-left: 4px solid #ffffff;
}

/* 加载动画 */
.loader {
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #4f46e5;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式图片 */
img {
    max-width: 100%;
    height: auto;
}

/* 移动端菜单 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 50;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    display: block;
    padding: 1.5rem;
    font-size: 1.5rem;
    color: #1f2937;
    text-decoration: none;
}

/* 响应式间距 */
.py-section {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

@media (min-width: 768px) {
    .py-section {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}