/* Games Header */
.games-header {
    text-align: center;
    padding: 60px 20px;
    background: var(--gradient);
    color: var(--text-light);
}

.games-header h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.games-header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeInUp 0.4s ease-out;
}

.game-card {
    position: relative;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

/* SkyWars Card */
.game-card:nth-child(1) {
    animation-delay: 0.1s;
    background: linear-gradient(135deg, #8e24aa 0%, #4a148c 100%);
}

/* BedWars Card */
.game-card:nth-child(2) {
    animation-delay: 0.15s;
    background: linear-gradient(135deg, #e53935 0%, #b71c1c 100%);
}

/* Arcade Games Card */
.game-card:nth-child(3) {
    animation-delay: 0.2s;
    background: linear-gradient(135deg, #1e88e5 0%, #0d47a1 100%);
}

/* Survival Card */
.game-card:nth-child(4) {
    animation-delay: 0.25s;
    background: linear-gradient(135deg, #43a047 0%, #1b5e20 100%);
}

/* Towny Card */
.game-card:nth-child(5) {
    animation-delay: 0.3s;
    background: linear-gradient(135deg, #fb8c00 0%, #e65100 100%);
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

/* Hover effects for each card */
.game-card:nth-child(1):hover {
    background: linear-gradient(135deg, #9c27b0 0%, #6a1b9a 100%);
}

.game-card:nth-child(2):hover {
    background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
}

.game-card:nth-child(3):hover {
    background: linear-gradient(135deg, #2196f3 0%, #1565c0 100%);
}

.game-card:nth-child(4):hover {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
}

.game-card:nth-child(5):hover {
    background: linear-gradient(135deg, #ff9800 0%, #ef6c00 100%);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.1) 100%);
    display: flex;
    align-items: flex-end;
    padding: 30px;
    transition: all 0.3s ease;
}

.game-card:hover .game-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0.2) 100%);
}

.game-content {
    color: var(--text-light);
    width: 100%;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.game-card:hover .game-content {
    transform: translateY(-5px);
}

.game-icon {
    font-size: 2em;
    margin-bottom: 15px;
    display: block;
    transition: all 0.3s ease;
}

.game-card:hover .game-icon {
    transform: scale(1.1);
}

.game-content h2 {
    font-size: 1.8em;
    margin-bottom: 10px;
}

.game-content p {
    opacity: 0.9;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    opacity: 0.9;
}

.player-count i {
    color: #4ade80;
}

.play-now {
    background: var(--text-light);
    color: var(--primary-color);
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.play-now:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    background: var(--primary-color);
    color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .game-card {
        height: 250px;
    }

    .games-header h1 {
        font-size: 2.5em;
    }
}

@media (max-width: 480px) {
    .game-content h2 {
        font-size: 1.5em;
    }

    .game-content p {
        font-size: 1em;
    }

    .games-header h1 {
        font-size: 2em;
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(to right, 
        transparent,
        rgba(74, 144, 226, 0.05),
        rgba(74, 144, 226, 0.05),
        transparent
    );
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, 
        rgba(74, 144, 226, 0.5), 
        rgba(100, 181, 246, 0.5)
    );
    border-radius: 50px;
    box-shadow: 
        inset 0 0 6px rgba(0, 0, 0, 0.1),
        inset 0 0 2px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, 
        rgba(74, 144, 226, 0.8), 
        rgba(100, 181, 246, 0.8)
    );
    box-shadow: 
        inset 0 0 8px rgba(0, 0, 0, 0.2),
        inset 0 0 3px rgba(255, 255, 255, 0.4),
        0 0 8px rgba(74, 144, 226, 0.3);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(74, 144, 226, 0.5) transparent;
} 