/* ============================================
   PIRATE SHIPS LANDING - CSS
   ==========================
   Main sections:
   1. :root - colors and variables
   2. .navbar - header
   3. .hero - main banner
   4. .about - description
   5. .features - features
   6. .screenshots - carousel
   7. .lightbox - fullscreen view
   8. .closing-cta - final block
   9. .footer - footer
   ============================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   COLOR SCHEME - change colors here
   ============================================ */
:root {
    --color-bg: #0a0e17;           /* Main background */
    --color-bg-secondary: #0d1320; /* Secondary section background */
    --color-accent: #F9CE50;       /* Gold accent */
    --color-accent-hover: #e5c44a; /* Gold on hover */
    --color-text: #e8e4dc;         /* Main text */
    --color-text-muted: #8a8a8a;   /* Muted text */
    --color-border: #1e2a3a;       /* Border color */
    --font-heading: 'Lora', serif;
    --font-body: 'Lora', serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 500;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo img {
    height: 45px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--color-accent);
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg picture {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* ============================================
   HERO OVERLAY - background dimming
   ============================================ */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 23, 0.65);
    z-index: 2;
}

/* Brush separator on the bottom edge of hero */
.hero::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('images/brush_1.png') no-repeat center bottom;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 5;
}

/* ============================================
   TWINKLING STARS along the edges of the screen
   ============================================ */
.stars-container {
    pointer-events: none;
    overflow: hidden;
}

.stars-sides {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.star {
    position: absolute;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    box-shadow: 0 0 2px 1px rgba(255, 255, 255, 0.3);
    animation: twinkle ease-in-out infinite;
}

/* Twinkle animation */
@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Stars only along the left and right edges */
.stars-sides .star-1 { width: 3px; height: 3px; top: 12%; left: 2%; animation-duration: 2.5s; animation-delay: 0s; }
.stars-sides .star-2 { width: 2px; height: 2px; top: 28%; left: 5%; animation-duration: 3s; animation-delay: 0.5s; }
.stars-sides .star-3 { width: 4px; height: 4px; top: 45%; left: 3%; animation-duration: 2s; animation-delay: 1s; }
.stars-sides .star-4 { width: 2px; height: 2px; top: 62%; left: 7%; animation-duration: 3.5s; animation-delay: 0.3s; }
.stars-sides .star-5 { width: 3px; height: 3px; top: 78%; left: 4%; animation-duration: 2.8s; animation-delay: 0.8s; }
.stars-sides .star-6 { width: 2px; height: 2px; top: 18%; left: 96%; animation-duration: 2.2s; animation-delay: 1.2s; }
.stars-sides .star-7 { width: 4px; height: 4px; top: 35%; left: 98%; animation-duration: 3s; animation-delay: 0.2s; }
.stars-sides .star-8 { width: 2px; height: 2px; top: 52%; left: 94%; animation-duration: 2.6s; animation-delay: 0.7s; }
.stars-sides .star-9 { width: 3px; height: 3px; top: 68%; left: 97%; animation-duration: 2.3s; animation-delay: 1.5s; }
.stars-sides .star-10 { width: 2px; height: 2px; top: 85%; left: 93%; animation-duration: 3.2s; animation-delay: 0.4s; }

.hero-content {
    position: relative;
    z-index: 1001; /* above the navbar (1000) - the logo overlaps the panel */
    pointer-events: none; /* the div is wider than the logo - don't block navbar clicks */
    text-align: center;
    padding: 0 24px 0; /* logo flush with the top edge of the page */
}

/* Game window pulled up onto the hero background */
.hero-game {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1100px; /* frame (1052px) + side padding */
    margin: 1px auto 0;
    padding: 48px 24px 90px; /* top strip hosts the fullscreen button above the frame; badges + brush separator live in the bottom gap */
}

.hero-game .play-frame {
    margin: 0 auto; /* the frame is centered on its own, independent of the button */
    max-width: 1052px; /* original frame width */
}

.hero-title {
    margin-bottom: 0; /* gap to the game window is set by .hero-game margin-top */
}

/* ============================================
   HERO LOGO - main logo size
   Change max-width to enlarge/reduce
   ============================================ */
.hero-title img {
    max-width: 320px;  /* <-- CHANGE LOGO SIZE HERE */
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 30px rgba(0, 0, 0, 0.8));
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--color-bg);
    text-align: center;
}

