/*
 * This CSS file contains styles for the battle page.
 * It includes responsive design rules to ensure proper display on different screen sizes,
 * styles for the main layout, and specific elements such as the game-over content.
 * The file ensures a consistent look and feel across various devices.
 */


@media (max-width: 768px) {

    .openCloseAside {
        display: flex !important;
    }

    body {
        overflow-y: hidden !important;
    }

    main {
        padding: 0px !important;
    }

    .game-over-content {
        max-width: 100% !important;
    }
}

@media (max-height: 760px) {
    main {
        position: relative;
        top: -0px;
    }

    .status-bar {
        position: absolute;
    }

    .player-cards {
        padding-top: 20px;
    }
}

@media (max-height: 680px) {
    main {
        position: relative;
        top: -90px !important;
    }
}

html {
    overflow: hidden;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif;
    background-color: #eff3ff;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    justify-content: space-between;
    overflow: hidden;
    /* Prevent scrollbars from appearing */
    position: relative;
    /* Ensure background layers align properly */
}

/* Cool animated background container */
.animated-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Place behind content */
    background: linear-gradient(135deg, #4facfe, #00f2fe, #43e97b, #f8ff00);
    background-size: 400% 400%;
    animation: gradientBackground 15s ease infinite;
    pointer-events: none;
    /* Prevent interaction with the background */
}

/* Gradient animation */
@keyframes gradientBackground {
    0% {
        background-position: 0% 50%;
    }

    25% {
        background-position: 50% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    75% {
        background-position: 50% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Star styling */
.star {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: white;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    /* Glow effect */
    animation: twinkle 3s infinite ease-in-out;
    z-index: 1;
    /* Above the gradient */
}

/* Twinkle effect */
@keyframes twinkle {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Overlay effects */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    /* Slightly above gradient but below content */
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 70%);
    animation: overlayRotate 20s linear infinite;
}

@keyframes overlayRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    z-index: 1;
}

/* Opponent's cards */
.opponent-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 160px;
    z-index: 2;
}

/* Player's cards */
.player-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 110px;
    z-index: 3;
}

/* Card styling */
.card {
    background-color: white;
    border: 2px solid #333;
    border-radius: 8px;
    width: 100px;
    height: 150px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: absolute;
    transform: rotate(var(--rotation)) translateX(var(--offsetX)) scale(0);

    .front {
        display: block;
        height: 100%;
        width: 100%;
        position: absolute;
        overflow: hidden;
        opacity: 1;
        transition: transform 0.5s ease-in-out, opacity 0.25s ease-in-out;
        transform: rotateY(0deg);

        .hp {
            text-align: center;
            margin-top: 8px;
            padding: 8px;
            border-radius: 30px;
            margin-left: auto;
            margin-right: auto;
            font-size: 14px;
            font-weight: 400;

            span {
                font-size: 14px;
                letter-spacing: 0.4px;
                font-weight: 600;
            }
        }

        .poke-img {
            display: block;
            width: 40px;
            max-height: 200px;
            position: relative;
            margin: 20px auto;
        }

        .poke-name {
            font-size: 10px;
            text-align: center;
            font-weight: 600;
        }
    }

    .back {
        display: flex;
        justify-content: space-between;
        flex-direction: column-reverse;
        height: 100%;
        width: 100%;
        opacity: 0;
        position: absolute;
        transition: transform 0.5s ease-in-out, opacity 0.25s ease-in-out;
        transform: rotateY(180deg);
        overflow: hidden;

        .types {
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 5px;
            align-items: center;
            margin: 0px 0 5px 0;

            span {
                width: auto;
                font-size: 12px;
                letter-spacing: 0.4px;
                font-weight: 600;
                text-transform: capitalize;

                padding: 5px 20px;
                border-radius: 20px;
                color: #ffffff;
            }
        }

        .stats {
            padding: 5px;
            display: grid;
            grid-template-columns: 1fr 1fr;
            grid-template-rows: auto auto;
            grid-template-areas:
                "col1 col2"
                "col3 col3";
            gap: 10px;
            align-items: center;
            justify-content: space-between;
            text-align: center;

            .col1 {
                grid-area: col1;
            }

            .col2 {
                grid-area: col2;
            }

            .col3 {
                grid-area: col3;
            }

            p {
                font-size: 10px;
                color: #404060;
            }
        }
    }
}

