
/* =========================================
   APP ZONE — APP / GAME DETAIL PAGE
========================================= */

:root {
    --detail-bg: #080b12;
    --detail-panel: #101622;
    --detail-card: #151d2b;
    --detail-border: rgba(255, 255, 255, 0.09);
    --detail-text: #f4f7ff;
    --detail-muted: #a7b1c4;
    --detail-blue: #48a9ff;
    --detail-purple: #9564ff;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 75% 12%,
            rgba(67, 96, 220, 0.15),
            transparent 32%
        ),
        radial-gradient(
            circle at 15% 60%,
            rgba(100, 48, 190, 0.10),
            transparent 30%
        ),
        var(--detail-bg);
    color: var(--detail-text);
    font-family: Arial, Helvetica, sans-serif;
    overflow-x: hidden;
}

body,
body * {
    box-sizing: border-box;
}

body h1,
body h2,
body h3,
body h4 {
    color: var(--detail-text);
}

body p {
    color: var(--detail-muted);
}

body a {
    -webkit-tap-highlight-color: transparent;
}

/* =========================================
   SIDEBAR
========================================= */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1200;
    width: 76px;
    height: 100vh;
    height: 100dvh;
    padding: 14px 10px;
    overflow-x: hidden;
    overflow-y: auto;
    background: #0d1421;
    border-right: 1px solid var(--detail-border);
    color: white;
    transition: width 0.28s ease, transform 0.28s ease;
    scrollbar-width: thin;
}

.sidebar.open,
.sidebar.active {
    width: 250px;
}

.menu-button {
    display: grid;
    place-items: center;
    width: 50px;
    height: 46px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: white;
    font-size: 27px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.menu-button:hover {
    background: #202b3e;
}

.menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu li {
    margin: 5px 0;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    width: 100%;
    overflow: hidden;
    border-radius: 11px;
    color: #c6d0e0;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.menu a:hover,
.menu a.active {
    background: #202d42;
    color: #ffffff;
}

.menu .icon {
    display: inline-grid;
    flex: 0 0 48px;
    width: 48px;
    place-items: center;
    font-size: 21px;
}

.menu .text {
    display: inline-block;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar.open .text,
.sidebar.active .text {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Dark overlay behind an expanded sidebar */

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.68);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* =========================================
   TOP HEADER
========================================= */

body > header {
    position: fixed;
    top: 0;
    left: 76px;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 68px;
    padding: 0 28px;
    background: rgba(8, 11, 18, 0.86);
    border-bottom: 1px solid var(--detail-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body > header > span {
    flex: 0 0 auto;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 1px;
}

body > header > span a {
    color: #f4f7ff;
    text-decoration: none;
}

body > header form {
    position: static !important;
    flex: 0 1 560px;
    width: auto !important;
    margin-left: auto;
    transform: none !important;
}

body > header input[type="search"] {
    display: block;
    width: 100%;
    height: 42px;
    padding: 0 15px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    outline: none;
    background: #141b28;
    color: white;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body > header input[type="search"]::placeholder {
    color: #8995a8;
}

body > header input[type="search"]:focus {
    border-color: var(--detail-blue);
    box-shadow: 0 0 0 3px rgba(72, 169, 255, 0.13);
}

/* =========================================
   MAIN CONTENT
========================================= */

.main-content,
.main-content.page-background {
    min-height: 100vh;
    margin-left: 76px;
    padding: 96px 30px 50px;
    background: transparent;
    color: var(--detail-text);
    transition: margin-left 0.28s ease;
}

.app-detail-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================================
   GAME HERO
========================================= */

.app-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 310px;
    padding: clamp(24px, 4vw, 44px);
    overflow: hidden;
    border: 1px solid rgba(128, 157, 255, 0.19);
    border-radius: 26px;
    background:
        linear-gradient(
            115deg,
            rgba(24, 39, 65, 0.98),
            rgba(19, 23, 43, 0.98) 55%,
            rgba(47, 27, 78, 0.95)
        );
    box-shadow: 0 22px 65px rgba(0, 0, 0, 0.27);
}

.app-hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
}

.app-heading {
    display: flex;
    align-items: center;
    gap: 23px;
}

.app-main-icon {
    display: block;
    flex: 0 0 112px;
    width: 112px;
    height: 112px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 24px;
    object-fit: cover;
    background: #20283a;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
}

.app-title-info {
    min-width: 0;
}

.app-category,
.section-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: #81c5ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.app-title-info h1 {
    margin: 0;
    font-size: clamp(27px, 4vw, 43px);
    line-height: 1.12;
    letter-spacing: -0.8px;
    overflow-wrap: anywhere;
}

.app-publisher {
    margin: 10px 0 0;
    color: #c2cde0;
    font-size: 15px;
}

.app-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
    color: #cbd5e1;
    font-size: 12px;
}

.app-rating span {
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.055);
}

.app-rating span:first-child {
    color: #ffda73;
}

.app-short-description {
    max-width: 650px;
    margin: 24px 0 0;
    color: #d3dbea;
    font-size: 15px;
    line-height: 1.8;
}

.app-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

.app-install-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 25px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(110deg, #1688ff, #7757ff);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(54, 105, 255, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-install-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(54, 105, 255, 0.38);
}

.app-share-button {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.07);
    color: white;
    font-size: 21px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.app-share-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.14);
}

