:root {
    /* Color Palette: Clean Light Mode (App Store Vibe) */
    --bg-page: #F8F9FA;
    /* Very light cool gray background */
    --bg-card: #FFFFFF;
    /* Pure white cards */
    --text-main: #5F6368;
    /* Google Gray for body copy */
    --text-heading: #202124;
    /* Near black for contrast */

    /* Accents */
    --accent-blue: #0056D2;
    /* Trustworthy primary action color */
    --accent-blue-hover: #0043A6;
    --border-color: #E0E0E0;

    /* Layout */
    --max-width: 1300px;
    --header-height: 70px;
    --border-radius-lg: 20px;
    --border-radius-md: 14px;
    --border-radius-sm: 8px;

    /* Transitions & Shadows */
    --trans-fast: 0.2s ease;
    --trans-med: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Base Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color var(--trans-fast);
}

a:hover {
    color: var(--accent-blue-hover);
}

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

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.premium-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    z-index: 1000;
    display: flex;
    align-items: center;
}

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

.brand-logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-heading);
    letter-spacing: 0.5px;
}

.brand-logo span {
    color: var(--accent-blue);
}

/* Header Search */
.header-search {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.search-form {
    display: flex;
    align-items: center;
    background: #f1f3f4;
    border-radius: 50px;
    padding: 5px 15px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.search-form:focus-within {
    background: #fff;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 86, 210, 0.1);
}

.search-form input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 5px;
    font-size: 0.95rem;
    color: var(--text-heading);
    outline: none;
}

.search-form button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    color: var(--text-main);
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 20px;
    right: 20px;
    background: #fff;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border-color);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
    margin-top: 5px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #f1f3f4;
    text-decoration: none;
    color: var(--text-heading);
    transition: background var(--trans-fast);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8f9fa;
    color: var(--accent-blue);
}

.search-result-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: var(--text-main);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .premium-header {
        height: auto;
        padding: 10px 0;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .header-search {
        order: 3;
        flex: 1 1 100%;
        max-width: 100%;
        margin: 10px 0 0 0;
        display: block;
    }
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
}

.nav-links li a {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
}

.nav-links li a:hover {
    background: rgba(0, 86, 210, 0.05);
    /* subtle blue background on hover */
    color: var(--accent-blue);
}

/* Page Spacing */
.page-wrapper {
    margin-top: calc(var(--header-height) + 70px);
}

/* Ad Placeholders */
.ad-slot {
    background: #FFFFFF;
    border: 1px dashed #BDBDBD;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9E9E9E;
    font-weight: 500;
    text-align: center;
    padding: 15px;
    margin: 20px auto;
}

.ad-slot.leaderboard {
    max-width: 728px;
    height: 90px;
}

.ad-slot.billboard {
    max-width: 970px;
    height: 250px;
}

.ad-slot.in-feed {
    grid-column: 1 / -1;
    min-height: 120px;
    background: #F1F3F4;
    border: 1px solid #E0E0E0;
    color: #757575;
}

/* Hero Banner */
.hero-banner {
    position: relative;
    border-radius: var(--border-radius-lg);
    padding: 60px 40px;
    margin-bottom: 40px;
    text-align: center;
    background: linear-gradient(135deg, #E6F0FA 0%, #FFFFFF 100%);
    border: 1px solid var(--border-color);
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 15px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.hero-content h1 span {
    color: var(--accent-blue);
}

.hero-content p {
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto 30px auto;
    color: var(--text-main);
}

.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFFFFF !important;
    background: var(--accent-blue);
    border-radius: 50px;
    transition: all var(--trans-fast);
    box-shadow: 0 4px 10px rgba(0, 86, 210, 0.2);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 86, 210, 0.3);
    background: var(--accent-blue-hover);
}

/* SEO Content Section */
.seo-block {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    padding: 35px;
    margin-bottom: 50px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.seo-block h2 {
    font-size: 1.7rem;
    color: var(--text-heading);
    margin-bottom: 15px;
}

.seo-block p {
    font-size: 1.05rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

/* Game Grid & Cards (App Store Style) */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 25px;
}

.premium-grid {
    display: grid;
    /* Mobile default: 2 columns */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 60px;
}

@media (min-width: 600px) {
    .premium-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (min-width: 900px) {
    .premium-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 25px;
    }
}

@media (min-width: 1200px) {
    .premium-grid {
        /* Desktop: 5 columns tighter sizing */
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 25px;
    }
}

/* Medium Card Game Layout */
.premium-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 0;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
}

.premium-card a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    height: 100%;
    color: inherit;
    text-decoration: none;
    width: 100%;
}

.card-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 65%;
    /* 3:2 medium rectangle */
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
    border-bottom: 1px solid #e5e7eb;
}

.card-img-wrapper img {
    position: absolute;
    top: 5%;
    left: 5%;
    width: 90%;
    height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.premium-card:hover .card-img-wrapper img {
    transform: scale(1.04);
}

.card-content {
    padding: 16px 20px;
    background: transparent;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    border-top: none;
    width: 100%;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    width: 100%;
}

/* Medium Card Play Pill */
.play-pill {
    flex-shrink: 0;
    background: #eef2ff;
    color: var(--accent-blue);
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s ease;
    margin-top: auto;
    display: inline-block;
}

.premium-card:hover .play-pill {
    background: var(--accent-blue);
    color: #ffffff;
}

/* Footer */
.premium-footer {
    background: #FFFFFF;
    padding: 50px 0 30px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    color: var(--text-heading);
    margin-bottom: 5px;
}

.footer-brand span {
    color: var(--accent-blue);
}

.footer-brand p {
    color: var(--text-main);
    font-size: 0.9rem;
}

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

.footer-links a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    text-align: center;
    color: #9E9E9E;
    font-size: 0.85rem;
}

