/* Games Page Specific Styles */

/* Games Header */
.games-header {
    position: relative;
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 50%, #34495e 100%);
    padding: 100px 0 80px 0;
    text-align: center;
    overflow: hidden;
}

.games-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(116, 185, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(116, 185, 255, 0.05) 0%, transparent 50%);
    animation: gameHeaderFloat 12s ease-in-out infinite;
}

/* Floating particles overlay */
.games-header-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='10' cy='15' r='1' fill='%2300d4ff' opacity='0.4'/%3E%3Ccircle cx='85' cy='25' r='1.5' fill='%2374b9ff' opacity='0.5'/%3E%3Ccircle cx='25' cy='75' r='1.2' fill='%2300d4ff' opacity='0.3'/%3E%3Ccircle cx='75' cy='85' r='1' fill='%2374b9ff' opacity='0.4'/%3E%3Ccircle cx='45' cy='35' r='0.8' fill='%2300d4ff' opacity='0.6'/%3E%3Ccircle cx='65' cy='55' r='1.3' fill='%2374b9ff' opacity='0.3'/%3E%3Ccircle cx='15' cy='65' r='1.1' fill='%2300d4ff' opacity='0.5'/%3E%3Ccircle cx='90' cy='70' r='0.9' fill='%2374b9ff' opacity='0.4'/%3E%3C/svg%3E") repeat;
    background-size: 120px 120px;
    animation: gameParticleFloat 25s linear infinite;
    opacity: 0.8;
}

/* Additional floating dots layer */
.games-header-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Ccircle cx='20' cy='10' r='0.8' fill='%2300d4ff' opacity='0.3'/%3E%3Ccircle cx='70' cy='20' r='1.2' fill='%2374b9ff' opacity='0.4'/%3E%3Ccircle cx='35' cy='60' r='1' fill='%2300d4ff' opacity='0.5'/%3E%3Ccircle cx='60' cy='75' r='0.9' fill='%2374b9ff' opacity='0.3'/%3E%3Ccircle cx='10' cy='45' r='1.1' fill='%2300d4ff' opacity='0.4'/%3E%3C/svg%3E") repeat;
    background-size: 100px 100px;
    animation: gameParticleFloat 30s linear infinite reverse;
    opacity: 0.6;
}

.games-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.games-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #74b9ff 0%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: capitalize;
    letter-spacing: 2px;
    animation: gamesGlow 3s ease-in-out infinite;
}

.games-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
    line-height: 1.7;
    margin: 0 auto;
}

/* Game Categories */
.game-categories {
    background: rgba(26, 35, 50, 0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 0;
    position: sticky;
    /* top: 70px; */
    z-index: 100;
}

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 1000px;
    margin: 0 auto;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(116, 185, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn:hover {
    background: rgba(116, 185, 255, 0.15);
    border-color: rgba(116, 185, 255, 0.4);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(116, 185, 255, 0.2);
}

.category-btn.active {
    background: linear-gradient(135deg, #74b9ff 0%, #00d4ff 100%);
    border-color: #74b9ff;
    color: white;
    box-shadow: 0 8px 25px rgba(116, 185, 255, 0.4);
}

.category-btn i {
    font-size: 1.1rem;
}

/* Games Grid */
.games-grid {
    padding: 60px 0 80px 0;
    background: transparent;
}

.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Game Card */
.game-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    position: relative;
    cursor: pointer;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.1) 0%, rgba(0, 212, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 20px;
}

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

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(116, 185, 255, 0.3);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(116, 185, 255, 0.2);
}

.game-image {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

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

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

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 35, 50, 0.8) 0%,
        rgba(44, 62, 80, 0.6) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.play-button {
    background: rgba(116, 185, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.play-button:hover {
    background: rgba(116, 185, 255, 1);
    transform: scale(1.1);
}

.game-content {
    padding: 25px;
    position: relative;
    z-index: 2;
}

.game-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    line-height: 1.3;
}

.game-description {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.game-tag {
    background: rgba(116, 185, 255, 0.2);
    color: #74b9ff;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(116, 185, 255, 0.3);
}

.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.game-players {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ffd700;
    font-size: 0.9rem;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ffd700;
    font-size: 0.8rem;
}

.star.empty {
    color: rgba(255, 255, 255, 0.3);
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(116, 185, 255, 0.3);
    border-top: 3px solid #74b9ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

/* Animations */
@keyframes gameHeaderFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(1deg); }
    66% { transform: translateY(8px) rotate(-1deg); }
}

@keyframes gameParticleFloat {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-120px) translateY(-20px); }
}

