/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局字体设置 */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* 自定义滚动条 */
.categories-scrollbar::-webkit-scrollbar {
    height: 6px;
}

.categories-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.categories-scrollbar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.categories-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 导航栏滚动效果 */
header.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 游戏卡片样式 */
.game-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* 分类按钮样式 */
.category-btn {
    transition: all 0.2s ease;
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.category-btn.active {
    background-color: #3b82f6;
    color: white;
}

/* 横幅轮播样式 */
.banner-container {
    position: relative;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-slide.active {
    opacity: 1;
}

.banner-image-container {
    width: 66.666%;
    height: 100%;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    width: 33.333%;
    padding: 2rem;
    background-color: #f8fafc;
    color: #1e293b;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.banner-title {
    font-size: 2.25rem;
    font-weight: 900;
}

.banner-description {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.banner-content a {
    width: auto;
    align-self: flex-start;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .banner-content {
        padding: 1rem;
    }

    .banner-title {
        font-size: 1.55rem;
    }

    .banner-description {
        font-size: 0.875rem;
    }
}

/* 加载动画 */
.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: #3b82f6;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 语言切换按钮 */
#languageToggle {
    transition: all 0.2s ease;
    font-weight: 500;
}

#languageToggle:hover {
    background-color: #e5e7eb;
    transform: translateY(-1px);
}

/* 游戏按钮样式 */
.play-button {
    transition: all 0.2s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.p-4 h3{
    display: block;              /* 确保是块级元素 */
  white-space: nowrap;         /* 禁止换行 */
  overflow: hidden;            /* 隐藏溢出内容 */
  text-overflow: ellipsis;     /* 显示省略号 */
  width: 100%;                /* 需要指定宽度 */
  max-width: 100%;            /* 可选：防止意外扩展 */
}