.card:hover {
    transform: rotate(var(--rotation)) translateX(var(--offsetX)) translateY(-10px) scale(1.1);
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.card.card-scaled:hover {
    transform: rotate(var(--rotation)) translateX(var(--offsetX)) translateY(-20px) scale(1.1);
}

.opponent-cards .card.card-scaled:hover {
    transform: rotate(var(--rotation)) translateX(var(--offsetX)) translateY(20px) scale(1.1);
}

.card.active {

    .front {
        opacity: 0 !important;
        transform: rotateY(180deg) !important;
    }

    .back {
        opacity: 1 !important;
        transform: rotateY(0deg) !important;
    }
}

.card.card-scaled {
    transform: rotate(var(--rotation)) translateX(var(--offsetX)) scale(1);
}

/* Battlefield Section */
.battlefield {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    /* Each column is 100px wide */
    grid-template-rows: repeat(2, 150px);
    /* Each row is 150px tall */
    gap: 15px;
    margin: 30px auto;
    background: radial-gradient(circle, #f7d02c, #333);
    border-radius: 12px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.3);
    padding: 15px;
    position: relative;
    justify-content: center;
    align-items: center;
    transform: scale(0);
}

/* Grid Cells */
.grid-cell {
    background-color: rgba(255, 255, 255, 0.9);
    width: 100px;
    /* Match card width */
    height: 150px;
    /* Match card height */
    border: 2px solid #f7d02c;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

/* Hover Effect for Grid Cells */
.grid-cell:hover {
    background-color: #ffcb05;
    /* Pokémon yellow */
    transform: scale(1.1);
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.card {
    position: absolute;
    transition: transform 0.3s ease, box-shadow 0.3s ease, top 0.2s, left 0.2s;
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-10deg);
    }

    50% {
        transform: rotate(10deg);
    }

    75% {
        transform: rotate(-10deg);
    }
}

@keyframes attack {
    0% {
        transform: translate(0, 0) scale(1);
        /* Start at original position */
    }

    30% {
        transform: translate(30px, 30px) scale(1.1) skew(-3deg, -3deg);
        /* Start moving and enlarge slightly */
    }

    50% {
        transform: translate(60px, 60px) scale(1.2);
        /* Peak movement and size */
    }

    70% {
        transform: translate(40px, 40px) scale(1.15) skew(5deg, 5deg);
        /* Slight recoil effect */
    }

    100% {
        transform: translate(0, 0) scale(1);
        /* Return to original position and size */
    }
}

@keyframes hit {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
        box-shadow: none;
    }

    20% {
        transform: translate(-30px, -30px) scale(0.9);
        opacity: 0.8;
        box-shadow: 0 0 10px 5px rgba(255, 0, 0, 0.5);
        /* Red glow */
    }

    40% {
        transform: translate(5px, 5px) scale(1.1);
        opacity: 1;
        box-shadow: 0 0 15px 7px rgba(255, 0, 0, 0.7);
        /* Stronger red glow */
    }

    60% {
        transform: translate(-10px, -10px) scale(1.05);
        box-shadow: 0 0 10px 5px rgba(255, 0, 0, 0.5);
        /* Return to soft red glow */
    }

    100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
        box-shadow: none;
        /* Restore original state */
    }
}

@keyframes scaleInCards {
    0% {
        transform: rotate(var(--rotation)) translateX(var(--offsetX)) scale(0);
    }

    100% {
        transform: rotate(var(--rotation)) translateX(var(--offsetX)) scale(1);
    }
}

@keyframes scaleInBatlefield {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}




