/* Featured Games Section Styling */
.featured-game-list {
    grid-template-columns: 1fr !important;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    z-index: 16;
    /* Below header (z-index: 100) */
}

/* Hero-style background for featured games section */
#games {
    position: relative;
    z-index: 9;
    background: radial-gradient(ellipse at center, #1a1a1a 0%, #0d0d0d 100%);
    overflow: hidden;
    /* Enhanced floating effect */
    box-shadow:
        0 -30px 80px rgba(0, 0, 0, 0.3),
        0 10px 40px rgba(255, 23, 68, 0.1);
    transform: translateZ(0);
    /* Create stacking context */
    margin-top: -20px;
    /* Overlap with previous section */
}

#games::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(255, 38, 62, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(255, 38, 62, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(255, 100, 120, 0.08) 0%, transparent 40%);
    animation: backgroundPulse 8s ease-in-out infinite;
    z-index: 1;
}

#games::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 31px 17px, rgba(0, 0, 0, 0.8), transparent),
        radial-gradient(2px 2px at 89px 71px, rgba(255, 100, 120, 0.6), transparent),
        radial-gradient(1px 1px at 156px 23px, rgba(255, 38, 62, 0.7), transparent),
        radial-gradient(3px 3px at 203px 89px, rgba(255, 100, 120, 0.5), transparent),
        radial-gradient(1px 1px at 67px 134px, rgba(255, 38, 62, 0.9), transparent),
        radial-gradient(2px 2px at 178px 156px, rgba(255, 100, 120, 0.4), transparent),
        radial-gradient(1px 1px at 45px 201px, rgba(255, 38, 62, 0.6), transparent),
        radial-gradient(2px 2px at 234px 67px, rgba(255, 100, 120, 0.7), transparent);
    background-repeat: repeat;
    background-size: 280px 220px;
    animation: sparkleOptimized 25s linear infinite;
    opacity: 0.4;
    z-index: 1;
}

#games .container {
    position: relative;
    z-index: 16;
    /* Below header */
    /* Add floating lift */
    transform: translateY(-15px);
}

/* Content Wrapper - Left Side Vertical Image */
.content-wrapper {
    position: relative;
    width: 40%;
    height: 600px;
    background-size: cover;
    background-position: center;
    transition: all 0.4s ease;
    z-index: 2;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* Spark Container for featured game image - now used for shine effect */
.spark-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 3;
}

/* Shine effect overlay */
.spark-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 40%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0.6) 55%,
            rgba(255, 255, 255, 0.3) 60%,
            rgba(255, 255, 255, 0.1) 70%,
            transparent 80%);
    transform: translateX(-100%) translateY(-100%);
    animation: shine 4s ease-in-out infinite;
    will-change: transform;
}

/* Additional subtle shine overlay for depth */
.spark-container::after {
    content: '';
    position: absolute;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: linear-gradient(120deg,
            transparent 20%,
            rgba(255, 255, 255, 0.05) 35%,
            rgba(255, 255, 255, 0.15) 50%,
            rgba(255, 255, 255, 0.05) 65%,
            transparent 80%);
    transform: translateX(-120%) translateY(-120%);
    animation: shineSecondary 6s ease-in-out infinite;
    animation-delay: -2s;
    will-change: transform;
}