.about-text {
    font-size: 20px;
    line-height: 1.8;
    color: var(--color-text);
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   VIDEO TRAILER - embedded YouTube video
   ============================================ */
.about-video {
    max-width: 900px;
    margin: 50px auto 0;
    border: 2px solid #c9a84c;
    border-radius: 6px;
    overflow: hidden;
}

.about-video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.about-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   CTA BUTTON - "Play for Free" button
   ============================================ */
.cta-button {
    display: inline-block;
    padding: 18px 50px;           /* Inner padding */
    background: var(--color-accent);
    color: #000;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(201, 162, 39, 0.3);
}

.cta-button:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(201, 162, 39, 0.5);
}

/* ============================================
   CTA BUTTON IMAGE - image button
   ============================================ */
.btn {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    height: 90px;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid rgba(0,210,95,.32);
    transition: transform .15s, border-color .3s;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(0,255,130,.62); }
.btn:active { transform: translateY(1px); }

.bg {
    position: absolute;
    inset: 0;
    border-radius: 8px;
    pointer-events: none;
    transition: box-shadow .3s;
}

.btn-icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 82px;
}

.btn-text-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 48px 0 18px;
    gap: 6px;
    text-align: center;
}

.btn-sub {
    font-family: 'Barlow', sans-serif;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    line-height: 1;
    color: rgba(140,255,190,.65);
}

.btn-main {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    line-height: 1.1;
    color: #aaffe0;
    text-shadow: 0 0 10px rgba(0,255,110,.55);
    transition: text-shadow .3s;
}
.btn:hover .btn-main { text-shadow: 0 0 14px rgba(0,255,120,.9), 0 0 32px rgba(0,220,78,.38); }

.steam-logo { width: 38px; height: 38px; flex-shrink: 0; }

/* ── Ghost Ship ── */
.btn-ghost .bg {
    background: linear-gradient(150deg, #031a10 0%, #052c18 40%, #083a22 65%, #041c12 100%);
    box-shadow: 0 0 16px rgba(0,205,88,.42), 0 0 48px rgba(0,185,70,.18), inset 0 0 28px rgba(0,240,108,.04), inset 0 1px 0 rgba(0,255,118,.16);
}
.btn-ghost:hover .bg {
    box-shadow: 0 0 28px rgba(0,255,98,.68), 0 0 75px rgba(0,220,78,.28), inset 0 0 38px rgba(0,255,108,.09), inset 0 1px 0 rgba(0,255,128,.26);
}

.rune { position: absolute; font-size: 10px; color: rgba(0,255,100,.18); animation: rf 4s ease-in-out infinite; pointer-events: none; z-index: 0; }
@keyframes rf { 0%,100%{opacity:.08;transform:translateY(0)} 50%{opacity:.32;transform:translateY(-3px)} }
.rune:nth-child(1){left:8px;top:8px;animation-delay:0s}
.rune:nth-child(2){left:34px;bottom:7px;animation-delay:1.3s}
.rune:nth-child(3){right:14px;top:8px;animation-delay:.7s}
.rune:nth-child(4){right:34px;bottom:7px;animation-delay:2s}

/* Section Titles */
.section-title {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 700;
    color: var(--color-accent);
    text-align: center;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ============================================
   FEATURES SECTION - 3 cards with straight corners
   ============================================ */
.features {
    padding: 100px 0;
    background: var(--color-bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    border: 2px solid #4a5568;
    overflow: hidden;
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    transition: all 0.3s ease;
    position: relative;
}

.feature-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 10px 40px rgba(201, 162, 39, 0.25);
    transform: scale(1.05);
    z-index: 2;
}

.feature-card:hover .feature-card-title {
    color: var(--color-accent);
}

/* Scroll highlight on touch devices (single column only) */
.feature-card.in-view {
    border-color: var(--color-accent);
    box-shadow: 0 10px 40px rgba(201, 162, 39, 0.25);
    transform: scale(1.05);
    z-index: 2;
}

.feature-card.in-view .feature-card-title {
    color: var(--color-accent);
}

/* Disable hover effects on touch devices to prevent stuck hover states */
@media (hover: none) and (pointer: coarse) {
    .feature-card:hover {
        border-color: #4a5568;
        box-shadow: none;
        transform: none;
    }

    .feature-card:hover .feature-card-title {
        color: #a0aec0;
    }
}

.feature-card-image {
    width: 100%;
    overflow: hidden;
    padding: 15px 15px 0;
}

.feature-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1px solid #4a5568;
}

.feature-card-content {
    padding: 15px;
}

.feature-card-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: #a0aec0;
    margin-bottom: 10px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.feature-card-text {
    font-size: 13px;
    line-height: 1.5;
    color: #cbd5e0;
    margin-bottom: 8px;
}

.feature-card-text:last-child {
    margin-bottom: 0;
}

/* ============================================
   Screenshots Section - with background
   ============================================ */
.screenshots {
    position: relative;
    z-index: 1;
    padding: 120px 0 140px;
    background: url('images/screenshots_bg.png') no-repeat center;
    background-size: cover;
}

/* Brush separator on TOP */
.screenshots::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    width: 100%;
    height: 120px;
    background: url('images/brush_1.png') no-repeat center;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 10;
}

