body {
    background: linear-gradient(180deg, #ffd1e1, #ffffff);
    background-size: cover;
    margin: 0;
    font-family: 'Fredoka', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 110vh;
}


.main-container {
    display: flex;
    flex-direction: column;
    /* Maintain vertical layout */
    width: 100%;
    /* Take full width of the viewport */
    height: auto;
    /* Adjust height dynamically */
    margin: 0;
    /* Remove default margins */
    padding: 0;
    /* Remove default padding */
    box-sizing: border-box;
    /* Ensure padding/border doesn't affect size */
    align-items: center;
}


p {
    margin-bottom: 5px;
    margin-top: 5px;
}


.container-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: auto;
}

/* Scrollable Container */
.scrollable-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: auto;
    aspect-ratio: 1131 / 771;
    background: url('background.png') no-repeat center center / cover;
    border-radius: 10px;
    overflow: visible;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .scrollable-container {
        max-width: 85%;
        /* Smaller for mobile */
        background: url('background3.png') no-repeat center center / cover;
        aspect-ratio: 2000 / 3100;
    }

    .tabs {
        left: -40px;
        /* Adjust for visibility */
    }
}

@media (max-width: 480px) {
    .scrollable-container {
        max-width: 80%;
        /* Very small for small devices */
    }

    .tabs {
        left: -30px;
        /* Closer to container edge */
        width: 30px;
        height: 60px;
    }

    .tab {
        line-height: 60px;
        /* Adjust text alignment */
        font-size: 12px;
        /* Smaller text for small tabs */
    }
}