/* Style for the turn popup */
.turn-popup {
    position: fixed;
    top: 50%;
    left: -50%;
    /* Start off-screen */
    transform: translate(-50%, -50%) scale(0.5);
    /* Start small */
    background: linear-gradient(135deg, #4caf50, #1e88e5);
    /* Cool gradient */
    color: #fff;
    padding: 30px 60px;
    /* Bigger padding */
    border-radius: 12px;
    /* Softer corners */
    font-size: 36px;
    /* Bigger text */
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    /* Spaced letters */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    /* Glowing effect */
    opacity: 0;
    z-index: 1000;
    pointer-events: none;
    /* Ensure it doesn't block interaction */
    width: 400px;
}

/* Keyframe for the popup animation */
@keyframes turnPopupAnimation {
    0% {
        left: 0%;
        /* Start off-screen */
        opacity: 0;
        transform: translate(-50%, -50%) scale(0) rotate(-10deg);
        /* Start small with rotation */
    }

    25% {
        opacity: 1;
        /* Fully visible */
    }

    50% {
        left: 50%;
        /* Move quickly to mid-left */
        opacity: 1;
        /* Fully visible */
        transform: translate(-50%, -50%) scale(1.5) rotate(0deg);
        /* Scale up */
    }

    75% {
        opacity: 1;
        /* Fully visible */
    }

    100% {
        left: 100%;
        /* End off-screen */
        opacity: 0;
        transform: translate(-50%, -50%) scale(0) rotate(10deg);
        /* Scale down with rotation */
    }
}


/* Damage display */
.damage-display {
    position: absolute;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    color: red;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.8), 0 0 10px rgba(255, 0, 0, 0.6);
    animation: damageFade 1.5s ease-in-out forwards;
    z-index: 1000;
}

/* Fade and move animation for damage */
@keyframes damageFade {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    50% {
        transform: translateY(-20px) scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: translateY(-40px) scale(0.9);
        opacity: 0;
    }
}

@keyframes defeatedAnimation {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    50% {
        transform: scale(1.2) rotate(15deg);
        opacity: 0.5;
    }

    100% {
        transform: scale(0) rotate(-30deg);
        opacity: 0;
    }
}

.card.defeated {
    animation: defeatedAnimation 1s ease-out forwards;
}


/* Game Over Overlay */
.game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.85) 40%, rgba(0, 0, 0, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeInOverlay 1s forwards;
    overflow: hidden;
    animation: fadeInOverlay 1s forwards;
}

/* Add subtle animated background */
.game-over-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 0, 150, 0.3), rgba(0, 150, 255, 0.3));
    mix-blend-mode: overlay;
    animation: backgroundShift 5s infinite alternate;
    z-index: 0;
}

/* Game Over Content */
.game-over-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #ffffff;
    animation: scaleInCool 1s ease-in-out;
    padding: 2rem;
    background: linear-gradient(145deg, #1f1f1f, #292929);
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    overflow: hidden;
    animation: scaleInCool 1s ease-in-out;
}

/* Winner Text */
.winner-text {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.winner-text.player {
    color: #ffcb05;
    text-shadow: 0 0 20px #ffcb05, 0 0 40px #ffcb05;
    animation: textGlowPlayer 2s infinite;
}

.winner-text.opponent {
    color: #ff0000;
    text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
    animation: textGlowOpponent 2s infinite;
}

/* Game Over Text */
.game-over-text {
    font-size: 1.5rem;
    color: #e0e0e0;
    margin-bottom: 2rem;
    letter-spacing: 1px;
    animation: textPulse 2s infinite alternate;
}

/* Scoreboard */
.scoreboard {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-around;
    gap: 1.5rem;
    z-index: 1;
}

.score {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid transparent;
    animation: glowingBorder 2s infinite alternate;
}

.score .label {
    font-size: 1.5rem;
    color: #ffcb05;
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.player-victories {
    font-size: 2rem;
    color: #4caf50; /* Green for victories */
    font-weight: bold;
    animation: scorePulse 2s infinite;
}

.opponent-victories {
    font-size: 2rem;
    color: #f44336; /* Red for defeats */
    font-weight: bold;
    animation: scorePulse 2s infinite;
}

/* Restart Button */
.restart-button {
    padding: 15px 30px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #000000;
    background-color: #ffcb05;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out, background-color 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
}

.restart-button:hover {
    transform: scale(1.1);
    background-color: #ffd738;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.restart-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease-out;
    z-index: -1;
}

.restart-button:hover::after {
    transform: translate(-50%, -50%) scale(1.5);
}

/* Animations */
@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleInCool {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes backgroundShift {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-10px, -10px);
    }
}

@keyframes glowingBorder {
    from {
        border-color: rgba(255, 255, 255, 0.3);
    }
    to {
        border-color: rgba(255, 255, 255, 0.8);
    }
}

@keyframes textPulse {
    from {
        opacity: 0.8;
        transform: scale(1);
    }
    to {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes textGlowPlayer {
    0%, 100% {
        text-shadow: 0 0 20px #ffcb05, 0 0 40px #ffcb05;
    }
    50% {
        text-shadow: 0 0 40px #ffcb05, 0 0 60px #ffcb05;
    }
}

@keyframes textGlowOpponent {
    0%, 100% {
        text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
    }
    50% {
        text-shadow: 0 0 40px #ff0000, 0 0 60px #ff0000;
    }
}

@keyframes scorePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}


/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    font-size: 12px;
    width: 100%;
    grid-column-start: 1;
    grid-column-end: 4;
}

.status-left,
.status-right {
    font-weight: bold;
}



/* Pokémon Popup Styles */
.pokemon-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    animation: fadeInOverlay 0.8s forwards;
}

