/*------------------------------------------------------------------
    Mobile Responsive Overrides
    These rules ONLY apply at specific breakpoints.
    Desktop layout (>1680px) is completely unaffected.
-------------------------------------------------------------------*/

/* ===== TABLET PORTRAIT & BELOW (≤991px) ===== */
@media (max-width: 991px) {

    /* --- Mobile Header polish --- */
    #mobile-header {
        padding-top: 8px;
    }

    #mobile-header .navbar {
        padding: 8px 0;
    }

    #mobile-header .nav-link {
        padding: 14px 0 !important;
        font-size: 15px;
        font-weight: 600;
        letter-spacing: 1px;
        transition: color 0.3s ease, padding-left 0.3s ease;
    }

    #mobile-header .nav-link:hover,
    #mobile-header .nav-link:active {
        color: #f72c91;
        padding-left: 8px;
    }

    #mobile-header .navbar-collapse {
        background: rgba(0, 0, 0, 0.92);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 16px;
        padding: 12px 24px;
        margin-top: 12px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 20px 60px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
    }

    /* --- About Section mobile --- */
    .about-section .col-lg-4.slide-up {
        display: none !important;
    }

    .game-description {
        margin-top: 2rem;
    }

    .description-container {
        min-height: auto !important;
        padding-bottom: 2rem;
    }

    .game-description-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-bottom: 1rem;
    }

    .game-description-nav li {
        margin-right: 0;
        margin-bottom: 4px;
    }

    .game-description-nav li a {
        font-size: 13px;
        padding: 6px 12px;
        border: 1px solid rgba(255,255,255,0.2);
        border-radius: 20px;
        display: inline-block;
        transition: all 0.3s ease;
    }

    .game-description-nav li a:hover {
        background: rgba(255,255,255,0.1);
        border-color: #f72c91;
    }

    .about-section .container {
        padding: 0 1.25rem;
    }

    /* Gameplay carousel mobile */
    #gameplay-carousel .carousel-indicators {
        top: 16px;
        left: auto;
        right: 0;
        margin-right: 0;
    }

    #gameplay-carousel .carousel-item .text-container {
        padding: 0;
    }

    #gameplay-carousel .carousel-item img {
        border-radius: 16px;
        width: 80%;
        margin: 1rem auto;
        display: block;
    }

    /* --- Map Section mobile --- */
    .map-section {
        padding: 0 !important;
    }

    .map-container {
        height: 70vh !important;
        min-height: 400px;
        border-radius: 0 !important;
        padding: 0 !important;
    }

    .map-iframe {
        border-radius: 0 !important;
    }

    /* --- Media Gallery mobile --- */
    .media-gallery {
        margin-bottom: 2rem;
    }

    .media-gallery .row {
        margin: 0;
    }

    .media-gallery .col-lg-3,
    .media-gallery .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 4px;
    }

    .media-gallery .gallery-item {
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 8px 25px rgba(0,0,0,0.5);
        border: 1px solid rgba(255,255,255,0.08);
        margin-bottom: 0;
    }

    .media-gallery .gallery-item img {
        border-radius: 0;
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }

    /* --- CTA Section mobile --- */
    .cta-text {
        font-size: 2.8rem;
    }

    .platforms.cta li {
        margin: 0 1rem;
    }

    .platforms.cta li a img {
        width: 100%;
    }

    #cta-image {
        width: 90%;
        margin-top: 1rem;
    }

    .cta-section .row:first-of-type {
        margin: 5% 0 2% 0;
    }

    /* --- Newsletter Section mobile --- */
    .newsletter-section .col-lg-4 {
        display: none;
    }

    .newsletter-container {
        margin-top: 0;
        padding: 0 0.5rem;
    }

    .newsletter-container .heading {
        font-size: 1.8rem;
    }

    .newsletter-perks li {
        font-size: 0.95rem;
    }

    input#newsletter {
        width: 100%;
        height: 48px;
        border-radius: 8px;
        font-size: 16px; /* prevent iOS zoom */
    }

    .newsletter-button {
        width: 100%;
        padding: 14px 0 !important;
        font-size: 1rem;
        border-radius: 8px;
        background: #f72c91 !important;
        border: none !important;
        transition: all 0.3s ease;
    }

    .newsletter-button:hover {
        background: #d41e7a !important;
        transform: translateY(-1px);
    }

    #newsletterForm label {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    #newsletterForm p {
        font-size: 0.8rem;
        opacity: 0.7;
    }

    /* --- Footer mobile --- */
    .footer .col-lg-3 {
        text-align: center;
    }

    .footer .col-lg-6 {
        text-align: center;
    }

    .footer-links li a,
    .footer-links button {
        font-size: 14px;
        padding: 4px 0;
    }

    #copyright-mobile {
        margin: 1.5rem 0 0.5rem 0;
        font-size: 13px;
        opacity: 0.7;
        text-align: center;
    }

    .footer .socials {
        text-align: center;
        margin: 0.5rem 0 1rem 0;
    }

    .footer .socials li {
        margin: 0 8px;
    }

    .footer .socials li a i {
        font-size: 1.2rem;
    }

    /* --- Section padding mobile --- */
    section:not(.hero-section):not(.map-section) {
        padding-top: clamp(80px, 10vh, 120px);
    }

    /* --- Smooth scrolling & overflow --- */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    body, html {
        overflow-x: hidden;
    }
}