/* Tabs */
.tabs {
    position: absolute;
    top: 50%;
    left: -61px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tab {
    width: 80px;
    height: 84px;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative; /* Added for counter positioning */
}

.tab img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tab-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff4081;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tab-counter.visible {
    opacity: 1;
}

.tab.active {
    transform: scale(1.2);
    margin-left: -8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (max-width: 480px) {

    /* Adjust the breakpoint as needed */
    .tabs {
        top: 30%;
        /* Adjusted alignment for mobile */
        left: -22px;
        /* Adjusted position for mobile */
        gap: 0.5rem;
    }

    .tab {
        width: 30px;
        /* Smaller size for mobile */
        height: 33px;
        /* Smaller size for mobile */
    }

    .tab.active {
        margin-left: -3px;
        /* Adjusted active margin for mobile */
    }
}

@media (min-width: 480px) and (max-width: 580px) {
    .tabs {
        left: -25px;
    }

    .tab {
        width: 35px;
        height: 37px;
    }

    .tab.active {
        margin-left: -2px;
    }

}

@media (min-width: 580px) and (max-width: 768px) {
    .tabs {
        left: -32px;
    }

    .tab {
        width: 45px;
        height: 48px;
    }

    .tab.active {
        margin-left: -4px;
    }
}

@media (min-width: 768px) and (max-width: 850px) {
    .tabs {
        left: -39px;
    }

    .tab {
        width: 55px;
        height: 58px;
    }

    .tab.active {
        margin-left: -5px;
    }
}

@media (min-width: 850px) and (max-width: 1024px) {
    .tabs {
        left: -47px;
    }

    .tab {
        width: 65px;
        height: 69px;
    }

    .tab.active {
        margin-left: -6px;
    }
}

.tab:hover {
    background-color: #aaa;
}

/* Scrollable Content */
.scrollable-content {
    scroll-behavior: smooth;
    position: absolute;
    top: 30px;
    left: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 60px);
    overflow-y: auto;
    padding: 10px;
    border-radius: 10px;
    box-sizing: border-box;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .row,
    .row.tab3,
    .row.row3,
    .row.row4 {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }
    .grid-image,
    .tab3-grid-image,
    .grid-image-large,
    .grid-image-pose {
        width: 100% !important;
        max-width: 100%;
        margin-bottom: 10px;
    }
    /* Adjust for tablets and smaller devices */
    .scrollable-content {
        top: 20px;
        /* Adjust spacing for smaller screens */
        height: calc(100% - 40px);
        /* Reduced height to fit better on small screens */
    }
    .scrollable-container {
        background: url('background3.png') no-repeat center center / cover;
        aspect-ratio: 2000 / 3100; /* Adjusted for taller background */
    }
}

@media (max-width: 480px) {

    /* Adjust for very small devices like phones */
    .scrollable-content {
        top: 15px;
        /* Further reduce spacing for phones */
        height: calc(100% - 30px);
        /* Further reduce height */
    }
}

/* Rows */
.row {
    display: flex;
    justify-content: center;
}

.row.tab3 {
    gap: 10px;
    margin-bottom: 10px;
}

/* Images */
.grid-image {
    width: calc(33% - 10px);
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.grid-image-pose {
    width: 45%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab3-grid-image {
    width: 45%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.grid-image-large {
    width: 95%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Selected state styles with enhanced effects */
.grid-image[data-selected="true"],
.grid-image-pose[data-selected="true"],
.tab3-grid-image[data-selected="true"],
.grid-image-large[data-selected="true"] {
    transform: scale(1.08);
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.3);
    border: 3px solid #ff4081;
    border-radius: 12px;
    position: relative;
    z-index: 1;
    animation: selectedPulse 2s infinite;
}

@keyframes selectedPulse {
    0% {
        box-shadow: 0 8px 16px rgba(255, 64, 129, 0.3);
    }
    50% {
        box-shadow: 0 12px 20px rgba(255, 64, 129, 0.5);
    }
    100% {
        box-shadow: 0 8px 16px rgba(255, 64, 129, 0.3);
    }
}

/* Warning message enhanced styles */
#warning-message {
    background-color: #ffc3c3;
    color: rgb(255, 255, 255);
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    margin: 15px auto;
    max-width: 80%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: warningPulse 1s infinite;
    z-index: 1000;
}

@keyframes warningPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Hover effect for all images */
.grid-image:hover,
.grid-image-pose:hover,
.tab3-grid-image:hover,
.grid-image-large:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Ensure smooth transitions */
.grid-image,
.grid-image-pose,
.tab3-grid-image,
.grid-image-large {
    transition: all 0.3s ease;
}

/* Hide scrollbar for WebKit browsers (Chrome, Safari, Edge) */
.scrollable-content::-webkit-scrollbar {
    display: none;
    /* Completely hide the scrollbar */
}

/* Hide scrollbar for Firefox */
.scrollable-content {
    scrollbar-width: none;
    /* Hides scrollbar for Firefox */
}

/* Prevent any visual remnants of the scrollbar */
.scrollable-content {
    -ms-overflow-style: none;
    /* Hides scrollbar for IE and Edge */
    overflow-y: scroll;
    /* Keep scroll functionality */
}

#tab1 {
    padding-bottom: 20px;
}

.row3 {
    gap: 0.5rem;
}

#tab2 {
    padding-bottom: 20px;
    padding-top: 10px;
}

#tab3 {
    padding-bottom: 20px;
    padding-top: 10px;
}

.row4 {
    gap: 0.5rem;
    padding-top: 10px;
}

/* .top {
    margin-top: 40px;
} */

/* User Input Section */
.user-input-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.user-input-section input {
    font-family: 'Fredoka', sans-serif;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 15px;
    margin-bottom: 10px;
    width: 300px;
    max-width: 90%;
    text-align: center;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

#generate-button {
    width: 128px;
    height: 43.33px;
    background-image: url('button.png');
    /* Path to your image */
    background-size: cover;
    /* Ensures the image covers the entire button */
    background-repeat: no-repeat;
    /* Prevents the image from repeating */
    background-position: center;
    /* Centers the image */
    border: none;
    /* Removes the default button border */
    cursor: pointer;
    /* Makes the button clickable */
    background-color: transparent;
    margin-bottom: 20px;
}

#generate-button:hover {
    filter: brightness(1.1);
    /* Brightens the button on hover for effect */
}

#generate-button:active {
    transform: scale(0.95);
    /* Scales the button up by 10% when clicked */
    filter: brightness(0.9);
    /* Dims the button slightly */
}