/* Decorative background elements */

.app-hero-decoration {
    position: absolute;
    z-index: -1;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.decoration-orb {
    position: absolute;
    display: block;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.22;
}

.orb-one {
    top: -100px;
    right: -40px;
    background: #358dff;
}

.orb-two {
    right: 130px;
    bottom: -180px;
    background: #a044ff;
}

.decoration-star {
    position: absolute;
    top: 30px;
    right: 11%;
    color: rgba(255, 255, 255, 0.3);
    font-size: 40px;
}

.star-two {
    top: auto;
    right: 27%;
    bottom: 35px;
    font-size: 24px;
}

/* Feature summary row */

.app-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.app-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 15px;
    background: rgba(7, 12, 24, 0.30);
}

.feature-icon {
    display: grid;
    place-items: center;
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
    border-radius: 12px;
    background: rgba(83, 143, 255, 0.14);
    color: #91c9ff;
    font-size: 19px;
}

.app-feature strong,
.app-feature small {
    display: block;
    overflow-wrap: anywhere;
}

.app-feature strong {
    color: #f4f7ff;
    font-size: 13px;
}

.app-feature small {
    margin-top: 5px;
    color: var(--detail-muted);
    font-size: 11px;
    line-height: 1.4;
}

/* =========================================
   CONTENT SECTIONS
========================================= */

.app-section {
    margin-top: 25px;
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid var(--detail-border);
    border-radius: 22px;
    background: linear-gradient(
        145deg,
        rgba(18, 26, 40, 0.96),
        rgba(12, 17, 27, 0.97)
    );
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.13);
}

.app-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.app-section-heading .section-eyebrow {
    margin-bottom: 7px;
}

.app-section h2 {
    margin: 0;
    font-size: clamp(21px, 3vw, 29px);
    line-height: 1.25;
    letter-spacing: -0.35px;
}

.section-caption {
    color: var(--detail-muted);
    font-size: 12px;
}

/* =========================================
   SCREENSHOTS
========================================= */

.app-screenshots {
    display: grid;
    grid-auto-columns: minmax(220px, 31%);
    grid-auto-flow: column;
    gap: 16px;
    overflow-x: auto;
    padding: 2px 2px 14px;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #536eae transparent;
}

.app-screenshots img {
    display: block;
    width: 100%;
    height: 250px;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 15px;
    background: #080c13;
    object-fit: cover;
    scroll-snap-align: start;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.app-screenshots img:hover {
    transform: translateY(-4px);
    border-color: rgba(100, 166, 255, 0.55);
}

.app-screenshots::-webkit-scrollbar {
    height: 6px;
}

.app-screenshots::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: #536eae;
}

/* =========================================
   ABOUT SECTION AND TAGS
========================================= */

.about-app > .section-eyebrow {
    margin-bottom: 8px;
}

.about-app h2 {
    margin-bottom: 15px;
}

.about-app > p {
    max-width: 850px;
    margin: 0;
    color: #c1cbdb;
    font-size: 15px;
    line-height: 1.9;
}

.app-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

.app-tags span {
    padding: 8px 13px;
    border: 1px solid rgba(95, 155, 255, 0.20);
    border-radius: 30px;
    background: rgba(55, 111, 205, 0.10);
    color: #c1ddff;
    font-size: 12px;
}

/* =========================================
   APP INFORMATION GRID
========================================= */

.app-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.app-info-item {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--detail-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
}

.app-info-item > span {
    color: var(--detail-muted);
    font-size: 12px;
}

.app-info-item > strong {
    color: #f0f5ff;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* =========================================
   SIMILAR GAMES
========================================= */

.related-apps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.related-app-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 13px;
    border: 1px solid var(--detail-border);
    border-radius: 15px;
    background: var(--detail-card);
    color: white;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease,
                background 0.2s ease;
}

