
.tags-header {
    margin-bottom: 2rem;
    text-align: center;
}

.tags-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tags-page-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.tags-sidebar {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow);
    height: fit-content;
    max-height: calc(100vh - 120px);
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
}

.tags-sidebar-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

.tags-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 250px);
    padding-right: 0.5rem;
    flex: 1;
}

.tags-list::-webkit-scrollbar {
    width: 6px;
}

.tags-list::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 12px;
}

.tags-list::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 12px;
}

.tags-list::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.tags-list-item {
    padding: 0.75rem 1rem;
    background: var(--bg-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
}

.tags-list-item:hover {
    background: var(--primary);
    color: white;
    transform: translateX(4px);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.tags-list-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.tags-list-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-color);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.tags-list-item:hover .tags-list-count,
.tags-list-item.active .tags-list-count {
    color: white;
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}

.tags-main {
    min-height: 400px;
}

.tags-search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.tags-search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

.tags-search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.tags-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.tags-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.tags-no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.tags-no-results p {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.tags-no-results-hint {
    font-size: 0.9rem;
    opacity: 0.7;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow);
}

.tag-cloud-item {
    background: var(--bg-color);
    color: var(--text-color);
    padding: 0.875rem 1.125rem;
    border-radius: 12px;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    box-shadow: 0 1px 4px var(--shadow);
    font-size: 0.9rem;
    font-weight: 500;
}

.tag-cloud-item:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 212, 255, 0.3);
    border-color: var(--primary);
}

.tag-count {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-left: 0.5rem;
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.tag-cloud-item:hover .tag-count {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    opacity: 1;
}

/* .stats-grid 已在 style.css 中定义，这里不需要重复 */

.back-to-tags-btn {
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.95rem;
}

.back-to-tags-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateX(-4px);
}

@media (max-width: 991px) {
    .tags-container {
        gap: 1.5rem;
    }
    
    .tags-sidebar {
        padding: 1rem;
    }
    
    .tags-cloud {
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .tag-cloud-item {
        padding: 0.625rem 0.75rem;
        font-size: 0.85rem;
    }
}


/* ============================================
   移动端适配样式 - 详情页/游戏页 (480px 及以下)
   ============================================ */
@media (max-width: 480px) {
    /* 游戏详情页 */
    .game-detail, .game-header, .detail-header {
        padding: 1rem 0.75rem;
    }
    
    .game-title, .detail-title {
        font-size: 1.25rem !important;
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }
    
    .game-info, .detail-info {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .game-image, .detail-image {
        width: 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    .game-description, .detail-description {
        font-size: 0.875rem;
        line-height: 1.6;
    }
    
    /* 游戏容器 */
    .game-container, .play-container {
        padding: 0.5rem;
    }
    
    .game-iframe, .play-iframe {
        width: 100%;
        min-height: 400px;
    }
    
    /* 相关游戏 */
    .related-games, .similar-games {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    /* 标签 */
    .game-tags, .detail-tags {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .tag {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }
    
    /* 按钮组 */
    .button-group, .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .button-group button, .action-buttons button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* ============================================
   移动端适配样式 - 详情页/游戏页 (768px 及以下)
   ============================================ */
@media (max-width: 768px) {
    .game-detail, .game-header {
        padding: 1.5rem 1rem;
    }
    
    .game-title {
        font-size: 1.5rem;
    }
    
    .game-info {
        flex-wrap: wrap;
    }
    
    .game-image {
        max-width: 100%;
    }
    
    .related-games {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .game-container {
        padding: 1rem;
    }
}