/* Floating game dots scattered throughout header */
.games-header .floating-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(116, 185, 255, 0.4);
    animation: floatingDotMove 15s ease-in-out infinite;
    pointer-events: none;
}

.games-header .floating-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: dotPulse 3s ease-in-out infinite;
}

.games-header .floating-dot:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.games-header .floating-dot:nth-child(2) { top: 60%; left: 85%; animation-delay: -2s; background: rgba(0, 212, 255, 0.4); }
.games-header .floating-dot:nth-child(3) { top: 30%; left: 70%; animation-delay: -4s; }
.games-header .floating-dot:nth-child(4) { top: 80%; left: 25%; animation-delay: -6s; background: rgba(0, 212, 255, 0.4); }
.games-header .floating-dot:nth-child(5) { top: 45%; left: 90%; animation-delay: -8s; }
.games-header .floating-dot:nth-child(6) { top: 75%; left: 60%; animation-delay: -10s; background: rgba(0, 212, 255, 0.4); }

@keyframes floatingDotMove {
    0%, 100% { 
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.4;
    }
    25% { 
        transform: translateY(-30px) translateX(15px) scale(1.2);
        opacity: 0.8;
    }
    50% { 
        transform: translateY(-60px) translateX(-10px) scale(0.8);
        opacity: 0.6;
    }
    75% { 
        transform: translateY(-30px) translateX(-25px) scale(1.1);
        opacity: 0.7;
    }
}

@keyframes dotPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 1;
    }
}

@keyframes gamesGlow {
    0%, 100% { text-shadow: 0 0 30px rgba(116, 185, 255, 0.6); }
    50% { text-shadow: 0 0 50px rgba(116, 185, 255, 0.9), 0 0 70px rgba(0, 212, 255, 0.7); }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.game-card {
    animation: fadeInUp 0.6s ease forwards;
}

.game-card:nth-child(even) {
    animation-delay: 0.1s;
}

.game-card:nth-child(3n) {
    animation-delay: 0.2s;
}

/* Filter Animation */
.game-card.filtering-out {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.game-card.filtering-in {
    animation: filterIn 0.5s ease forwards;
}

@keyframes filterIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .games-container {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 25px;
    }
    
    .games-title {
        font-size: 3.5rem;
    }
    
    .category-filters {
        gap: 10px;
    }
    
    .category-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 768px) {
    .games-header {
        padding: 80px 0 60px 0;
    }
    
    .games-title {
        font-size: 2.8rem;
    }
    
    .games-subtitle {
        font-size: 1.2rem;
    }
    
    /* Reduce particle complexity on mobile */
    .games-header-bg::before,
    .games-header-bg::after {
        background-size: 80px 80px;
        animation-duration: 35s;
    }
    
    .games-header .floating-dot {
        width: 6px;
        height: 6px;
        animation-duration: 20s;
    }
    
    .games-header .floating-dot::before {
        width: 3px;
        height: 3px;
    }
    
    .game-categories {
        padding: 20px 0;
        position: relative;
        top: 0;
    }
    
    .category-filters {
        gap: 8px;
        padding: 0 10px;
    }
    
    .category-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .games-container {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .game-content {
        padding: 20px;
    }
    
    .game-title {
        font-size: 1.25rem;
    }
    
    .game-description {
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .games-title {
        font-size: 2.2rem;
    }
    
    .games-subtitle {
        font-size: 1.1rem;
    }
    
    .category-filters {
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 15px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .category-filters::-webkit-scrollbar {
        display: none;
    }
    
    .category-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .games-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .game-image {
        height: 180px;
    }
    
    .game-content {
        padding: 18px;
    }
}