.related-app-card:hover {
    transform: translateY(-3px);
    border-color: rgba(93, 159, 255, 0.45);
    background: #1a2638;
}

.related-app-card > img {
    display: block;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 13px;
    background: #20283a;
    object-fit: cover;
}

.related-app-card > div {
    flex: 1;
    min-width: 0;
}

.related-app-card strong {
    display: block;
    color: #f4f7ff;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.related-app-card > div > span {
    display: block;
    margin-top: 4px;
    color: var(--detail-muted);
    font-size: 11px;
}

.related-arrow {
    flex: 0 0 auto;
    color: #8dc7ff;
    font-size: 18px;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1000px) {
    .main-content,
    .main-content.page-background {
        padding-right: 22px;
        padding-left: 22px;
    }

    .related-apps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-screenshots {
        grid-auto-columns: minmax(220px, 42%);
    }

    .app-features {
        gap: 9px;
    }

    .app-feature {
        padding: 12px;
    }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 700px) {
    .sidebar {
        width: 250px;
        max-width: 82vw;
        transform: translateX(-100%);
        box-shadow: none;
    }

    .sidebar.open,
    .sidebar.active {
        width: 250px;
        max-width: 82vw;
        transform: translateX(0);
        box-shadow: 15px 0 45px rgba(0, 0, 0, 0.35);
    }

    .sidebar .text {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    body > header {
        left: 0;
        height: 64px;
        gap: 12px;
        padding: 0 13px;
    }

    body > header > span {
        font-size: 15px;
        letter-spacing: 0.5px;
    }

    body > header form {
        flex: 1 1 auto;
        min-width: 0;
    }

    body > header input[type="search"] {
        height: 39px;
        padding: 0 10px;
        font-size: 12px;
    }

    .main-content,
    .main-content.page-background {
        margin-left: 0;
        padding: 82px 13px 35px;
    }

    .app-hero {
        min-height: 0;
        padding: 23px 18px;
        border-radius: 21px;
    }

    .app-heading {
        align-items: flex-start;
        gap: 14px;
    }

    .app-main-icon {
        flex-basis: 82px;
        width: 82px;
        height: 82px;
        border-radius: 18px;
    }

    .app-category {
        margin-bottom: 7px;
        font-size: 10px;
        letter-spacing: 1.2px;
    }

    .app-title-info h1 {
        font-size: clamp(22px, 6vw, 30px);
    }

    .app-publisher {
        margin-top: 6px;
        font-size: 13px;
    }

    .app-rating {
        gap: 6px;
        margin-top: 9px;
        font-size: 10px;
    }

    .app-rating span {
        padding: 5px 7px;
    }

    .app-short-description {
        margin-top: 20px;
        font-size: 14px;
        line-height: 1.7;
    }

    .app-features {
        grid-template-columns: 1fr;
        gap: 9px;
        margin-top: 22px;
    }

    .app-feature {
        padding: 12px;
    }

    .app-section {
        margin-top: 17px;
        padding: 19px 15px;
        border-radius: 18px;
    }

    .app-section-heading {
        align-items: flex-start;
        margin-bottom: 17px;
    }

    .app-section h2 {
        font-size: 22px;
    }

    .section-caption {
        padding-top: 4px;
        font-size: 10px;
        text-align: right;
    }

    .app-screenshots {
        grid-auto-columns: 76%;
        gap: 12px;
    }

    .app-screenshots img {
        height: 225px;
        border-radius: 13px;
    }

    .about-app > p {
        font-size: 14px;
        line-height: 1.8;
    }

    .app-info-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .app-info-item {
        padding: 15px;
    }

    .related-apps {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .related-app-card > img {
        flex-basis: 54px;
        width: 54px;
        height: 54px;
    }
}

/* Small phones */

@media (max-width: 380px) {
    body > header {
        gap: 8px;
        padding: 0 9px;
    }

    body > header > span {
        font-size: 13px;
    }

    body > header input[type="search"] {
        font-size: 11px;
    }

    .main-content,
    .main-content.page-background {
        padding-right: 9px;
        padding-left: 9px;
    }

    .app-heading {
        gap: 10px;
    }

    .app-main-icon {
        flex-basis: 68px;
        width: 68px;
        height: 68px;
        border-radius: 15px;
    }

    .app-title-info h1 {
        font-size: 21px;
    }

    .app-hero {
        padding: 19px 13px;
    }

    .app-rating span {
        font-size: 9px;
    }

    .app-install-button {
        padding: 0 17px;
        font-size: 13px;
    }

    .app-screenshots {
        grid-auto-columns: 88%;
    }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
