.phone-display {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    max-width: 450px; /* A reasonable max-width for a phone-like display */
    width: 80%; /* Take up 80% of its container's width */
    aspect-ratio: 540 / 1118;
    margin: 0 auto;
    border-radius: 15% / 7.5%; /* Added for rounded corners */
    overflow: hidden; /* Ensures video corners are rounded */
}

.phone-display video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0; /* Behind the phone frame */
}

@media (max-height: 1044px) {
    .phone-display video {
        width: 55%;
        height: 55%;
        object-fit: cover;
        z-index: 0; /* Behind the phone frame */
        border-radius: 15% / 7.5%;
    }
}

#info {
    background-image: url('assets/section-bg.png');
    background-position: center;
    background-size: cover;
    display: flex; /* Override .section's display */
    flex-direction: column; /* Override .section's flex-direction */
    justify-content: space-between; /* Distribute space between items */
    align-items: center; /* Center horizontally */
    padding-top: 50px; /* Add padding from top */
    padding-bottom: 50px; /* Add padding from bottom */
    box-sizing: border-box; /* Add this */
}

.info-top-content {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
    gap: 20px; /* Space between h1 and badges */
}

.info-bottom-content {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
    /* gap: 10px; */ 
}

.down-arrow {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999; /* Increase z-index */
    width: 50px; /* Adjust size as needed */
    height: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.down-arrow:hover {
    opacity: 1;
}

.video-screen-alignment {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0; /* Behind the phone frame */
    border-radius: 40px; /* Added for rounded corners */
}
#fp-nav ul li a span {
    background: rgba(255, 255, 255, 0.5) !important; /* Half-transparent for unfocused */
}

#fp-nav ul li a.active span {
    background: #fff !important; /* White for focused */
}
.menu-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    cursor: pointer;
    padding: 10px;
}

.menu-icon .line1,
.menu-icon .line2 {
    width: 35px;
    height: 3px;
    background-color: #fff;
    margin: 8px 0;
    transition: 0.4s;
}

.menu-icon.open .line1 {
    transform: rotate(-45deg) translate(-3.5px, 3.5px);
}

.menu-icon.open .line2 {
    transform: rotate(45deg) translate(-3.5px, -3.5px);
}

/* Overlay Menu */
.overlay-menu {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.9);
    overflow-x: hidden;
    transition: 0.5s;
    display: flex;
    flex-direction: column; /* Add this */
    justify-content: center;
    align-items: center;
}

.overlay-menu a {
    color: white;
}

.overlay-menu.open {
    width: 100%;
}

.overlay-menu ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.overlay-menu ul li {
    margin: 15px 0;
}

.overlay-menu ul li a {
    color: #fff;
    padding: 8px;
    text-decoration: none;
    font-size: 3em;
    display: block;
    transition: 0.3s;
    font-weight: 900; /* Make text bold */
}

.overlay-menu ul li a:hover,
.overlay-menu ul li a:focus {
    color: #009ffd;
}

.app-store-badge-in-menu {
    margin-bottom: 20px; /* Space from the bottom */
    margin-left: auto; /* Center horizontally */
    margin-right: auto; /* Center horizontally */
    display: block; /* Make it a block element to apply width and margin auto */
}

.social-icons {
    display: flex;
    justify-content: center;
    margin-top: 20px; /* Space from the App Store badge */
    gap: 15px; /* Space between icons */
}

.social-icons img {
    width: 40px; /* Size of social icons */
    height: 40px;
    border-radius: 50%; /* Make them circular */
    transition: transform 0.3s ease; /* Smooth hover effect */
}

.social-icons img:hover {
    transform: scale(1.1); /* Slightly enlarge on hover */
}

.social-icons-large {
    display: flex;
    justify-content: center;
    margin-top: 40px; /* More space from content above */
    gap: 25px; /* Larger space between icons */
    position: relative;
    z-index: 2;
}