/* Enhanced content wrapper overlay for additional shine layers */
.content-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
            transparent 0%,
            rgba(255, 255, 255, 0.03) 25%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.03) 75%,
            transparent 100%);
    opacity: 0.8;
    z-index: 2;
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes backgroundPulse {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes sparkleOptimized {
    0% {
        transform: translate3d(0px, 0px, 0) scale(1);
    }

    100% {
        transform: translate3d(-280px, 0px, 0) scale(1);
    }
}

@keyframes shine {

    0%,
    100% {
        transform: translateX(-100%) translateY(-100%);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    20% {
        transform: translateX(-80%) translateY(-80%);
        opacity: 1;
    }

    40% {
        transform: translateX(-20%) translateY(-20%);
        opacity: 1;
    }

    60% {
        transform: translateX(40%) translateY(40%);
        opacity: 1;
    }

    80% {
        transform: translateX(100%) translateY(100%);
        opacity: 1;
    }

    90%,
    100% {
        transform: translateX(120%) translateY(120%);
        opacity: 0;
    }
}

@keyframes shineSecondary {

    0%,
    100% {
        transform: translateX(-120%) translateY(-120%);
        opacity: 0;
    }

    15% {
        opacity: 0.5;
    }

    25% {
        transform: translateX(-90%) translateY(-90%);
        opacity: 0.8;
    }

    50% {
        transform: translateX(-10%) translateY(-10%);
        opacity: 0.6;
    }

    75% {
        transform: translateX(70%) translateY(70%);
        opacity: 0.4;
    }

    85% {
        transform: translateX(100%) translateY(100%);
        opacity: 0.2;
    }

    95%,
    100% {
        transform: translateX(130%) translateY(130%);
        opacity: 0;
    }
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0.3;
        filter: brightness(1);
    }

    50% {
        opacity: 0.6;
        filter: brightness(1.1);
    }
}

/* Featured Game Item - General Styles */
.featured-game-list .game-item {
    position: relative;
    max-width: none;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: row;
    gap: 3rem;
    margin-bottom: 4rem;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    overflow: visible;
    border-radius: 0;
    transition: none;
    align-items: stretch;
}

.featured-game-list .game-item::before {
    display: none;
}

.featured-game-list .game-item:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

/* Game Info Container - Right Side Layout */
.game-info-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 60%;
    gap: 2rem;
}

/* Game Info - Top Right Text */
.featured-game-list .game-info {
    position: relative;
    width: 100%;
    background: transparent;
    padding: 2.5rem;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    z-index: 3;
    flex-grow: 1;
    /* Always visible - remove any transform hiding */
    transform: translateY(0);
    opacity: 1;
    /* Ensure consistent padding */
    box-sizing: border-box;
}

.featured-game-list .game-item:hover .game-info {
    border-color: rgba(255, 23, 68, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(255, 23, 68, 0.15);
}

.featured-game-list .game-info h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 1.5rem 0;
    background: linear-gradient(135deg, #ffffff 0%, #ff1744 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: left;
    line-height: 1.2;
    transition: all 0.3s ease;
    /* Always visible */
    opacity: 1;
}

.featured-game-list .game-item:hover .game-info h3 {
    background: linear-gradient(135deg, #ff1744 0%, #ff6b7a 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateX(5px);
}

.featured-game-list .game-info p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    text-align: left;
    transition: all 0.3s ease;
    /* Always visible */
    opacity: 1;
}

.featured-game-list .game-item:hover .game-info p {
    color: rgba(255, 255, 255, 0.95);
    transform: translateX(3px);
}

/* Featured Badges - Bottom Right */
.featured-badges {
    width: 100%;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: flex-start;
    /* Always visible */
    opacity: 1;
    transform: translateY(0);
}

/* Steam Button */
.steam-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid rgba(102, 192, 244, 0.3);
    box-shadow: 0 10px 30px rgba(27, 40, 56, 0.4);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.steam-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 192, 244, 0.2), transparent);
    transition: left 0.5s;
}

.steam-button:hover::before {
    left: 100%;
}

.steam-button:hover {
    background: linear-gradient(135deg, #2a475e 0%, #66c0f4 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 192, 244, 0.3);
    border-color: rgba(102, 192, 244, 0.6);
}

.steam-button i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.steam-button:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* Game Badge */
.featured-badges .game-badge {
    position: relative;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #ff1744 0%, #ff4757 100%);
    color: var(--color-white);
    font-size: 1rem;
    font-weight: 700;
    border-radius: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 25px rgba(255, 23, 68, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: pulse 2s infinite;
    text-align: center;
    white-space: nowrap;
    flex-shrink: 0;
    /* Always visible */
    opacity: 1;
    transform: translateX(0);
}

.featured-badges .game-badge::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff1744, #ff4757, #ff1744);
    border-radius: 15px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite alternate;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 23, 68, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 23, 68, 0.6);
    }
}

@keyframes borderGlow {
    0% {
        opacity: 0.5;
        filter: blur(0px);
    }

    100% {
        opacity: 1;
        filter: blur(2px);
    }
}

/* Status Indicator */
.game-status {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 0, 0, 0.85);
    color: #00ff88;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 255, 136, 0.3);
    z-index: 4;
    animation: statusPulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
    /* Always visible */
    opacity: 1;
}

.featured-game-list .game-item:hover .game-status {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.6);
    color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

