/* ===== CATEGORY PAGE STYLES ===== */

/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0 60px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

.page-header-content {
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.title-icon {
    font-size: 2.5rem;
    animation: bounce 2s infinite;
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CATEGORY FILTER SECTION ===== */
.category-filter-section {
    padding: 60px 0;
    background: white;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-title {
    font-size: 2rem;
    color: #2c3e50;
    font-weight: 600;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-controls label {
    font-weight: 500;
    color: #6c757d;
}

.sort-select {
    padding: 8px 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    background: white;
    color: #2c3e50;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.view-controls {
    display: flex;
    gap: 5px;
    background: #f8f9fa;
    padding: 5px;
    border-radius: 25px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.view-btn.active {
    background: white;
    color: #4ecdc4;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.view-icon {
    font-size: 1.2rem;
}

/* ===== CATEGORY GRID ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.category-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.category-card-header {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    padding: 30px 20px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.category-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.category-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.category-count {
    font-size: 0.9rem;
    opacity: 0.9;
}

.category-card-body {
    padding: 25px 20px;
}

.category-description {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.category-preview {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.preview-game {
    width: 60px;
    height: 45px;
    border-radius: 8px;
    background: #f8f9fa;
    background-size: cover;
    background-position: center;
    border: 2px solid #e9ecef;
    transition: transform 0.3s ease;
}

.preview-game:hover {
    transform: scale(1.1);
}

.category-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
}

.stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 2px;
}

/* ===== CATEGORY GAMES SECTION ===== */
.category-games-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-title {
    font-size: 2rem;
    color: #2c3e50;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-controls {
    display: flex;
    gap: 15px;
}

.game-filter-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
    gap: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: #6c757d;
    white-space: nowrap;
}

.games-count {
    color: #4ecdc4;
    font-weight: 600;
}

/* ===== GAMES GRID ===== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.game-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    min-height: 350px;
    position: relative;
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.game-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
    background: #f8f9fa;
}

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

.game-info {
    padding: 20px;
}

.game-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
}

.game-category {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 10px;
}

.game-description {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    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 {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ffc107;
}

.play-btn {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-btn {
    background: white;
    border: 2px solid #e9ecef;
    color: #6c757d;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:hover {
    border-color: #4ecdc4;
    color: #4ecdc4;
}

.pagination-btn.active {
    background: #4ecdc4;
    border-color: #4ecdc4;
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== ANIMATIONS ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .page-header {
        padding: 50px 0 40px;
    }

    .page-title {
        font-size: 2.2rem;
        flex-direction: column;
        gap: 10px;
    }

    .title-icon {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .category-filter-section {
        padding: 40px 0;
    }

    .filter-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 30px;
    }

    .filter-title {
        font-size: 1.5rem;
    }

    .filter-controls {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .sort-controls {
        width: 100%;
    }

    .sort-select {
        width: 100%;
    }

    .category-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .category-card {
        min-height: auto;
    }

    .category-card-header {
        padding: 20px;
    }

    .category-icon {
        font-size: 2rem;
    }

    .category-name {
        font-size: 1.2rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .game-card {
        min-height: auto;
    }

    .game-image {
        height: 150px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 30px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .game-filter-controls {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .filter-group {
        width: 100%;
    }

    .sort-select {
        width: 100%;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 40px 0 30px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .title-icon {
        font-size: 1.5rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
    }

    .category-filter-section {
        padding: 30px 0;
    }

    .filter-title {
        font-size: 1.3rem;
    }

    .category-grid {
        gap: 12px;
    }

    .category-card-header {
        padding: 15px;
    }

    .category-icon {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .category-name {
        font-size: 1rem;
    }

    .category-count {
        font-size: 0.8rem;
    }

    .games-grid {
        gap: 12px;
    }

    .game-image {
        height: 120px;
    }

    .game-title {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .game-filter-controls {
        padding: 12px;
    }
}
