/* Games Page Specific Styles */

.nav-link.active {
    color: #00d4aa;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #00d4aa;
}

/* Games Hero Section */
.games-hero {
    min-height: 100vh;
    background: linear-gradient(180deg, #00773A 0%, #00DD6B 100%);;
    padding: 120px 20px 50px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}


.games-title {
    font-size: clamp(40px, 6vw, 60px);
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}


.games-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.games-text p {
    font-size: 14px;
    line-height: 1.2;
    color: #ffffff;
    opacity: 0.95;
    text-align: justify;
}

/* Games Showcase Grid */
.games-showcase {
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 400px;
    height: 400px;
}

.showcase-game span {
  position: absolute;
  padding: 20px;
  text-align: center;
  color: #fff;
  z-index: 5;
  left: 0;
  bottom: 0;
  text-transform: uppercase;
  line-height: 1;
  opacity: 0;
  transition: all 0.3s ease;
}


.showcase-game {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.showcase-game:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    
}

.showcase-game:hover span {
  opacity: 1;
}

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

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

/* Large game spans 2x2 grid */
.large-game {
    grid-column: span 2;
    grid-row: span 2;
}

/* Grid positioning for specific layout */
.showcase-game:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.showcase-game:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.showcase-game:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
}

.showcase-game:nth-child(4) {
    grid-column: 1;
    grid-row: 2;
}

.showcase-game:nth-child(5) {
    grid-column: 3;
    grid-row: 2;
}

.showcase-game:nth-child(6) {
    grid-column: 2 / 4;
    grid-row: 2 / 4;
}

.showcase-game:nth-child(7) {
    grid-column: 1;
    grid-row: 3;
}

/* Animation effects */
.showcase-game {
    opacity: 0;
    animation: slideInScale 0.6s ease forwards;
}

.showcase-game:nth-child(1) { animation-delay: 0.1s; }
.showcase-game:nth-child(2) { animation-delay: 0.2s; }
.showcase-game:nth-child(3) { animation-delay: 0.3s; }
.showcase-game:nth-child(4) { animation-delay: 0.4s; }
.showcase-game:nth-child(5) { animation-delay: 0.5s; }
.showcase-game:nth-child(6) { animation-delay: 0.2s; }
.showcase-game:nth-child(7) { animation-delay: 0.6s; }

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

/* Click effect */
.showcase-game:active {
    transform: scale(0.98);
}

/* Hover glow effect */
.showcase-game::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 2, 2, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

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

/* Floating animation for some games */
.showcase-game:nth-child(1),
.showcase-game:nth-child(3),
.showcase-game:nth-child(5) {
    animation: slideInScale 0.6s ease forwards, float 3s ease-in-out infinite;
}

.showcase-game:nth-child(2),
.showcase-game:nth-child(4),
.showcase-game:nth-child(7) {
    animation: slideInScale 0.6s ease forwards, float 3s ease-in-out infinite;
    animation-delay: 0.2s, 1.5s;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) scale(1); 
    }
    50% { 
        transform: translateY(-5px) scale(1); 
    }
}

.showcase-game:hover {
    animation-play-state: paused;
}

/* Responsive Design for Games Page */
@media (max-width: 768px) {
    .games-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .game-grid {
        max-width: 300px;
        height: 300px;
        gap: 10px;
    }

    .games-hero {
        padding: 100px 20px 40px;
    }

    .games-title {
        margin-bottom: 40px;
    }

    .games-text p {
        text-align: left;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .games-hero {
        padding: 80px 15px 30px;
    }

    .games-title {
        font-size: 32px;
        margin-bottom: 30px;
    }

    .games-content {
        gap: 30px;
    }

    .games-text p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 20px;
    }
}

/* Special effects for large game */
.large-game {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.2), rgba(255, 64, 129, 0.2));
}

.large-game::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.large-game:hover::after {
    opacity: 1;
}

/* Loading states */
.showcase-game.loading {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 25%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Game title overlay on hover */
.showcase-game {
    position: relative;
}

.showcase-game::after {
    content: attr(data-title);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px 10px 10px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.showcase-game:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* Accessibility improvements */
.showcase-game:focus {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.showcase-game:focus:not(:hover) {
    transform: scale(1.02);
}

/* Print styles */
@media print {
    .games-hero {
        background: white !important;
        color: black !important;
        padding: 20px;
    }
    
    .games-title {
        color: black !important;
        text-shadow: none !important;
    }
    
    .games-text p {
        color: black !important;
    }
    
    .game-grid {
        display: none;
    }
}