/* Brush separator on BOTTOM */
.screenshots::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: 0;
    width: 100%;
    height: 120px;
    background: url('images/Brush_2.png') no-repeat center;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 10;
}

/* Title - brown */
.screenshots .section-title {
    color: #5c4033;
    text-shadow: none;
    margin-bottom: 40px;
}

/* Screenshot container - with padding */
.screenshots .container {
    padding: 0 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.carousel-arrow {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: rgba(61, 43, 31, 0.8);
    border: 2px solid #3d2b1f;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e8dcc8;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-arrow:hover {
    background: #3d2b1f;
    border-color: #3d2b1f;
    color: #f5efe6;
}

.carousel-arrow svg {
    width: 24px;
    height: 24px;
}

.screenshots-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 0 0 20px 0;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    scroll-behavior: smooth;
}

/* Class for dragging state */
.screenshots-carousel.grabbing {
    cursor: grabbing;
}

/* Scrollbar in brown style */
.screenshots-carousel::-webkit-scrollbar {
    height: 8px;
}

.screenshots-carousel::-webkit-scrollbar-track {
    background: rgba(61, 43, 31, 0.2);
    border-radius: 4px;
}

.screenshots-carousel::-webkit-scrollbar-thumb {
    background: #3d2b1f;
    border-radius: 4px;
}

.screenshot-item {
    flex: 0 0 auto;
    width: 30%;
    max-width: 500px;
    min-width: 300px;
    user-select: none;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}

.screenshot-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #3d2b1f;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.screenshot-item:hover::after {
    transform: scaleX(1);
}

.screenshot-img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 2px solid #3d2b1f;
    border-radius: 8px;
}



.screenshot-placeholder {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1a2332 0%, #0d1320 100%);
    border: 2px dashed var(--color-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}





/* ============================================
   LIGHTBOX (fullscreen view)
   ============================================ */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(30, 42, 58, 0.8);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    transition: all 0.3s ease;
    z-index: 2001;
}

.lightbox-close:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #000;
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
}

/* Navigation arrows in lightbox */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(30, 42, 58, 0.8);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    transition: all 0.3s ease;
    z-index: 2001;
}

.lightbox-arrow:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #000;
}

.lightbox-arrow-prev {
    left: 20px;
}