@keyframes statusPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(0, 255, 136, 0);
    }
}

/* Animation classes for featured section */
.featured-game-list.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.featured-game-list.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

#games h2.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#games h2.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Individual game item animations */
.featured-game-list .game-item.animate-on-scroll {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.featured-game-list .game-item.animate-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Staggered animations for game item children */
.featured-game-list .game-item .content-wrapper.animate-on-scroll {
    opacity: 0;
    transform: translateX(-50px) rotateY(-15deg);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: 0.1s;
}

.featured-game-list .game-item .content-wrapper.animate-visible {
    opacity: 1;
    transform: translateX(0) rotateY(0deg);
}

.featured-game-list .game-item .game-info.animate-on-scroll {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: 0.2s;
}

.featured-game-list .game-item .game-info.animate-visible {
    opacity: 1;
    transform: translateX(0);
}

.featured-game-list .game-item .featured-badges.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: 0.3s;
}

.featured-game-list .game-item .featured-badges.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced shine effect for animated entrance */
.featured-game-list .game-item.animate-visible .spark-container::before {
    animation-delay: 0.6s;
}

.featured-game-list .game-item.animate-visible .spark-container::after {
    animation-delay: 0.8s;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .featured-game-list {
        padding: 2.5rem 1.5rem;
        max-width: 1000px;
    }

    .featured-game-list .game-item {
        gap: 2.5rem;
    }

    .content-wrapper {
        width: 45%;
        height: 450px;
    }

    .game-info-container {
        width: 55%;
        gap: 1.5rem;
    }



    .featured-game-list .game-info {
        padding: 2rem;
        /* Ensure equal left and right padding */
        box-sizing: border-box;
    }

    .featured-game-list .game-info h3 {
        font-size: 2rem;
    }

    .featured-game-list .game-info p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .steam-button {
        font-size: 1rem;
        padding: 1.1rem 1.75rem;
    }
}

@media (max-width: 900px) {
    .featured-game-list {
        padding: 2rem 1.25rem;
    }

    .featured-game-list .game-item {
        gap: 2rem;
    }

    .content-wrapper {
        width: 100%;
        max-width: 450px;
        height: 350px;
        margin: 0 auto;
    }

    .game-info-container {
        width: 100%;
        max-width: 550px;
        margin: 0 auto;
        gap: 1.5rem;
    }

    .featured-game-list .game-item {
        flex-direction: column;
        align-items: center;
        margin-bottom: 2.5rem;
    }

    .featured-game-list .game-info {
        padding: 1.75rem 2rem;
        text-align: center;
        /* Ensure consistent horizontal padding */
        box-sizing: border-box;
        margin: 0 auto;
        width: 100%;
    }

    .featured-game-list .game-info h3 {
        font-size: 1.9rem;
        text-align: center;
        padding: 0;
        margin: 0 0 1.5rem 0;
    }

    .featured-game-list .game-info p {
        font-size: 0.98rem;
        text-align: center;
        padding: 0;
        max-width: 100%;
        margin: 0;
    }

    .featured-badges {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1.25rem;
    }

    .steam-button {
        font-size: 0.95rem;
        padding: 1.05rem 1.6rem;
        min-width: 220px;
        max-width: 320px;
    }

    .featured-badges .game-badge {
        font-size: 0.9rem;
        padding: 0.85rem 1.3rem;
        min-width: 130px;
    }
}

