/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #00e6ff;
    --color-secondary: #0080ff;
    --color-background: #0a0f1e;
    --color-surface: #152642;
    --color-surface-dark: #0e1a2f;
    --color-border: #1a3a5f;
    --color-text: #e0e0e0;
    --color-text-muted: #8a9bb8;
    --laser-green: #00ff66;
}

body {
    font-family: 'Orbitron', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 1px;
}

/* 导航栏样式 */
.nav-command-center {
    background-color: rgba(10, 15, 30, 0.95);
    border-bottom: 2px solid var(--laser-green);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 255, 102, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    color: var(--laser-green);
    font-size: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.logo-text {
    color: var(--color-text);
    font-weight: 900;
    font-size: 22px;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(0, 255, 102, 0.3);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    position: relative;
    padding: 8px 16px;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-link:hover {
    color: var(--laser-green);
    background-color: rgba(0, 255, 102, 0.15);
    border: 1px solid var(--laser-green);
    text-shadow: 0 0 10px rgba(0, 255, 102, 0.9);
}

.nav-link.active {
    color: #fff;
    background-color: rgba(0, 255, 102, 0.3);
    border: 2px solid var(--laser-green);
    text-shadow: 0 0 15px rgba(0, 255, 102, 1);
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.6);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--laser-green);
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    justify-content: space-between;
}

.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--laser-green);
    border-radius: 2px;
    transition: all 0.3s;
}

/* 分类头部样式 */
.category-header {
    padding: 80px 0 40px;
    text-align: center;
    background: linear-gradient(135deg, var(--color-background) 0%, var(--color-surface) 100%);
    border-bottom: 1px solid var(--color-border);
}

.page-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 15px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* 分类筛选区域 */
.category-filter-section {
    padding: 40px 0;
    background: rgba(10, 15, 30, 0.8);
    border-bottom: 1px solid var(--color-border);
}

.filter-controls {
    display: flex;
    gap: 30px;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 700;
    text-transform: uppercase;
}

.filter-select {
    background: rgba(21, 38, 66, 0.8);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    padding: 10px 15px;
    border-radius: 5px;
    font-family: 'Orbitron', sans-serif;
    min-width: 200px;
    cursor: pointer;
}

.search-group {
    display: flex;
    gap: 0;
}

.search-input {
    background: rgba(21, 38, 66, 0.8);
    border: 1px solid var(--color-border);
    border-right: none;
    color: var(--color-text);
    padding: 10px 15px;
    border-radius: 5px 0 0 5px;
    font-family: 'Orbitron', sans-serif;
    min-width: 250px;
}

.search-button {
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    color: var(--color-background);
    padding: 10px 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    transition: all 0.3s ease;
}

.search-button:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
}

/* 分类快速访问 */
.category-quick-access {
    margin-top: 30px;
}