/* ===== PHONE LANDSCAPE & BELOW (≤768px) ===== */
@media (max-width: 768px) {
    #background {
        min-height: 0;
        height: 100%;
        /* Fix iOS background-attachment: fixed bug */
        background-attachment: scroll !important;
    }

    .hero-caption {
        margin-top: clamp(120px, 20vh, 180px);
    }

    /* Cookie bar mobile */
    .policy-notice-bar {
        padding: 1rem 1.25rem;
    }

    .policy-notice-bar p {
        font-size: 13px;
        line-height: 1.5;
        display: block;
        margin-bottom: 0.75rem;
    }

    .policy-bar-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .policy-notice-bar button {
        display: block;
        width: 100%;
        margin-top: 0;
        margin-left: 0;
        padding: 12px 16px;
        font-size: 13px;
        border-radius: 8px;
        min-height: 44px;
    }

    #accept-button {
        background: #f72c91;
        border-color: #f72c91;
        order: -1;
    }

    #accept-button:hover {
        background: #d41e7a;
    }

    #close-policy-bar {
        float: none;
        width: auto;
        margin-top: 4px;
    }

    #policy-message {
        height: auto;
        min-height: 120px;
        padding: 1rem;
    }

    /* CTA section further scaling */
    .cta-text {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }

    .platforms.cta li {
        display: block;
        margin: 0 auto 0.75rem auto;
        max-width: 200px;
    }

    .platforms.cta li a img {
        width: 100%;
    }

    #cta-image {
        width: 100%;
        margin-top: 1.5rem;
    }

    /* Map tighter on phones */
    .map-container {
        height: 65vh !important;
        min-height: 350px;
    }

    /* System requirements mobile */
    .system-info ul li {
        font-size: 0.85rem;
        line-height: 1.6;
    }

    .system-info h3 {
        font-size: 1.2rem;
    }

    /* Accordion mobile */
    .accordion-button {
        font-size: 0.9rem;
        padding: 12px 16px;
    }

    .accordion-body {
        font-size: 0.9rem;
        padding: 1rem;
    }
}

/* ===== SMALL PHONES (≤480px) ===== */
@media (max-width: 480px) {

    /* Hero adjustments */
    .hero-caption {
        margin-top: clamp(100px, 18vh, 160px);
    }

    /* Countdown responsive stroke fix */
    .countdown-container .d-flex > div span:first-child {
        -webkit-text-stroke-width: 1.5px !important;
    }

    /* Media gallery single column on small phones */
    .media-gallery .col-lg-3,
    .media-gallery .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 4px 0;
    }

    .media-gallery .gallery-item {
        border-radius: 16px;
        margin-bottom: 12px;
    }

    .media-gallery .gallery-item img {
        aspect-ratio: 16 / 9;
    }

    /* Gameplay carousel image */
    #gameplay-carousel img {
        width: 100%;
        border-radius: 12px !important;
    }

    /* CTA smallest screens */
    .cta-text {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    /* About section text */
    .about-section h2 {
        font-size: 1.5rem;
    }

    .about-section p {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    /* Newsletter mobile polish */
    .newsletter-container .heading {
        font-size: 1.5rem;
    }

    .newsletter-container .sub-heading {
        font-size: 0.85rem;
    }

    /* Footer smallest */
    .footer-links li a,
    .footer-links button {
        font-size: 13px;
    }

    #copyright-mobile {
        font-size: 12px;
    }
}

/* ===== VERY SMALL PHONES (≤380px) ===== */
@media (max-width: 380px) {
    #mobile-header #main-logo {
        width: 110px;
    }

    .hero-caption {
        margin-top: 90px;
    }

    .countdown-container .d-flex > div span:first-child {
        -webkit-text-stroke-width: 1px !important;
    }

    .game-description-nav li a {
        font-size: 11px;
        padding: 5px 8px;
    }

    .cta-text {
        font-size: 1.5rem;
    }
}
