/* --- Global Styles --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: #333;
    background-color: #fff;
    line-height: 1.5;
    
    /* Forces footer to the bottom of the screen */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Container Styles --- */
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-container,
.section-container,
.footer-container {
    max-width: 1090px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Utilities --- */
.text-center {
    text-align: center;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary {
    background-color: #1e60ff;
    color: #fff;
    padding: 8px 14px;
    font-size: 11px;
}

.btn-primary:hover {
    background-color: #1a56e0;
    transform: translateY(-2px);
}

.btn-text {
    align-self: flex-start;
    color: #1e60ff;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #1e60ff;
    padding: 6px 16px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-text:hover {
    background-color: #1e60ff;
    color: #fff;
}

/* --- Header Section --- */
.header {
    background-color: #fff;
    padding: 16px 0;
    border-bottom: 1px solid #e1e8ed;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #21284d;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    padding-bottom: 5px;
}

.nav-link:hover {
    color: #1e60ff;
}

.nav-link.active {
    color: #21284d;
    font-weight: 600;
    border-bottom: 2px solid #1e60ff;
}

 .desktop-subtitle-break {
        display: block;
    }


.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.social-icon:hover {
    opacity: 1;
}

/* --- Home Hero Section --- */
.hero-section {
    padding: 5px 0;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    color: #21284d;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    max-width: 500px;
}

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-phone-img {
    max-height: 260px;
    width: auto;
    object-fit: contain;
}

.games-section {
    padding: 0;
}

.section-title {
    font-size: 21px;
    font-weight: 700;
    color: #21284d;
    text-align: center;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60%;
    height: 3px;
    background-color: #1e60ff;
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    max-width: 820px;
    margin: 0 auto;
}

.game-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background-color: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 16px;
    padding: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.game-card-img {
    width: 130px !important;
    height: 130px !important;
    margin: 0 !important;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.game-card-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.game-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #21284d;
}

.alt-title {
    font-size: 13px;
    font-weight: 400;
    color: #666;
    margin-left: 6px;
}

.game-card-text {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 4px;
}

/* --- Info Bar Section --- */
.info-section {
    padding: 30px 0 10px;
}

.info-bar {
    background-color: #f7faff;
    border-radius: 16px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    padding: 18px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-title {
    font-size: 14px;
    font-weight: 700;
    color: #21284d;
    margin-bottom: 4px;
}

.info-text {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* --- Footer Section --- */
.footer {
    padding: 20px 0;
    border-top: 1px solid #eaeaea;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #777;
}

.footer-links {
    display: flex;
    gap: 15px;
}

.footer-link:hover {
    color: #1e60ff;
}

.footer-byline .heart-icon {
    color: #ff5050;
    margin: 0 2px;
}


/* --- Game Detail Framework Architecture --- */
.game-detail-main {
    padding-top: 0 !important; /* Pulls content row tight to header bar line */
    background-color: #fff;
    flex: 1;
}

.game-hero-section {
    padding-top: 20px !important;
}

.game-hero-container {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.game-info-column {
    flex: 1.2; /* re-balanced slightly to give the expanded right gap comfortable room */
    display: flex;
    flex-direction: column;
}

.game-media-column {
    flex: 0.75;
}

/* App Header Identity Block */
.game-header-identity {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    margin-top: 0 !important;
}

.game-detail-icon {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.game-detail-title {
    font-size: 38px;
    font-weight: 800;
    color: #21284d;
    line-height: 1.1;
}

.game-detail-tagline {
    font-size: 15px;
    color: #21284d;
    font-weight: 500;
    margin-top: 2px;
}

.game-detail-description {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-top: 4px;
    margin-bottom: 16px;
    max-width: 540px;
}

/* Store Buttons Framework */
.download-button-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-store {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-apple,
.btn-android {
    background-color: var(--store-button-bg, #1e60ff);
    color: #fff;
}

.btn-apple:hover,
.btn-android:hover {
    background-color: var(--store-button-hover-bg, #1a56e0);
}

.store-icon {
    width: 16px;
    height: 16px;
}

/* Unified Layout Media Gallery Row */
.screenshot-row {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

/* Enforces rigid, perfect portrait dimensions for both elements */
.game-screenshot,
.video-mockup-wrapper {
    height: 310px;
    width: auto;
    aspect-ratio: 9 / 19.5;
    border-radius: 14px;
    border: 1px solid #e1e8ed;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    flex-shrink: 0;
}

.video-mockup-wrapper {
    overflow: hidden;
    background-color: #000;
    border: 1px solid #e1e8ed;
}

.preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Structured Features Card Container */
.features-card-anchor {
    background-color: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 18px 20px 24px 20px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
}

.features-block-title {
    text-align: center !important;
    font-size: 18px;
    font-weight: 700;
    color: #21284d;
    margin-bottom: 20px;
    border-bottom: 1px solid #e1e8ed;
    padding-bottom: 10px;
}

.features-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 24px !important;
}

.feature-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.feature-detail-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.feature-detail-text h4 {
    font-size: 14px;
    font-weight: 700;
    color: #21284d;
    margin-bottom: 2px;
}

.feature-detail-text p {
    font-size: 16px;
    color: #666;
    line-height: 1.4;
}

/* Responsive Media Query Layout Reconfiguration */
@media (max-width: 992px) {
    .game-hero-container {
        flex-direction: column;
        align-items: center;
        gap: 35px;
    }
    .game-info-column, .game-media-column {
        width: 100%;
    }
    .game-header-identity {
        flex-direction: column;
        text-align: center;
    }
    .game-detail-description {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }
    .download-button-row, .screenshot-row {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-container, .games-grid, .info-bar {
        grid-template-columns: 1fr;
    }
    .footer-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

.footer-divider {
    color: #666; /* Gives it a subtle, muted color */
    margin: 0 10px; /* Pushes the Privacy link and Contact link apart cleanly */
}

/* --- Tighten Bottom Gap Before Footer Line --- */
.game-hero-section {
    padding-bottom: 32px !important; /* Drops the dead zone under the screenshots down to this value */
}

.feature-detail-item {
    align-items: center !important; /* Vertically centers your text next to the larger icons */
    gap: 16px !important;           /* Adds clean breathing room between the icon and text */
}

.feature-detail-icon {
    width: 80px !important;         /* Increases width from 32px to 44px */
    height: 80px !important;        /* Increases height from 32px to 44px */
}

@media (max-width: 768px) {
    /* 1. Turn the row into a swipeable carousel */
    .screenshot-row {
        justify-content: flex-start !important; /* This is crucial: overrides your 992px centering */
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        padding-bottom: 16px !important; 
        -webkit-overflow-scrolling: touch;
        
        /* Optional: lets the scroll stretch edge-to-edge on mobile */
        width: 100vw;
        margin-left: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    /* 2. Hide the ugly default scrollbar */
    .screenshot-row::-webkit-scrollbar {
        display: none;
    }

    /* 3. Make the items snap nicely to the center as you swipe */
    .game-screenshot,
    .video-mockup-wrapper {
        scroll-snap-align: center !important;
        
        /* Pushing it to the max for ultimate legibility */
        height: 500px !important; 
        
        /* Keeps just enough of a peek (12%) to cue the user to swipe left */
        max-width: 88vw !important; 
    }
}

@media (max-width: 768px) {
    .header-container {
        display: flex;
        justify-content: space-between;
        gap: 16px;
    }


    .social-links {
        display: none;
    }

    .logo-text {
        font-size: 20px;
        line-height: 1.15;
    }

    .hero-section {
        padding: 24px 0 18px;
    }

    .hero-container {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }

    .hero-content {
        width: 100%;
    }


    .hero-title {
        font-size: 27px;
        line-height: 1.15;
        max-width: 360px;
        margin: 0 auto 12px;
    }

    .hero-subtitle {
        font-size: 16px;
        line-height: 1.45;
        max-width: 310px;
        margin: 0 auto;
    }

    .desktop-subtitle-break {
        display: inline;
    }


    .hero-image-container {
        justify-content: center;
        width: 100%;
    }

   .hero-phone-img {
        display: none;
    }
    
    .games-section {
        padding-top: 18px;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .info-bar {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .game-card {
        gap: 14px;
    }

    .game-card-img {
        width: 120px !important;
        height: 120px !important;
    }

    .game-card-title {
        font-size: 20px;
        line-height: 1.15;
    }

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