.quick-access-title {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tag {
    background: rgba(0, 230, 255, 0.1);
    border: 1px solid var(--color-primary);
    color: var(--color-text);
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.category-tag:hover {
    background: var(--color-primary);
    color: var(--color-background);
    transform: translateY(-2px);
}

/* 游戏网格区域 */
.games-grid-section {
    padding: 60px 0;
    min-height: 70vh;
    position: relative;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

.games-count {
    color: var(--color-primary);
    font-size: 1rem;
    background: rgba(0, 230, 255, 0.1);
    padding: 5px 15px;
    border-radius: 15px;
    border: 1px solid var(--color-primary);
}

/* 分类区块头部 */
.category-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 50px 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--color-primary);
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.category-count {
    font-size: 0.9rem;
    color: var(--color-primary);
    background: rgba(0, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 12px;
    border: 1px solid var(--color-primary);
}

/* 游戏网格 - 优化5列布局 */
.category-games-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    min-height: 200px;
    width: 100%;
}

/* 移动端响应式设计 - 一行两个游戏卡片 */
@media (max-width: 768px) {
    .category-games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* 分类操作按钮样式 */
.category-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.btn-more,
.btn-return {
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    color: var(--color-background);
    padding: 10px 25px;
    border-radius: 25px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-more:hover,
.btn-return:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
    transform: translateY(-2px);
}

.btn-return {
    background: transparent;
    color: var(--color-primary);
}

.btn-return:hover {
    background: var(--color-primary);
    color: var(--color-background);
}

/* 移动端按钮样式优化 */
@media (max-width: 768px) {
    .category-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-more,
    .btn-return {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
}

/* 游戏卡片样式 - 简化版本 */
.game-card {
    background: linear-gradient(145deg, var(--color-surface), var(--color-surface-dark));
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 100%;
    height: 100%;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
    box-shadow: 0 10px 25px rgba(0, 230, 255, 0.3);
}

.game-thumb-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.game-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.game-card:hover .game-thumb {
    transform: scale(1.05);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.game-id {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 2;
}

.btn-play {
    background: linear-gradient(45deg, #ff0000, #ff6b6b);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.btn-play:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
}

.btn-play.deploying {
    background: linear-gradient(45deg, #00ff00, #00b300);
}

.game-info {
    padding: 15px;
}

.game-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.game-description {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-rating {
    color: #ffd700;
    font-size: 0.9rem;
}

/* 加载状态 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 50px 0;
    text-align: center;
    min-height: 300px;
    justify-content: center;
}

.loading-pulse {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-primary);
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 无结果状态 */
.no-results {
    text-align: center;
    padding: 60px 0;
    display: none;
    min-height: 400px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.no-results h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.no-results p {
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
    border: none;
    color: var(--color-background);
    padding: 12px 24px;
    border-radius: 5px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 230, 255, 0.4);
}

/* 页脚样式 */
.footer {
    background-color: var(--color-background);
    border-top: 1px solid var(--color-border);
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    color: #fff;
    margin-bottom: 15px;
    font-weight: 700;
}

.footer-section p {
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    color: #5d7ca6;
    font-size: 0.9rem;
}

/* 响应式设计 - 修复断点问题 */
@media (max-width: 1400px) {
    .category-games-grid {
        grid-template-columns: repeat(4, minmax(220px, 1fr));
    }
}

@media (max-width: 1200px) {
    .category-games-grid {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
    }
}

@media (max-width: 992px) {
    .category-games-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .filter-group,
    .search-group {
        width: 100%;
    }

    .filter-select,
    .search-input {
        min-width: auto;
        width: 100%;
    }
}

/* 修复768px屏幕下的布局问题 - 使用弹性布局 */
@media (max-width: 820px) {
    .container {
        padding: 0 15px;
    }
    
    .category-games-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        margin-bottom: 40px;
        justify-content: space-between;
    }
    
    .game-card {
        flex: 0 1 calc(50% - 8px);
        min-width: calc(50% - 8px);
        min-height: 280px;
        margin: 0;
    }
    
    .page-title {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(10, 15, 30, 0.98);
        flex-direction: column;
        padding: 20px;
        text-align: center;
        gap: 15px;
        border-top: 1px solid var(--color-border);
        transition: max-height 0.3s ease-out;
        max-height: 0;
        overflow: hidden;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .filter-group,
    .search-group {
        width: 100%;
    }

    .filter-select,
    .search-input {
        width: 100%;
        min-width: 100%;
    }

    .btn-play,
    .btn-primary,
    .search-button {
        font-size: 1rem;
        padding: 12px 20px;
    }

    .nav-menu.active {
        display: flex;
        max-height: 500px;
    }

    .hamburger-menu {
        display: flex;
    }
    
    .games-grid-section {
        overflow: hidden;
    }
}

/* 修复576px及以下屏幕的布局 */
@media (max-width: 620px) {
    .category-games-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }
    
    .game-card {
        flex: 0 1 100%;
        min-width: 100%;
        max-width: 100%;
        min-height: 250px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 12px;
    }

    .category-tags {
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .category-section-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .game-card {
        flex: 0 1 100%;
        min-width: 100%;
        margin: 0 0 15px 0;
    }
    
    .category-games-grid {
        gap: 10px;
    }
    
    .page-title {
        font-size: 1.6rem;
        letter-spacing: 1px;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .filter-select,
    .search-input {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .category-tag {
        font-size: 0.7rem;
        padding: 6px 12px;
    }
}

/* 确保body和html有正确的高度 */
html,
body {
    height: 100%;
}

/* 主内容区域包装器 */
.main-content {
    min-height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

/* 汉堡菜单动画 */
.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}