.social-icons-large img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: filter 0.3s ease, transform 0.3s ease; /* Add filter to transition */
    filter: grayscale(100%) brightness(1.5); /* Grayish effect */
}

.social-icons-large img:hover {
    transform: scale(1.1); /* Slightly enlarge on hover */
}

.store-badge-large {
    display: block;
    width: 450px; /* Larger size for the badge */
    margin: 20px auto; /* Center it and add vertical spacing */
    position: relative; /* Ensure z-index works */
    z-index: 2; /* Place above the scrim */
}

.store-badge-large img {
    width: 100%; /* Make the image fill its parent .store-badge-large */
    height: auto; /* Maintain aspect ratio */
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'Raleway', sans-serif;
    color: #fff;
    margin: 0;
    overflow: hidden; /* Hide scrollbar */
}

.game-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    width: 75px; /* Adjust size as needed */
    height: auto;
    border-radius: 15px;
    border: 2px solid white;
}

.section {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    scroll-snap-align: start;
    width: 100%;
    height: calc(var(--vh, 1vh) * 100);
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent black scrim */
    z-index: 1; /* Behind text, above background */
}

.section h1 {
    font-size: clamp(2rem, 5vw, 6rem); /* Larger font size */
    font-weight: 900; /* Bolder */
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    line-height: 1.2; /* Add this */
    text-align: center;
}

.section p {
    font-size: 1.2em;
    max-width: 800px;
    line-height: 1.5;
    position: relative;
    z-index: 2;
    text-align: center; /* Re-added for centering text within the paragraph */
    margin: 0 auto; /* Center the paragraph element itself */
}

#home {
    background-image: url('assets/section-bg.png');
    background-position: center;
    background-size: cover; /* Add this */
    display: flex;
    justify-content: center;
    align-items: center;
}

#fullpage {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

.home-content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    gap: 20px;
    padding-top: 50px; /* Add this */
}

.left-content {
    flex: 1;
    padding-left: 4%;
    padding-right: 0%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.right-content {
    flex: 1;
    padding: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.store-badge {
    width: 150px; /* Revert to 150px */
}

#media {
    background-color: #485461;
    background-image: linear-gradient(315deg, #485461 0%, #28313b 74%);
}

#characters {
    background-image: url('assets/section-bg.png');
    background-position: center;
    background-size: cover;
}

.character-gallery {
    display: flex;
    flex-wrap: nowrap; /* Prevent wrapping */
    justify-content: flex-start; /* Align items to the start */
    align-items: center;
    gap: 20px;
    overflow-x: auto; /* Enable horizontal scrolling */
    scroll-snap-type: x mandatory; /* Add this */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    width: 90%; /* Add this */
    overscroll-behavior-x: contain; /* Add this */
    max-width: 1200px; /* Add this */
}

.character-gallery::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.character-gallery-wrapper {
    display: flex;
    align-items: center;
    justify-content: center; /* Center the whole wrapper */
    margin: 40px auto; /* Same margin as gallery */
    position: relative; /* For absolute positioning of arrows */
    width: 100%; /* Add this */
    max-width: 100%; /* Add this */
    overflow: hidden; /* Add this to contain its children */
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-arrow-left {
    left: 0;
}

.scroll-arrow-right {
    right: 0;
}

.scroll-arrow img {
    width: 30px; /* Size of the arrow image */
    height: 30px;
}

.scroll-arrow-left img {
    transform: rotate(90deg); /* Rotate for left arrow */
}

.scroll-arrow-right img {
    transform: rotate(-90deg); /* Rotate for right arrow */
}

.character-column {
    flex: 0 0 200px;
    max-width: 200px;
    text-align: center;
    color: #fff;
    border: 2px solid white;
    border-radius: 10px;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    min-height: 350px;
    scroll-snap-align: center; /* Add this */
    transition: transform 0.3s ease, filter 0.3s ease;
    z-index: 2;
}

.character-column:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.character-column h2 {
    font-size: 1.8em;
    margin-bottom: 15px;
    position: absolute; /* Ensure z-index works */
    z-index: 1; /* Place above the image */
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background for readability */
    padding: 5px 10px; /* Add some padding */
    border-radius: 5px; /* Slightly rounded corners */
    top: 10px; /* Position at the top */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Adjust for element's own width */
    margin-top: 0; /* Remove default margin */
    text-align: center;
}

.character-column img {
    position: absolute; /* Position absolutely within the column */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0; /* Place behind the text */
}

#info {
    background-image: url('assets/section-bg.png');
    background-position: center;
    background-size: cover;
    display: flex; /* Override .section's display */
    flex-direction: column; /* Override .section's flex-direction */
    justify-content: space-between; /* Distribute space between items */
    align-items: center; /* Center horizontally */
    padding-top: 50px; /* Add padding from top */
    padding-bottom: 50px; /* Add padding from bottom */
    box-sizing: border-box; /* Add this */
}

.info-top-content {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
    gap: 20px; /* Space between h1 and badges */
}

.info-bottom-content {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
    /* gap: 10px; */ 
}

.down-arrow {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999; /* Increase z-index */
    width: 25px; /* Adjust size as needed */
    height: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.down-arrow:hover {
    opacity: 1;
}


#fp-nav ul li a span {
    background: rgba(255, 255, 255, 0.5) !important; /* Half-transparent for unfocused */
}

#fp-nav ul li a.active span {
    background: #fff !important; /* White for focused */
}
.menu-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    cursor: pointer;
    padding: 10px;
}

