/*
Theme Name: ST手游主题
Theme URI: https://yourdomain.com
Author: 您的名字
Author URI: https://yourdomain.com
Description: 专为ST手游API设计的专业WordPress游戏主题
Version: 1.0.0
License: GPL v2 or later
Text Domain: stm-game-theme
Tags: games, gaming, api, mobile-games
*/

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

:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --accent-color: #ff4757;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --card-bg: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 容器 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.site-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo h1 a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-navigation a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: var(--transition);
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    background: rgba(255, 255, 255, 0.1);
}

/* 搜索栏 */
.search-box {
    background: white;
    border-radius: 50px;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 300px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-box input {
    border: none;
    outline: none;
    flex: 1;
    padding: 8px;
    font-size: 1rem;
}

.search-box button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--secondary-color);
}

/* 游戏网格 */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.game-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.game-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.game-card:hover .game-image img {
    transform: scale(1.05);
}

.game-discount {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.game-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    color: var(--text-color);
}

.game-title a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.game-title a:hover {
    color: var(--primary-color);
}

.game-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.game-tag {
    background: var(--light-bg);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.game-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex: 1;
}

.game-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.download-btn {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.download-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    transform: translateY(-2px);
}

.detail-btn {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: var(--transition);
}

.detail-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 筛选器 */
.filters-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.filter-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.filter-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
}

.btn-secondary {
    background: var(--light-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
}

.page-numbers:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-numbers.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 游戏详情页 */
.game-detail {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.game-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.game-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.game-detail-image {
    width: 150px;
    height: 150px;
    border-radius: 20px;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.2);
}

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

.game-detail-title {
    flex: 1;
    text-align: left;
}

.game-detail-title h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.game-detail-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.game-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.info-section {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.info-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

/* 页脚 */
.site-footer {
    background: #1a1a1a;
    color: #999;
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: #999;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-box {
        width: 100%;
        max-width: 400px;
    }
    
    .game-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-actions {
        flex-direction: column;
    }
    
    .filter-row {
        flex-direction: column;
    }
}