.pokemon-popup.hidden {
    display: none;
    visibility: hidden;
}

.popup-content {
    text-align: center;
    color: #fff;
    background: linear-gradient(145deg, #1f1f1f, #292929);
    padding: 2.5rem;
    border-radius: 25px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    animation: popupBounce 0.9s ease-in-out;
    max-width: 600px;
    margin: auto;
}

.popup-content h1 {
    font-size: 3rem;
    font-weight: bold;
    color: #ffcb05;
    text-shadow: 0 0 10px #ffcb05, 0 0 20px #ffcb05;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.popup-message {
    font-size: 1.4rem;
    line-height: 2;
    color: #d1d5db;
    margin-bottom: 2.5rem;
}

.popup-message strong {
    color: #ffd700;
    font-weight: bold;
    text-shadow: 0 0 10px #ffd700;
}

.popup-message .highlight {
    color: #ffcb05;
    font-size: 1.5rem;
    text-shadow: 0 0 15px #ffcb05, 0 0 25px #ffcb05;
}


.catch-button {
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffffff;
    background-color: #ff0000;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out, background-color 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.catch-button:hover {
    transform: scale(1.1);
    background-color: #cc0000;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Popup Animation */
@keyframes popupBounce {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Tutorial Overlay */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    animation: fadeInOverlayTutorial 0.8s forwards;
}

/* Hide when not active */
.tutorial-overlay.hidden {
    display: none;
    visibility: hidden;
}

/* Tutorial Content */
.tutorial-content {
    text-align: center;
    color: white;
    background: linear-gradient(145deg, #1f1f1f, #292929);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
    max-width: 600px;
}

.tutorial-content h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700;
}

.tutorial-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.tutorial-button {
    padding: 15px 30px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #000000;
    background-color: #ffcb05;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out, background-color 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
}

.tutorial-button:hover {
    transform: scale(1.1);
    background-color: #ffd738;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.tutorial-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease-out;
    z-index: -1;
}

.tutorial-button:hover::after {
    transform: translate(-50%, -50%) scale(1.5);
}


.tutorial-button.tutorial-skip-button {
    color: #ffffff;
    background-color: #cc0000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out, background-color 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-left: 1rem;
}

.tutorial-button.tutorial-skip-button:hover {
    transform: scale(1.1);
    background-color: #ff0000;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Animations */
@keyframes fadeInOverlayTutorial {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popupBounceTutorial {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Transition Animation for Steps */
@keyframes slideOutLeft {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideInRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Transition Animation for Popup Close */
@keyframes fadeOutOverlayTutorial {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Adding classes for transitions */
.tutorial-content.slide-out {
    animation: slideOutLeft 0.5s forwards;
}

.tutorial-content.slide-in {
    animation: slideInRight 0.5s forwards;
}

.tutorial-overlay.fade-out {
    animation: fadeOutOverlayTutorial 0.8s forwards;
}

/* Container for side-by-side images */
.tutorial-images {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px; /* Add 20px gap between images */
}

/* Image styles */
.tutorial-image {
    width: auto;
    height: 200px; /* Fixed height */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

.tutorial-animation-icon {
    width: 100px;
    height: 100px;
    animation: float 2s infinite;
    margin-bottom: 2rem;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Floating Help Button */
.floating-help-btn {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 40px;
    height: 40px;
    background-color: #ffcb05; 
    color: #000;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.floating-help-btn:hover {
    transform: scale(1.2) rotate(15deg); 
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}