.lightbox-arrow-next {
    right: 20px;
}

.lightbox-arrow svg {
    width: 28px;
    height: 28px;
}

.lightbox-content {
    max-width: 85%;
    max-height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
}

.lightbox-content.grabbing {
    cursor: grabbing;
}

.lightbox-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    user-select: none;
    transition: transform 0.3s ease;
}

/* Closing CTA Section */
.closing-cta {
    padding: 60px 0;
    background: var(--color-bg);
    text-align: center;
}

/* ============================================
   CLOSING CTA - final block
   Adjust spacing between elements below:
   margin-bottom on .closing-heroine — from portrait to text
   margin-bottom on .closing-text      — from text to button
   ============================================ */
.closing-cta-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Badges row inherits spacing from the row gap - no hero-specific margin here */
.closing-cta-row .store-badges {
    margin-top: 0;
}

.closing-heroine {
    width: 700px;
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.4));
}

.closing-text {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 600;
    color: var(--color-text);
    max-width: 700px;
    line-height: 1.6;
    font-style: italic;
    text-align: center;
    padding: 30px 40px;
    border: 2px solid var(--color-accent);
    border-radius: 8px;
    background: rgba(13, 19, 32, 0.85);
    box-shadow: 0 0 30px rgba(201, 162, 39, 0.15);
    /* SPACING: text → button (desktop) */
    margin: 0 0 80px 0;
}

/* Footer */
.footer {
    padding: 40px 0;
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--color-accent);
}

.footer-copyright {
    text-align: center;
    font-size: 14px;
    color: var(--color-text-muted);
}

/* ============================================
   FOOTER MODALS - footer modals
   ============================================ */
.footer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.footer-modal.active {
    opacity: 1;
    visibility: visible;
}

.footer-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 23, 0.75);
}

.footer-modal-content {
    position: relative;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    z-index: 2001;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

.footer-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
}

.footer-modal-close:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #000;
}

.footer-modal-close svg {
    width: 18px;
    height: 18px;
}

.footer-modal-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-right: 40px;
}

.footer-modal-body {
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-text);
}

.footer-modal-body p {
    margin-bottom: 16px;
}

.footer-modal-body strong {
    color: var(--color-accent);
    font-weight: 600;
}

.footer-modal-body em {
    color: var(--color-accent-hover);
    font-style: normal;
}

/* Modal scrollbar */
.footer-modal-content::-webkit-scrollbar {
    width: 8px;
}

.footer-modal-content::-webkit-scrollbar-track {
    background: rgba(30, 42, 58, 0.3);
    border-radius: 4px;
}

.footer-modal-content::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

.footer-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* Desktop: enlarge feature cards and video */
@media (min-width: 1025px) {
    .features .container {
        max-width: 1400px;
    }

    .feature-card-image {
        padding: 0;
    }

    .feature-img {
        border: none;
    }

    .about-video {
        max-width: 1100px;
    }
}

/* ============================================
   RESPONSIVE DESIGN - screen adaptation
   ============================================ */

