/* 风次网络游戏站 - 深色科技风样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d4ff;
    --secondary-color: #7b2cff;
    --accent-color: #00ff88;
    --bg-dark: #0a0e17;
    --bg-card: rgba(20, 30, 50, 0.7);
    --bg-card-hover: rgba(30, 50, 80, 0.9);
    --text-primary: #e0e6ed;
    --text-secondary: #8892b0;
    --border-glow: rgba(0, 212, 255, 0.3);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景动画效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(123, 44, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 255, 136, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* 网格背景 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部 */
.header {
    text-align: center;
    padding: 40px 0 30px;
    position: relative;
}

.header h1 {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(0, 212, 255, 0.5);
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.header .subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    letter-spacing: 2px;
}

/* 装饰线 */
.header::after {
    content: '';
    display: block;
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 20px auto 0;
}

/* 搜索框 */
.search-box {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 15px 25px 15px 50px;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

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

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

/* 分类导航 */
.categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.category-btn {
    padding: 10px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 30px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.category-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.category-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}

/* 游戏统计 */
.stats {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 14px;
}

.stats span {
    color: var(--primary-color);
    font-weight: bold;
}

/* 游戏网格 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

/* 游戏卡片 */
.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.3);
    background: var(--bg-card-hover);
}

.game-card:hover::before {
    opacity: 1;
}

.game-icon {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(123, 44, 255, 0.1));
    font-size: 48px;
    overflow: hidden;
}

.game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-icon .default-icon {
    font-size: 60px;
    opacity: 0.5;
}

.game-info {
    padding: 15px;
}

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

.game-category {
    font-size: 12px;
    color: var(--primary-color);
    background: rgba(0, 212, 255, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
    display: inline-block;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--text-secondary);
    font-size: 14px;
    border-top: 1px solid var(--border-glow);
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 50px;
    color: var(--text-secondary);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-glow);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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

/* 响应式 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 32px;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .game-icon {
        height: 100px;
    }
    
    .game-name {
        font-size: 12px;
    }
    
    .categories {
        gap: 8px;
    }
    
    .category-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* 游戏弹窗 */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.game-modal.active {
    display: flex;
}

.game-modal-content {
    width: 90%;
    max-width: 900px;
    height: 80vh;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.3);
}

.game-modal-header {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-glow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
}

.game-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-modal-close:hover {
    background: rgba(255, 100, 100, 0.3);
    color: #ff6464;
}

.game-modal-iframe {
    width: 100%;
    height: calc(100% - 56px);
    border: none;
}

/* 无结果提示 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-results .emoji {
    font-size: 60px;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
}