@media (max-width: 768px) {
    #games {
        padding: 2rem 0;
        margin-top: -10px;
    }

    #games::after {
        background-size: 220px 180px;
        animation-duration: 20s;
        opacity: 0.2;
    }

    .featured-game-list {
        padding: 1.5rem 1rem;
        max-width: 100%;
    }

    .featured-game-list .game-item {
        flex-direction: column;
        gap: 1.5rem;
        margin-bottom: 2rem;
        align-items: center;
    }

    .content-wrapper {
        width: 100%;
        max-width: 400px;
        height: 300px;
        border-radius: 15px;
    }

    .game-info-container {
        width: 100%;
        max-width: 500px;
        gap: 1.5rem;
    }

    .featured-game-list .game-info {
        padding: 1.5rem 2rem;
        border-radius: 15px;
        text-align: center;
        margin: 0 auto;
        box-sizing: border-box;
        width: 100%;
    }

    .featured-game-list .game-info h3 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
        text-align: center;
        padding: 0;
    }

    .featured-game-list .game-info p {
        font-size: 0.95rem;
        text-align: center;
        line-height: 1.6;
        padding: 0;
        margin: 0 auto;
        max-width: 100%;
    }

    .featured-badges {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
        width: 100%;
    }

    .steam-button {
        font-size: 0.9rem;
        padding: 1rem 1.5rem;
        flex: 1;
        min-width: 200px;
        max-width: 300px;
        text-align: center;
    }

    .featured-badges .game-badge {
        font-size: 0.85rem;
        padding: 0.8rem 1.2rem;
        min-width: 120px;
        text-align: center;
    }

    .game-status {
        top: 1rem;
        left: 1rem;
        font-size: 0.75rem;
        padding: 0.6rem 1rem;
    }

    /* Disable heavy animations on mobile for better performance */
    .spark-container::before,
    .spark-container::after {
        animation-duration: 8s;
    }

    .content-wrapper::before {
        animation-duration: 12s;
    }
}

@media (max-width: 480px) {
    #games {
        padding: 1.5rem 0;
    }

    #games::after {
        background-size: 120px 100px;
        animation-duration: 15s;
        opacity: 0.15;
    }

    .featured-game-list {
        padding: 1rem 0.5rem;
    }

    .featured-game-list .game-item {
        gap: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .content-wrapper {
        height: 250px;
        border-radius: 12px;
        max-width: 100%;
    }

    .game-info-container {
        gap: 1.25rem;
        width: 100%;
        padding: 0 0.5rem;
    }

    .featured-game-list .game-info {
        padding: 1.25rem 1.5rem;
        border-radius: 12px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .featured-game-list .game-info h3 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
        line-height: 1.2;
        padding: 0;
    }

    .featured-game-list .game-info p {
        font-size: 0.875rem;
        line-height: 1.5;
        padding: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .featured-badges {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .steam-button {
        font-size: 0.8rem;
        padding: 0.9rem 1.25rem;
        width: 100%;
        max-width: 280px;
        min-width: unset;
    }

    .featured-badges .game-badge {
        font-size: 0.75rem;
        padding: 0.7rem 1rem;
        min-width: unset;
        width: auto;
    }

    .game-status {
        font-size: 0.7rem;
        padding: 0.5rem 0.8rem;
        top: 0.75rem;
        left: 0.75rem;
    }

    /* Further reduce animations on small mobile for performance */
    .spark-container::before,
    .spark-container::after {
        animation-duration: 12s;
        opacity: 0.3;
    }

    .content-wrapper::before {
        animation-duration: 16s;
        opacity: 0.4;
    }

    /* Simplify hover effects on mobile */
    .featured-game-list .game-item:hover .game-info h3,
    .featured-game-list .game-item:hover .game-info p {
        transform: none;
    }
}

@media (max-width: 360px) {
    .featured-game-list {
        padding: 0.75rem 0.25rem;
    }

    .content-wrapper {
        height: 220px;
        border-radius: 10px;
    }

    .game-info-container {
        padding: 0 0.25rem;
    }

    .featured-game-list .game-info {
        padding: 1rem 1.25rem;
        border-radius: 10px;
    }

    .featured-game-list .game-info h3 {
        font-size: 1.3rem;
    }

    .featured-game-list .game-info p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .steam-button {
        font-size: 0.75rem;
        padding: 0.8rem 1rem;
        max-width: 250px;
    }

    .featured-badges .game-badge {
        font-size: 0.7rem;
        padding: 0.6rem 0.8rem;
    }
}

/* Enhanced hover effects for desktop */
@media (min-width: 769px) {
    .featured-game-list .game-item:hover .steam-button {
        transform: translateY(-3px);
        box-shadow: 0 15px 40px rgba(102, 192, 244, 0.4);
    }

    .featured-game-list .game-item:hover .featured-badges .game-badge {
        animation-duration: 1s;
        transform: translateY(-3px);
    }
}


/* Enhanced hover effects for desktop */
@media (min-width: 769px) {
    .featured-game-list .game-item:hover .steam-button {
        transform: translateY(-3px);
        box-shadow: 0 15px 40px rgba(102, 192, 244, 0.4);
    }

    .featured-game-list .game-item:hover .featured-badges .game-badge {
        animation-duration: 1s;
        transform: translateY(-3px);
    }
}