.menu-icon .line1,
.menu-icon .line2 {
    width: 35px;
    height: 3px;
    background-color: #fff;
    margin: 8px 0;
    transition: 0.4s;
}

.menu-icon.open .line1 {
    transform: rotate(-45deg) translate(-3.5px, 3.5px);
}

.menu-icon.open .line2 {
    transform: rotate(45deg) translate(-3.5px, -3.5px);
}

/* Overlay Menu */
.overlay-menu {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.9);
    overflow-x: hidden;
    transition: 0.5s;
    display: flex;
    flex-direction: column; /* Add this */
    justify-content: center;
    align-items: center;
}

.overlay-menu.open {
    width: 100%;
}

.overlay-menu ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.overlay-menu ul li {
    margin: 15px 0;
}

.overlay-menu ul li a {
    color: #fff;
    padding: 8px;
    text-decoration: none;
    font-size: 3em;
    display: block;
    transition: 0.3s;
    font-weight: 900; /* Make text bold */
}

.overlay-menu ul li a:hover,
.overlay-menu ul li a:focus {
    color: #009ffd;
}

.app-store-badge-in-menu {
    margin-bottom: 20px; /* Space from the bottom */
    margin-left: auto; /* Center horizontally */
    margin-right: auto; /* Center horizontally */
    display: block; /* Make it a block element to apply width and margin auto */
}

.social-icons {
    display: flex;
    justify-content: center;
    margin-top: 20px; /* Space from the App Store badge */
    gap: 15px; /* Space between icons */
}

.social-icons img {
    width: 40px; /* Size of social icons */
    height: 40px;
    border-radius: 50%; /* Make them circular */
    transition: transform 0.3s ease; /* Smooth hover effect */
}

.social-icons img:hover {
    transform: scale(1.1); /* Slightly enlarge on hover */
}

.social-icons-large {
    display: flex;
    justify-content: center;
    margin-top: 40px; /* More space from content above */
    gap: 25px; /* Larger space between icons */
    position: relative; /* Ensure z-index works */
    z-index: 2;
}

.social-icons-large img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: filter 0.3s ease, transform 0.3s ease; /* Add filter to transition */
    filter: grayscale(100%) brightness(1.5); /* Grayish effect */
}

.social-icons-large img:hover {
    transform: scale(1.1); /* Slightly enlarge on hover */
}

