:root {
    color-scheme: light dark;
    --page-bg: #eef2f7;
    --panel-bg: rgba(255, 255, 255, 0.84);
    --panel-border: rgba(15, 23, 42, 0.08);
    --text-primary: #162032;
    --text-secondary: #51607a;
    --link: #1460d2;
    --shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
    --app-accent: #7a44dd;
    --app-accent-rgb: 122 68 221;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.app-page,
body.apps-directory-page {
    margin: 0;
    min-height: 100vh;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    background:
        radial-gradient(circle at top, rgb(var(--app-accent-rgb) / 0.12), transparent 34rem),
        linear-gradient(180deg, #f7f9fc 0%, var(--page-bg) 100%);
}

.container {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 32px 20px 56px;
}

header {
    margin-bottom: 28px;
}

.support-link {
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.support-link a,
.features a,
.privacy-policy a,
footer a {
    color: var(--link);
    text-decoration: none;
}

.support-link a:hover,
.features a:hover,
.privacy-policy a:hover,
footer a:hover {
    text-decoration: underline;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 400px);
    gap: 24px;
    align-items: stretch;
}

.hero-single {
    grid-template-columns: 1fr;
}

.hero-copy,
.hero-visual,
.features,
.screenshots,
.privacy-policy,
.apps-directory-intro,
.app-card {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.hero-copy {
    padding: clamp(26px, 4vw, 40px);
}

.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-decoration: none;
    background: linear-gradient(180deg, rgb(var(--app-accent-rgb) / 0.1), rgba(255, 255, 255, 0.55));
}

.app-icon {
    display: block;
    width: 104px;
    height: 104px;
    margin-bottom: 24px;
    border-radius: 24px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.eyebrow {
    display: inline-block;
    margin: 0 0 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgb(var(--app-accent-rgb) / 0.12);
    color: var(--app-accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.app-name {
    margin: 0 0 14px;
    font-size: clamp(2.6rem, 8vw, 4.4rem);
    line-height: 0.97;
    letter-spacing: -0.04em;
}

.app-description {
    margin: 0 0 16px;
    font-size: clamp(1.15rem, 2.3vw, 1.35rem);
    line-height: 1.5;
}

.app-summary {
    margin: 0 0 22px;
    line-height: 1.75;
    color: var(--text-secondary);
}

.app-store-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--text-primary);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.app-store-button:hover {
    transform: translateY(-1px);
    background: #0d1525;
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.18);
    text-decoration: none;
}

.hero-image {
    display: block;
    width: min(100%, 320px);
    height: auto;
    border-radius: 26px;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.18);
}

.hero-compact .hero-image,
.hero-image-compact {
    width: min(100%, 240px);
}

.features,
.screenshots,
.privacy-policy,
.apps-directory-intro {
    margin-bottom: 22px;
    padding: clamp(22px, 3.8vw, 34px);
}

.features h2,
.screenshots h2,
.privacy-policy h2,
.apps-directory-intro h2 {
    margin: 0 0 14px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.02em;
}

.features h3,
.privacy-policy h3 {
    margin: 22px 0 8px;
    font-size: 1.05rem;
}

.features p,
.privacy-policy p,
.apps-directory-intro p {
    margin: 10px 0 0;
    line-height: 1.75;
    color: var(--text-secondary);
}

.features-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.features-list li {
    margin: 16px 0 0;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgb(var(--app-accent-rgb) / 0.06);
    line-height: 1.65;
}

.features-list li strong,
.features-list li h3 {
    color: var(--text-primary);
}

.features-list li h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.features-list li p {
    margin: 0;
    color: var(--text-secondary);
}

.features-list-sublist {
    margin: 12px 0 0;
    padding-inline-start: 20px;
    list-style: disc;
}

.features-list-sublist li {
    margin: 8px 0 0;
    padding: 0;
    border-radius: 0;
    background: none;
}

.screenshot-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    justify-items: center;
}

.screenshot-images a {
    display: block;
    width: 100%;
    max-width: 280px;
}

.screenshot-images img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.12);
}

footer {
    padding: 10px 4px 0;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.footer-info {
    margin-top: 12px;
    line-height: 1.7;
}

.apps-directory-page .container {
    padding-top: 36px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.app-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: rgb(var(--app-accent-rgb) / 0.24);
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.12);
    text-decoration: none;
}

.app-card-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    flex-shrink: 0;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.app-card-title {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.app-card-description {
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

@media (prefers-color-scheme: dark) {
    :root {
        --page-bg: #0c1120;
        --panel-bg: rgba(18, 24, 39, 0.84);
        --panel-border: rgba(148, 163, 184, 0.18);
        --text-primary: #f3f6fb;
        --text-secondary: #c2cadb;
        --link: #8db7ff;
        --shadow: 0 18px 60px rgba(0, 0, 0, 0.3);
    }

    body.app-page,
    body.apps-directory-page {
        background:
            radial-gradient(circle at top, rgb(var(--app-accent-rgb) / 0.18), transparent 34rem),
            linear-gradient(180deg, #11182a 0%, #0c1120 100%);
    }

    .hero-visual {
        background: linear-gradient(180deg, rgb(var(--app-accent-rgb) / 0.18), rgba(18, 24, 39, 0.78));
    }

    .app-store-button {
        background: #f5f7fb;
        color: #0f172a;
    }

    .app-store-button:hover {
        background: #ffffff;
    }

    .features-list li {
        background: rgb(var(--app-accent-rgb) / 0.12);
    }
}

@media (max-width: 800px) {
    .container {
        padding-top: 24px;
    }

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

    .hero-copy {
        text-align: center;
    }

    .app-icon {
        margin-right: auto;
        margin-left: auto;
    }
}

@media (max-width: 560px) {
    .container {
        padding-right: 16px;
        padding-left: 16px;
    }

    .app-card {
        align-items: flex-start;
    }

    .screenshot-images {
        grid-template-columns: 1fr;
    }

    .screenshot-images a {
        max-width: 320px;
    }
}