/* Tablets */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .feature-card {
        max-width: 800px;
        width: 100%;
    }

    .feature-card-title {
        font-size: 20px;
    }

    .feature-card-text {
        font-size: 15px;
    }

    .screenshot-item {
        width: 70%;
    }

    .hero-title img {
        max-width: 320px;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    .nav-container {
        height: 60px;
    }

    .nav-logo img {
        height: 35px;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(10, 14, 23, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
        gap: 25px;
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-content {
        z-index: 1001;
        pointer-events: none;
        padding: 0 20px 0;
    }

    .hero-title img {
        max-width: 320px; /* Smaller logo */
    }

    .btn {
        height: 72px;
    }
    .btn-main {
        font-size: 18px;
    }
    .btn-sub {
        font-size: 12px;
    }

    /* Hide side stars on tablets and mobile */
    .stars-sides {
        display: none;
    }

    .about {
        padding: 50px 0;
    }

    .about-text {
        font-size: 16px;
    }

    .cta-button {
        padding: 16px 40px;
        font-size: 14px;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .features {
        padding: 60px 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .feature-card-title {
        font-size: 18px;
    }

    .feature-card-text {
        font-size: 14px;
    }

    .screenshots {
        padding: 80px 0 100px;
    }

    .screenshots::before {
        top: -50px;
        height: 80px;
    }

    .screenshots::after {
        bottom: -50px;
        height: 80px;
    }

    .screenshots .container {
        padding: 0 20px;
        margin: 0;
    }

    .screenshots-carousel {
        gap: 15px;
        padding: 0 0 20px 0;
    }

    .screenshot-item {
        width: 80%;
        min-width: 250px;
    }

    .screenshot-img {
        aspect-ratio: 16 / 9;
    }

    /* Hide arrows on mobile */
    .carousel-arrow {
        display: none;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        top: 15px;
        right: 15px;
    }

    .lightbox-arrow {
        width: 45px;
        height: 45px;
    }

    .lightbox-arrow-prev {
        left: 10px;
    }

    .lightbox-arrow-next {
        right: 10px;
    }

    .lightbox-arrow svg {
        width: 22px;
        height: 22px;
    }

    .closing-cta {
        padding: 60px 0;
    }

    .closing-text {
        font-size: 18px;
    }

    .closing-cta {
        padding: 40px 0;
    }

    .closing-cta-row {
        gap: 15px;
    }

    .closing-heroine {
        width: 650px;
        max-width: 100%;
    }

    .closing-text {
        font-size: 22px;
        max-width: 90%;
        padding: 24px 30px;
        /* SPACING: text → button (tablets/mobile up to 768px) */
        margin-bottom: 70px;
    }

    .footer-links {
        gap: 20px;
    }

    .footer-modal-content {
        padding: 24px;
        max-height: 90vh;
    }

    .footer-modal-title {
        font-size: 22px;
    }

    .footer-modal-body {
        font-size: 14px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero-content {
        z-index: 1001;
        pointer-events: none;
        padding: 0 16px 5px;
    }

    .hero-title img {
        max-width: 240px; /* Even smaller logo */
    }

    .btn {
        height: 68px;
    }
    .btn-main {
        font-size: 18px;
    }
    .btn-sub {
        font-size: 12px;
    }

    /* Hide side stars on mobile */
    .stars-sides {
        display: none;
    }

    .about {
        padding: 40px 0;
    }

    .about-text {
        font-size: 14px;
        padding: 0 16px;
    }

    .section-title {
        font-size: 24px;
    }

    .feature-card-content {
        padding: 20px;
    }

    .screenshots {
        padding: 70px 0 90px;
    }

    .screenshots::before {
        top: -40px;
        height: 70px;
    }

    .screenshots::after {
        bottom: -40px;
        height: 70px;
    }

    .screenshots .container {
        padding: 0 15px;
        margin: 0;
    }

    .screenshots-carousel {
        gap: 12px;
        padding: 0 0 20px 0;
    }

    .screenshot-item {
        width: 85%;
        min-width: 200px;
    }

    .screenshot-img {
        aspect-ratio: 16 / 9;
    }

    /* Arrows hidden on mobile */
    .carousel-arrow {
        display: none;
    }

    .carousel-wrapper {
        gap: 0;
    }

    .lightbox-close {
        width: 35px;
        height: 35px;
    }

    .lightbox-arrow {
        width: 40px;
        height: 40px;
    }

    .lightbox-arrow-prev {
        left: 5px;
    }

    .lightbox-arrow-next {
        right: 5px;
    }

    .closing-cta {
        padding: 30px 0;
    }

    .closing-cta-row {
        gap: 0;
    }

    .closing-heroine {
        width: 480px;
        max-width: 100%;
    }

    .closing-text {
        font-size: 18px;
        max-width: 95%;
        padding: 20px 24px;
        /* SPACING: text → button (small mobile up to 480px) */
        margin-bottom: 40px;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}

/* ============================================
   STORE BADGES - Steam / Google Play / App Store
   (live inside .hero-game, right under the game window)
   ============================================ */
.store-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 15px; /* almost flush with the game window */
    flex-wrap: wrap;
}

/* Game window - styled like the trailer block */
.play-frame {
    position: relative;
    max-width: 1100px;
    margin: 40px auto 0;
    border: 2px solid #c9a84c;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 0 40px rgba(201, 162, 39, 0.15);
}

.play-frame-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
}

.play-frame-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Fullscreen mode - the wrapper (#play) fills the whole screen */
.hero-game:fullscreen,
.hero-game:-webkit-full-screen {
    display: block;
    max-width: none;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.hero-game:fullscreen .play-frame,
.hero-game:-webkit-full-screen .play-frame {
    max-width: none;
    border: none;
    border-radius: 0;
    width: 100%;
    height: 100%;
}

.hero-game:fullscreen .play-frame-wrapper,
.hero-game:-webkit-full-screen .play-frame-wrapper {
    padding-top: 0;
    height: 100%;
}

/* Fullscreen toggle button - sits in the strip ABOVE the game frame, flush with its right edge */
.play-fullscreen-btn {
    position: absolute;
    top: 4px;
    /* frame is centered with max-width 1052px: on wide screens align with its right edge, on narrow screens with the container padding */
    right: max(24px, calc(50% - 526px));
    left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: rgba(10, 14, 23, 0.8);
    border: 1px solid #c9a84c;
    border-radius: 6px;
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.play-fullscreen-btn:hover {
    background: var(--color-accent);
    color: #000;
}

.play-fullscreen-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Toggle expand/compress icons */
.play-fullscreen-btn .icon-compress {
    display: none;
}

.play-fullscreen-btn.is-fullscreen .icon-expand {
    display: none;
}

.play-fullscreen-btn.is-fullscreen .icon-compress {
    display: block;
}

/* Button hidden in fullscreen on ALL devices - exit via Esc (desktop)
   or the system back gesture/button (mobile). Otherwise it overlapped the game UI */
.hero-game:fullscreen .play-fullscreen-btn,
.hero-game:-webkit-full-screen .play-fullscreen-btn {
    display: none;
}

/* ============================================
   FAKE FULLSCREEN (iPhone Safari)
   iPhone Safari has no element Fullscreen API - the mode is emulated
   with a fixed overlay: body.fake-fullscreen mirrors the :fullscreen styles.
   Exit: Back gesture (handled via a #fullscreen history entry)
   or the dimmed corner button below.
   ============================================ */
body.fake-fullscreen {
    overflow: hidden; /* nothing to scroll behind the game */
}

body.fake-fullscreen .hero-game {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh; /* visible area on iOS (dynamic toolbar safe) */
    max-width: none;
    margin: 0;
    padding: 0;
    background: #000;
    z-index: 1900; /* above navbar (1000) and hero logo (1001) */
}

body.fake-fullscreen .hero-game .play-frame {
    max-width: none;
    border: none;
    border-radius: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}

body.fake-fullscreen .hero-game .play-frame-wrapper {
    padding-top: 0;
    height: 100%;
}

/* Badges are not needed on top of the game */
body.fake-fullscreen .hero-game .store-badges {
    display: none;
}

/* Exit button hidden in fake fullscreen: the top-right corner hosts the game's
   own UI (resources, shop). Exit via the Back gesture (the #fullscreen entry).
   Standalone (Add to Home Screen) has no Back UI - keep the dimmed button there. */
body.fake-fullscreen .play-fullscreen-btn {
    display: none;
}

body.fake-fullscreen.pwa-standalone .play-fullscreen-btn {
    display: inline-flex;
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;
    z-index: 10;
    opacity: 0.35;
}

.store-badge {
    display: inline-flex;
    transition: transform 0.2s ease;
}

.store-badge:hover {
    transform: translateY(-3px);
}

.store-badge img {
    height: 60px;
    width: auto;
    display: block;
    border-radius: 10px;
}

/* Compact Steam button inside the badges row */
.store-badges .btn {
    height: 60px;
    border-radius: 10px;
}

.store-badges .btn-icon {
    width: 52px;
}

.store-badges .steam-logo {
    width: 26px;
    height: 26px;
}

.store-badges .btn-text-wrap {
    padding: 0 26px 0 12px;
    gap: 4px;
}

.store-badges .btn-main {
    font-size: 15px;
    letter-spacing: 1.5px;
}

.store-badges .btn-sub {
    font-size: 10px;
    letter-spacing: 2px;
}

/* Store badges on tablets and mobile */
@media (max-width: 768px) {
    .hero-game {
        padding-bottom: 70px; /* badge stack is tall - less dead space below */
    }

    .store-badges {
        flex-direction: column;
        gap: 18px;
        margin-top: 12px;
    }

    .store-badge img {
        height: 54px;
    }

    .store-badges .btn {
        height: 54px;
    }

    .store-badge img {
        border-radius: 9px;
    }
}

@media (max-width: 480px) {
    .store-badge img {
        height: 50px;
    }

    .store-badges .btn {
        height: 50px;
    }

    .play-fullscreen-btn {
        padding: 7px 12px;
        font-size: 11px;
    }
}

/* ============================================
   ROTATE-SCREEN PROMPT
   Shown ONLY in fullscreen on touch devices in portrait orientation:
   outside fullscreen the letterboxed window stays playable, no prompt needed
   ============================================ */
.rotate-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(249, 206, 80, 0.07) 0%, rgba(10, 14, 23, 0) 65%), var(--color-bg);
}

.rotate-overlay-icon {
    width: 56px;
    height: 56px;
    color: var(--color-accent);
    animation: rotate-overlay-glow 3.2s ease-in-out infinite;
}

/* Phone inside the icon tips to landscape and back */
.rotate-overlay-phone {
    transform-box: fill-box;
    transform-origin: center;
    animation: rotate-overlay-phone 3.2s ease-in-out infinite;
}

@keyframes rotate-overlay-phone {
    0%, 20% {
        transform: rotate(0deg);
    }

    55%, 75% {
        transform: rotate(90deg);
    }

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

@keyframes rotate-overlay-glow {
    0%, 100% {
        filter: drop-shadow(0 0 0 rgba(249, 206, 80, 0));
    }

    50% {
        filter: drop-shadow(0 0 12px rgba(249, 206, 80, 0.45));
    }
}

.rotate-overlay-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-accent);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.rotate-overlay-sub {
    font-size: 14px;
    color: var(--color-text-muted);
}

/* The overlay appears only while the game is in fullscreen (portrait + touch):
   native fullscreen or the fake iPhone mode */
@media (orientation: portrait) and (pointer: coarse) {
    .hero-game:fullscreen .rotate-overlay,
    .hero-game:-webkit-full-screen .rotate-overlay,
    body.fake-fullscreen .rotate-overlay {
        display: flex;
    }
}

@media (orientation: portrait) and (pointer: coarse) and (max-width: 480px) {
    .rotate-overlay-icon {
        width: 44px;
        height: 44px;
    }

    .rotate-overlay-title {
        font-size: 14px;
        letter-spacing: 1px;
    }

    .rotate-overlay-sub {
        font-size: 12px;
    }
}

/* ============================================
   LEGAL PAGES - privacy.html / terms.html
   ============================================ */
.legal-page {
    padding: 150px 0 80px; /* top clearance for the fixed navbar */
    background: var(--color-bg);
    min-height: 100vh;
}

/* Reuse the modal card look, but let the document grow to full height */
.legal-page .footer-modal-content {
    max-height: none;
    overflow: visible;
    text-align: left;
}

/* Links inside legal documents */
.footer-modal-body a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-modal-body a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .legal-page {
        padding: 110px 0 60px;
    }
}