.logo {
    max-width: 300px;
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-top: 30px;
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slide-out {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(100%);
    }
}

#popup-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 70%;
}

.popup-card {
    display: none;
    position: relative;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
    padding: 10px;
    margin-bottom: 10px;
    max-width: 100%;
    transition: opacity 0.5s ease;
    opacity: 0;
}

.popup-card img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

.popup-card-content {
    display: flex;
    align-items: center;
}

.popup-card-content div {
    margin-left: 10px;
}

.popup-card h4 {
    margin: 0;
    font-size: 16px;
}

.popup-card p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.popup-text {
    font-size: 1em;
    color: #333;
    margin-top: 0.5em;
}

@media screen and (max-width: 768px) {
    .loading-text {
        font-size: 22px;
        /* Adjust this for smaller screens */
    }
}

body.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Sequence Container Styling */
#sequence-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
    max-width: 400px;
    width: 80%;
    height: auto;
    z-index: 1000;
    overflow: hidden;
    /* Ensures smoother transitions */
    align-items: center;
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
}

#step-1 {
    animation: pulse 1s infinite;
    /* Subtle animation */
    flex-direction: column;
    align-items: center;
    transform: translate(50%, -50%);
}

#step-2 {
    animation: pulse 1s infinite;
    /* Subtle animation */
    flex-direction: column;
    align-items: center;
}

.step img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    margin-top: 35px;
}

.step-image2 {
    margin-top: 15px !important;
    margin-bottom: 0px !important;
}

.step p {
    font-size: 1.25rem;
    color: #333;
    margin: 10px 0;
    margin-bottom: 40px;
    font-family: 'Fredoka', sans-serif;
}

@keyframes bounceIn {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        /* Start smaller but centered */
        opacity: 0;
    }

    60% {
        transform: translate(-50%, -50%) scale(1.1);
        /* Slightly larger */
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        /* Fully centered and normal size */
    }
}

@keyframes bounceOut {
    0% {
        transform: scale(1);
        /* Start at normal size */
        opacity: 1;
        /* Fully visible */
    }

    50% {
        transform: scale(0.9);
        /* Slight shrink */
        opacity: 0.5;
        /* Begin fading out */
    }

    100% {
        transform: scale(0);
        /* Completely shrink */
        opacity: 0;
        /* Fully invisible */
    }
}

.bounce-out {
    animation: bounceOut 0.6s ease forwards;
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

.hidden {
    display: none !important;
}

@keyframes bounceIn2 {
    0% {
        transform: scale(0.5);
        /* Start smaller but centered */
        opacity: 0;
    }

    60% {
        transform: scale(1.1);
        /* Slightly larger */
        opacity: 1;
    }

    100% {
        transform: scale(1);
        /* Fully centered and normal size */
    }
}



.bounce-in2 {
    animation: bounceIn2 0.8s ease-out;
}



/* Step 3 Styling */
#step-3 {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
}

#step-3 h3 {
    font-size: 1.5rem;
    font-family: 'Fredoka', sans-serif;
    margin-bottom: 30px;
    text-align: center;
    margin-top: 0px;
    font-weight: 400px;
}

#step-3-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Creates 2 columns */
    gap: 10px;
    /* Adjust the spacing between buttons */
    justify-content: center;
    align-items: center;
    max-width: 300px;
    /* Set a max width to keep buttons aligned */
    margin: 0 auto;
    /* Center the grid */
}


.btn {
    font-size: 28px;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    height: 70px;
    border: 0.5px solid #e9e9e9;
    background: white;
}

.wide {
    grid-column: span 2;
    height: 40px;
    font-size: 20px;
}

.continue-button {
    width: 160px;
    height: 52px;
    background-image: url('continue.png');
    /* Path to your image */
    background-size: cover;
    /* Ensures the image covers the entire button */
    background-repeat: no-repeat;
    /* Prevents the image from repeating */
    background-position: center;
    /* Centers the image */
    border: none;
    /* Removes the default button border */
    cursor: pointer;
    /* Makes the button clickable */
    background-color: transparent;
    margin-top: 20px;

}