.store-badge-large {
    display: block;
    width: 450px; /* Larger size for the badge */
    margin: 20px auto; /* Center it and add vertical spacing */
    position: relative; /* Ensure z-index works */
    z-index: 2; /* Place above the scrim */
}

.store-badge-large img {
    width: 100%; /* Make the image fill its parent .store-badge-large */
    height: auto; /* Maintain aspect ratio */
}

#character-description-display {
    position: fixed; /* Changed to fixed for modal behavior */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Darker overlay */
    z-index: 1001; /* Ensure it's on top */
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#character-description-display.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    background-color: #1d0e3c;
    padding: 40px;
    border-radius: 10px;
    max-width: 80%;
    max-height: 80vh;
    overflow-y: auto;
    color: #fff;
    text-align: justify;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    z-index: 10;
}

#character-description-display p {
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {

    .middle-content {
        flex: 1;
        padding: 20px;
        text-align: left;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        height: auto;
    }

    .home-content-wrapper {
        flex-direction: column;
        flex: 1; /* Add this back */
        height: auto;
        gap: 0;
        padding-top: 0;
        justify-content: flex-start;
    }

    .section {
        height: auto; /* Allow height to adjust to content */
        min-height: 100vh; /* Ensure it still takes at least full viewport height */
        padding-top: 120px;
        padding-bottom: 20px;
        justify-content: flex-start; /* Override to push content to top */
        box-sizing: border-box; /* Add this */
        overflow-y: auto; /* Enable internal scrolling if content overflows */
    }

    #characters {
        flex-direction: column; /* Stack children vertically */
        justify-content: flex-start; /* Align content to the top */
        padding-top: 80px; /* Adjust padding for mobile */
    }

    .left-content,
    .phone-display,
    .right-content {
        flex: none;
        width: 90%;
        padding: 20px;
    }

    .left-content {
        order: 1;
        padding-top: 0;
        padding-bottom: 20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .phone-display {
        order: 2;
        width: 50%;
        aspect-ratio: 540 / 1118;
        border-radius: 15% / 7.5%;
        overflow: hidden;
        -webkit-mask-image: -webkit-radial-gradient(white, black); /* Safari fix */
        -webkit-backface-visibility: hidden; /* Safari fix */
        -moz-backface-visibility: hidden; /* Firefox fix */
        backface-visibility: hidden; /* Standard fix */
        -webkit-transform: translate3d(0, 0, 0); /* Safari fix */
        -moz-transform: translate3d(0, 0, 0); /* Firefox fix */
        transform: translate3d(0, 0, 0); /* Standard fix */
        padding: 0; /* Remove padding for phone-display on mobile */
    }

    .phone-display video {
        border-radius: 15% / 7.5%;
    }

    .right-content {
        order: 3;
        text-align: center;
    }

    #characters h1 {
        margin-bottom: 10px;
        font-size: 2em;
    }

    #characters p {
        margin-bottom: 20px;
        font-size: 1em;
    }

    .character-gallery {
        overflow-x: auto; /* Enable horizontal scrolling */
        scroll-snap-type: x mandatory; /* Add this */
        max-height: 400px; /* Add max-height */
    }

    .character-gallery-wrapper {
        width: 90%;
        margin: 20px auto;
        padding: 0 10px; /* Add some padding to the sides */
    }

    .scroll-arrow {
        display: flex; /* Ensure arrows are visible */
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        cursor: pointer;
        padding: 5px;
        background-color: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
    }

    .scroll-arrow-left {
        left: 5px;
    }

    .scroll-arrow-right {
        right: 5px;
    }

    .character-column {
        flex-shrink: 0; /* Prevent shrinking */
        scroll-snap-align: center; /* Add this to make columns snap */
        flex: 0 0 150px; /* Make it smaller */
        max-width: 150px; /* Make it smaller */
        min-height: 300px; /* Adjust for mobile */
    }

    .store-badge-large {
        width: 250px; /* Reduce size on mobile */
    }

    .modal-content {
        max-width: 90%;
        padding: 20px;
    }
}