/* Tags/Categories Page Specific Styles - Homepage Style Adaptation */

/* Category Description in Category Section */
.category-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Category Footer */
.category-footer {
    margin-top: 1rem;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.view-all-btn {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all-btn:hover {
    color: var(--accent-color);
}

/* Games Section (for category-specific games) */
.games-section {
    margin-bottom: 3rem;
}

.games-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.games-title-section {
    flex: 1;
}

.games-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .games-title {
        font-size: 1.5rem;
    }
}

.games-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.games-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.view-toggle {
    display: flex;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
}

.view-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.view-btn.active,
.view-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Filter Controls */
.filter-controls {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.filter-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.filter-row {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 120px;
}

.filter-group label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
}

.filter-select {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

.reset-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

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

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .games-grid {
        grid-template-columns: 1fr;
    }
}

/* Game Cards in Categories */
.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: var(--primary-color);
}

.game-image {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--gradient-primary);
}

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

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

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.play-btn {
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.game-info {
    padding: 1.5rem;
}

.game-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.game-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0 0 1rem 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;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    color: var(--warning-color);
    font-size: 0.9rem;
}

.rating-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
}

.category-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Game Details in Cards */
.game-details {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.difficulty-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.difficulty-easy {
    background: rgba(107, 207, 127, 0.2);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.difficulty-medium {
    background: rgba(255, 211, 61, 0.2);
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.difficulty-hard {
    background: rgba(255, 107, 107, 0.2);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.players-badge {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Loading States */
.loading-container {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.loading {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .games-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .games-controls {
        justify-content: center;
    }
    
    .filter-controls {
        padding: 1rem;
    }
    
    .filter-section h3 {
        font-size: 1rem;
    }
    
    .filter-group label {
        font-size: 0.75rem;
    }
    
    .filter-select {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
    
    .reset-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .game-info {
        padding: 1rem;
    }
    
    .game-title {
        font-size: 1rem;
    }
    
    .game-description {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .games-title {
        font-size: 1.3rem;
    }
    
    .games-subtitle {
        font-size: 0.9rem;
    }
    
    .view-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .filter-controls {
        padding: 0.75rem;
    }
    
    .filter-row {
        gap: 0.5rem;
    }
    
    .filter-group {
        min-width: 100px;
    }
    
    .filter-group label {
        font-size: 0.7rem;
    }
    
    .filter-select {
        padding: 0.4rem;
        font-size: 0.8rem;
    }
    
    .reset-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .game-card {
        border-radius: 12px;
    }
    
    .game-info {
        padding: 0.75rem;
    }
    
    .game-title {
        font-size: 0.95rem;
    }
    
    .game-description {
        font-size: 0.75rem;
    }
    
    .play-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .stars {
        font-size: 0.8rem;
    }
    
    .rating-value {
        font-size: 0.8rem;
    }
    
    .category-tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }
    
    .difficulty-badge,
    .players-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }
}