.continue-button:hover {
    transform: scale(1.1);

}

.btn:hover {
    transform: scale(1.05);

}

button.selected {
    background: linear-gradient(to bottom, #ffd5f1, #ff90df);
    color: white;
    border: 4px solid #e62c9c;
}

#step-4 {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
}

#step-5 {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
}

#step-5-text {
    margin-bottom: 20px !important;
}

#step-4-text {
    margin-bottom: 20px !important;
}

#loading-bar-container {
    width: 78%;
    height: 10px;
    background: #ddd;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

#loading-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, #c1c1c1, #c1c1c1);
    transition: width 3s linear;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.rotating-cog {
    animation: spin 3s linear infinite;
    width: 80px !important;
    height: 80px !important;
    margin-bottom: 15px !important;
    margin-top: 35px !important;

}

#step-10-text {
    margin-bottom: 10px !important;
}

.verify {
    margin-bottom: 30px;
    margin-top: 15px;
}

#notification-container {
    position: relative;
    /* Changed from fixed to relative */
    margin-top: 10px;
    margin-bottom: 20px;
    width: 75%;
    height: 300px;
    overflow-y: auto;
    background: rgba(252, 252, 252, 0);
    padding: 10px;
    border-radius: 8px;
    color: white;
}



.notification-card {
    color: #333;
    position: relative;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
    padding: 10px;
    margin-bottom: 10px;
    width: auto;
    transition: opacity 0.5s ease-in-out;
}

.notification img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
}

.popup-card {
    transition: opacity 0.5s ease;
    /* Additional styling as needed */
}

.profile-pic {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-right: 10px;
    object-fit: cover;
}

.popup-card-content {
    display: flex;
    align-items: center;
}

.popup-text {
    font-size: 1em;
    color: #333;
}

.verify-button {
    width: 100px;
    height: 33px;
    background-image: url('verify.png');
    /* Path to your image */
    background-size: cover;
    /* Ensures the image covers the entire button */
    background-repeat: no-repeat;
    /* Prevents the image from repeating */
    background-position: center;
    /* Centers the image */
    border: none;
    /* Removes the default button border */
    cursor: pointer;
    /* Makes the button clickable */
    background-color: transparent;
    margin-top: 5px;
    margin-bottom: 20px;
}

.step10before img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    margin-top: 35px;
}

.step10before p {
    font-size: 1.25rem;
    color: #333;
    margin: 10px 0;
    margin-bottom: 40px;
    font-family: 'Fredoka', sans-serif;
}

.step10before {
    margin-bottom: 20px
}

.step10after img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    margin-top: 35px;
}

.step10after p {
    font-size: 1.25rem;
    color: #333;
    margin: 10px 0;
    margin-bottom: 40px;
    font-family: 'Fredoka', sans-serif;
}

.step10after {
    margin-bottom: 0px
}

/* Scroll message */
.scrollable-container::after {
    content: 'Scroll for more items';
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    white-space: nowrap;
    color: white;
    font-size: 1.1em;
    text-align: center;
    padding: 8px 16px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    animation: scrollIndicator 2s infinite;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease;
}

/* Show message only when at top */
.scrollable-container.show-scroll-message::after {
    opacity: 0.9;
}

/* Separate arrow indicator */
.scrollable-container::before {
    content: '';
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23FFFFFF"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"/></svg>') no-repeat center center;
    background-size: contain;
    animation: scrollIndicator 2s infinite;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5));
    transition: opacity 0.3s ease;
}

/* Show arrow only when at top */
.scrollable-container.show-scroll-message::before {
    opacity: 0.9;
}

/* Add gradient fade at bottom */
.scrollable-container .gradient-fade {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
    pointer-events: none;
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show gradient when at top */
.scrollable-container.show-scroll-message .gradient-fade {
    opacity: 1;
}

@keyframes scrollIndicator {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(15px);
    }
}

/* Hide scroll indicators when at bottom */
.scrollable-container.at-bottom::after,
.scrollable-container.at-bottom::before,
.scrollable-container.at-bottom .gradient-fade {
    display: none;
}
