/* 36sy手游网 - 暗黑炫酷风格 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0d0d12;
    --bg-secondary: #16161e;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;
    --accent-gold: #f0a500;
    --accent-orange: #ff6b35;
    --accent-glow: rgba(240, 165, 0, 0.3);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --border-color: #2a2a38;
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--bg-primary) 0%, #12121a 100%);
}

/* 顶部导航 */
.header {
    position: relative;
    padding: 24px 16px 20px;
    background: var(--bg-secondary);
    overflow: hidden;
}

.header-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.logo {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px var(--accent-glow);
}

.logo span {
    opacity: 0.8;
}

.slogan {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.header-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    filter: blur(40px);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.8; transform: translateX(-50%) scale(1.1); }
}

/* 搜索栏 */
.search-bar {
    padding: 16px;
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    margin-right: 10px;
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

/* 分类标签 - 横向滑动关键样式 */
.categories {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.category-scroll {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 10px;
    overflow-x: auto !important;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 12px 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.category-scroll::-moz-scrollbar {
    display: none;
}

.category-item {
    flex-shrink: 0 !important;
    padding: 8px 16px;
    background: var(--bg-card);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    white-space: nowrap;
    display: inline-block;
}

.category-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.category-item.active {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
    color: #000 !important;
    font-weight: 600;
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* 游戏列表 */
.game-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.game-card {
    display: flex;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.game-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-card), 0 0 20px var(--accent-glow);
}

.game-card:active {
    transform: scale(0.98);
}

.game-cover {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    overflow: hidden;
}

.game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-cover img {
    transform: scale(1.1);
}

/* 多个分类标签 */
.game-tags {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 88px;
}

.game-badge {
    background: rgba(0, 0, 0, 0.75);
    color: var(--accent-gold);
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 500;
    white-space: nowrap;
}

.game-info {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.game-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.game-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.game-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.game-size {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 3px 8px;
    border-radius: 8px;
}

.game-btn {
    font-size: 12px;
    color: var(--accent-gold);
    background: linear-gradient(135deg, rgba(240, 165, 0, 0.15) 0%, rgba(255, 107, 53, 0.15) 100%);
    padding: 4px 14px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.game-card:hover .game-btn {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
    color: #000;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state p {
    color: var(--text-muted);
    font-size: 14px;
}

.empty-tip {
    margin-top: 8px;
    font-size: 12px !important;
    opacity: 0.6;
}

/* 底部 */
.footer {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-muted);
    font-size: 12px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-tip {
    margin-top: 8px;
    font-size: 11px;
    opacity: 0.6;
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.loading-dot {
    width: 10px;
    height: 10px;
    background: var(--accent-gold);
    border-radius: 50%;
    margin: 0 4px;
    animation: loadingBounce 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* 响应式 */
@media (max-width: 380px) {
    .game-cover {
        width: 80px;
        height: 80px;
    }
    
    .game-title {
        font-size: 14px;
    }
    
    .game-desc {
        display: none;
    }
}