/* -------------------------------------- */
/* ULTRA PREMIUM APP DETAILS PAGE Layout  */
/* -------------------------------------- */

.app-details-container {
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 20px;
}

/* App Header (Icon, Title, GET Button) */
.app-header-block {
    display: flex;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
}

.app-icon-wrapper {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 25%;
    /* Apple-style squircle */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.app-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-title-area {
    flex-grow: 1;
}

.app-title-area h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.1;
    margin-bottom: 5px;
}

.app-publisher {
    font-size: 1.2rem;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 15px;
}

.btn-get {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-blue);
    color: white !important;
    font-weight: 800;
    font-size: 1.1rem;
    padding: 10px 30px;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(0, 86, 210, 0.3);
    text-transform: uppercase;
    transition: transform var(--trans-fast), box-shadow var(--trans-fast);
}

.btn-get:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 86, 210, 0.4);
    background: var(--accent-blue-hover);
}

/* App Short Description */
.app-short-desc {
    font-size: 1.15rem;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

/* App Preview (Banner) */
.app-preview-section {
    margin-bottom: 40px;
}

.app-preview-section h2 {
    font-size: 1.5rem;
    color: var(--text-heading);
    margin-bottom: 20px;
    font-weight: 700;
}

.app-banner-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    border: 1px solid var(--border-color);
    background: #111;
    /* Dark background for letterboxing effect */
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-banner-wrapper img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
    display: block;
    opacity: 0.95;
    transition: opacity var(--trans-med);
}

.app-banner-wrapper:hover img {
    opacity: 0.7;
}

.play-overlay-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform var(--trans-med), background var(--trans-fast);
}

.app-banner-wrapper:hover .play-overlay-btn {
    transform: translate(-50%, -50%) scale(1.1);
    background: white;
}

/* CSS Triangle for Play Button */
.play-overlay-btn::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 25px;
    border-color: transparent transparent transparent var(--accent-blue);
    margin-left: 8px;
    /* Optical optical centering */
}

/* Description Block */
.app-description-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
    margin-bottom: 50px;
    line-height: 1.8;
}

.app-description-card>h2:first-child {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-heading);
    font-weight: 700;
}

/* Fix for legacy HTML: Force all text inside card to paragraph size */
.app-desc-text,
.app-description-card h1,
.app-description-card p {
    font-size: 1.05rem !important;
    font-weight: 400 !important;
    color: var(--text-main) !important;
    line-height: 1.8 !important;
    margin-bottom: 20px;
}

/* Category Badges / Tags Layout */
.app-description-card .d-flex.flex-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px dashed var(--border-color);
}

.cusBadge {
    background: linear-gradient(135deg, rgba(0, 86, 210, 0.08) 0%, rgba(0, 86, 210, 0.15) 100%);
    border: 1px solid rgba(0, 86, 210, 0.2);
    border-radius: 50px;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: default;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.cusBadge:hover {
    background: linear-gradient(135deg, rgba(0, 86, 210, 0.15) 0%, rgba(0, 86, 210, 0.25) 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 86, 210, 0.15);
    border-color: rgba(0, 86, 210, 0.3);
}

.cusH {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-blue);
    line-height: 1;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

/* Mobile Responsive Logic & Hamburger Menu */
.menu-icon {
    display: none;
    font-size: 1.8rem;
    color: var(--text-heading);
    cursor: pointer;
    user-select: none;
}

@media (max-width: 768px) {

    /* Show Hamburger Icon */
    .menu-icon {
        display: block;
    }

    /* Hide Nav Links initially, position them as a dropdown */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        gap: 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        border-top: 1px solid var(--border-color);
    }

    .nav-links li a {
        display: block;
        padding: 15px 0;
        border-radius: 0;
    }

    /* Toggle Magic via CSS Checkbox */
    #menu-toggle:checked~.nav-links {
        max-height: 1500px;
        border-bottom: 3px solid var(--accent-blue);
        /* Big enough to fit links */
    }

    /* Additional Mobile Tweaks */
    .hero-banner {
        padding: 40px 20px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-links {
        justify-content: center;
    }
}
/* Nav Dropdown */
.dropdown-nav {
    position: relative;
    display: inline-block;
}

.dropbtn-nav {
    cursor: pointer;
}

.dropdown-content-nav {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 180px;
    box-shadow: var(--shadow-hover);
    border-radius: var(--border-radius-sm);
    z-index: 1002;
    top: 100%;
    left: 0;
    border: 1px solid var(--border-color);
}

.dropdown-content-nav a {
    color: var(--text-main) !important;
    padding: 10px 15px !important;
    text-decoration: none;
    display: block !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    border-radius: 0 !important;
}

.dropdown-nav:hover .dropdown-content-nav {
    display: block;
}

.dropdown-content-nav a:hover {
    background-color: rgba(0, 86, 210, 0.05) !important;
    color: var(--accent-blue) !important;
}

@media (max-width: 768px) {
    .dropdown-nav {
        display: block;
        width: 100%;
    }
    .dropdown-content-nav {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        background-color: #f8f9fa;
        min-width: 100%;
        max-height: 400px; /* Internal scrollable area if needed */
        overflow-y: auto;
    }
    
    .dropdown-nav:hover .dropdown-content-nav,
    .dropdown-nav:active .dropdown-content-nav,
    .dropdown-nav:focus-within .dropdown-content-nav {
        display: block;
    }
}
