:root {
    --bg: #eef2ff;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-glass: rgba(255, 255, 255, 0.82);
    --text: #0f172a;
    --text-muted: #64748b;
    --line: rgba(148, 163, 184, 0.22);
    --primary: #1e1b4b;
    --accent: #4f46e5;
    --accent-2: #7c3aed;
    --accent-3: #db2777;
    --success: #059669;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 48%, #ec4899 100%);
    --gradient-soft: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(236, 72, 153, 0.08));
    --shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 20px 50px rgba(30, 27, 75, 0.12);
    --shadow-lg: 0 28px 60px rgba(30, 27, 75, 0.16);
    --radius: 20px;
    --radius-sm: 14px;
    --radius-xs: 10px;
    --container: 1180px;
    --header-height: 64px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --tap-min: 44px;
    --cookie-notice-offset: 0px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.12), transparent 32%),
        radial-gradient(circle at 100% 0%, rgba(236, 72, 153, 0.08), transparent 28%),
        var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.nav-open {
    overflow: hidden;
}

body.apk-page {
    padding-bottom: calc(88px + var(--safe-bottom));
}

body:has(.cookie-notice) {
    --cookie-notice-offset: 58px;
    padding-bottom: calc(var(--cookie-notice-height, var(--cookie-notice-offset)) + var(--safe-bottom));
}

body:has(.cookie-notice) .site-footer__bottom-inner {
    padding-bottom: 18px;
}

body.apk-page:has(.cookie-notice) {
    padding-bottom: calc(88px + var(--cookie-notice-height, var(--cookie-notice-offset)) + var(--safe-bottom));
}

body.apk-page:has(.cookie-notice) .apk-mobile-bar {
    bottom: calc(var(--cookie-notice-height, var(--cookie-notice-offset)) + var(--safe-bottom));
}

@media (min-width: 768px) {
    body:has(.cookie-notice) {
        --cookie-notice-offset: 64px;
    }
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.container {
    width: min(calc(100% - 24px), var(--container));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 120;
    padding-top: var(--safe-top);
    backdrop-filter: blur(18px);
    background: var(--surface-glass);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-height: var(--header-height);
    padding-left: 156px;
}

.site-search {
    flex: 1 1 auto;
    width: min(100%, 420px);
    max-width: 420px;
    margin-right: auto;
}

.site-search__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-search__field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: var(--tap-min);
    padding: 4px 4px 4px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.site-search__input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.92rem;
}

.site-search__input:focus {
    outline: none;
}

.site-search__input::-webkit-search-cancel-button {
    cursor: pointer;
}

.site-search__submit {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--gradient);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
}

.search-results-head {
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.search-results-head__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

.search-results-head__meta {
    margin: 6px 0 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.search-results-head__empty {
    margin: 10px 0 0;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.site-header .brand {
    position: absolute;
    left: 0;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
}

.site-header .brand__logo {
    width: auto;
    height: 42px;
    max-width: 148px;
}

.brand__logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand__name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--primary);
}

.site-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 110;
    border: 0;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.site-nav-backdrop:not([hidden]) {
    display: block;
}

body.nav-open .site-nav-backdrop {
    opacity: 1;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav__link {
    min-height: var(--tap-min);
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link.is-active {
    background: rgba(79, 70, 229, 0.1);
    color: var(--accent);
}

.menu-toggle {
    display: none;
    position: relative;
    z-index: 130;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--primary);
    border-radius: 999px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

body.nav-open .menu-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

body.nav-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

body.nav-open .menu-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.page-main {
    padding: 28px 0 40px;
}

.hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 22px;
    padding: 28px 24px;
    border-radius: calc(var(--radius) + 4px);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.85);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--gradient-soft);
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero__title {
    margin: 0 0 10px;
    font-size: clamp(1.85rem, 5vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero__text {
    margin: 0;
    max-width: 720px;
    color: var(--text-muted);
    font-size: 1.02rem;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-head__title {
    margin: 0;
    font-size: clamp(1.2rem, 3vw, 1.45rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.section-head__subtitle {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.94rem;
}

.section-head--featured {
    margin-bottom: 16px;
}

.top-apks-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.section-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.scroll-hint {
    display: none;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--gradient-soft);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.filter-chips {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin: 0 -4px 18px;
    padding: 2px 4px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-chips--page-top {
    margin-bottom: 22px;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: var(--tap-min);
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.filter-chip.is-active,
.filter-chip:active {
    color: #fff;
    background: var(--gradient);
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(99, 102, 241, 0.24);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

.app-card {
    position: relative;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.app-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, 0.28);
}

.app-card__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 22px 16px 18px;
    height: 100%;
    text-align: center;
}

.app-card__icon-wrap {
    position: relative;
    width: 88px;
    height: 88px;
    flex-shrink: 0;
}

.app-card__icon {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.app-card__body {
    min-width: 0;
}

.app-card__chevron {
    display: none;
}

.app-card__views-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    pointer-events: none;
}

.app-card__views-icon {
    display: block;
    flex-shrink: 0;
    color: var(--text-muted);
    opacity: 0.85;
}

.app-card__views-count {
    font-variant-numeric: tabular-nums;
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    background: var(--gradient);
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.28);
}

.badge--trend {
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.badge--editors_choice {
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
}

.badge--inline {
    position: static;
    display: inline-block;
    margin-bottom: 10px;
}

.app-card__title {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.35;
    color: var(--accent);
    font-weight: 700;
}

.app-card__meta {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.app-card__extra {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}

.app-card__rating {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.app-card__rating .apk-rating__stars {
    display: inline-flex;
    gap: 1px;
}

.app-card__rating .apk-rating__star {
    font-size: 0.82rem;
    line-height: 1;
}

.app-card__rating-value {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
}

.app-card__rating--empty {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.app-card__updated {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.app-card__updated time {
    white-space: nowrap;
}

.app-card.is-hidden {
    display: none;
}

.apk-hero {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "icon content";
    gap: 24px;
    align-items: center;
    margin-bottom: 20px;
    padding: 28px 32px;
    border-radius: calc(var(--radius) + 6px);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.apk-hero__icon-wrap {
    grid-area: icon;
    position: relative;
    width: 112px;
    height: 112px;
    flex-shrink: 0;
}

.apk-hero__icon {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

.apk-hero__install {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 1;
}

.apk-hero__content {
    grid-area: content;
    min-width: 0;
    padding-right: 44px;
}

.apk-hero--no-hint .apk-hero__content {
    padding-right: 0;
}

.apk-hero__title {
    margin: 0 0 10px;
    font-size: clamp(1.75rem, 2.4vw, 2.2rem);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.apk-hero__desc {
    max-width: 62ch;
    margin: 0 0 16px;
    color: var(--text-muted);
    line-height: 1.55;
}

.apk-hero__quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.apk-hero__pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.apk-hero__pill--views {
    gap: 6px;
}

.apk-hero__views-icon {
    display: block;
    flex-shrink: 0;
    opacity: 0.85;
}

.apk-hero__views-count {
    font-variant-numeric: tabular-nums;
}

.apk-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
}

.apk-hero__actions .btn--lg {
    min-width: 180px;
}

.apk-install-hint {
    position: relative;
    display: inline-flex;
}

.apk-install-hint__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--accent);
    cursor: help;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.apk-install-hint__icon {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    font-style: italic;
    font-weight: 700;
    line-height: 1;
}

.apk-install-hint__trigger:hover,
.apk-install-hint__trigger:focus-visible {
    background: var(--gradient-soft);
    border-color: rgba(99, 102, 241, 0.35);
    outline: none;
}

.apk-install-hint__tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: auto;
    z-index: 30;
    width: min(320px, calc(100vw - 40px));
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 2px);
    background: var(--surface);
    box-shadow: var(--shadow-md);
    transform: none;
    text-align: left;
}

.apk-install-hint__tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 14px;
    left: auto;
    width: 12px;
    height: 12px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    transform: translateY(6px) rotate(225deg);
}

.apk-install-hint:hover .apk-install-hint__tooltip,
.apk-install-hint:focus-within .apk-install-hint__tooltip {
    display: block;
}

.apk-install-hint__title {
    margin: 0 0 10px;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.35;
}

.apk-install-hint__list {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.apk-install-hint__step + .apk-install-hint__step {
    margin-top: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--tap-min);
    padding: 0 22px;
    border: 0;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn--lg {
    min-height: 52px;
    padding: 0 26px;
    font-size: 1rem;
}

.btn--compact {
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-size: 0.92rem;
}

.btn--primary {
    color: #fff;
    background: var(--gradient);
    box-shadow: 0 14px 28px rgba(99, 102, 241, 0.28);
}

.btn--ghost {
    color: var(--primary);
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.cookie-notice {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    z-index: 200;
    box-sizing: border-box;
    height: auto;
    overflow: hidden;
    padding: 12px 16px calc(12px + var(--safe-bottom));
    background: #1e293b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
}

.cookie-notice.is-viewport-pinned {
    right: auto;
    bottom: auto;
}

.cookie-notice::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
    pointer-events: none;
}

.cookie-notice__box {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}

.cookie-notice__text {
    margin: 0;
    min-width: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8125rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.cookie-notice__link {
    color: #a5b4fc;
    text-decoration: underline;
    text-underline-offset: 2px;
    white-space: nowrap;
}

.cookie-notice__actions {
    display: block;
    width: 100%;
    flex-shrink: 0;
}

.cookie-notice__accept {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    padding: 0 24px;
    border: 0;
    border-radius: 10px;
    background: var(--gradient);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .cookie-notice {
        padding: 8px 12px calc(8px + var(--safe-bottom));
    }

    .cookie-notice__box {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .cookie-notice__text {
        flex: 1 1 auto;
        font-size: 0.6875rem;
        line-height: 1.35;
    }

    .cookie-notice__actions {
        width: auto;
        flex-shrink: 0;
    }

    .cookie-notice__accept {
        width: auto;
        min-width: 52px;
        min-height: 34px;
        padding: 0 12px;
        border-radius: 8px;
        font-size: 0.75rem;
        line-height: 34px;
    }
}

@media (min-width: 768px) {
    .cookie-notice {
        padding: 14px 20px calc(14px + var(--safe-bottom));
    }

    .cookie-notice__box {
        flex-direction: row;
        align-items: center;
        gap: 20px;
        max-width: var(--container);
        margin: 0 auto;
    }

    .cookie-notice__text {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 0.875rem;
    }

    .cookie-notice__actions {
        display: flex;
        width: auto;
    }

    .cookie-notice__accept {
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
        min-width: 96px;
        line-height: normal;
        text-align: center;
    }
}

.apk-mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 115;
    padding: 12px 0 calc(12px + var(--safe-bottom));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.08);
    transform: translateY(110%);
    transition: transform 0.28s ease;
}

.apk-mobile-bar.is-visible {
    transform: translateY(0);
}

.apk-mobile-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.apk-mobile-bar__info {
    min-width: 0;
}

.apk-mobile-bar__name {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.apk-mobile-bar__meta {
    display: block;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.apk-screenshots {
    margin-bottom: 24px;
}

.apk-rating {
    margin-bottom: 24px;
    padding: 22px 24px;
    border-radius: calc(var(--radius) + 2px);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.apk-rating__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    margin-bottom: 16px;
}

.apk-rating__title {
    margin: 0;
    font-size: 1.12rem;
    letter-spacing: -0.02em;
}

.apk-rating__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.apk-rating__average-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.apk-rating__count,
.apk-rating__empty {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.apk-rating__message {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.apk-rating__stars {
    display: inline-flex;
    gap: 3px;
}

.apk-rating__star {
    color: #dbe1ea;
    font-size: 1.45rem;
    line-height: 1;
    transition: color 0.15s ease, transform 0.15s ease;
}

.apk-rating__star.is-active {
    color: #f59e0b;
}

.apk-rating__picker,
.apk-rating__picked {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.apk-rating__pick {
    min-width: var(--tap-min);
    min-height: var(--tap-min);
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.apk-rating__pick .apk-rating__star {
    font-size: 2rem;
}

.apk-rating__pick:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 10px;
}

.apk-rating.is-rated .apk-rating__pick {
    pointer-events: none;
}

.apk-screenshots__title {
    margin: 0;
    font-size: 1.12rem;
    letter-spacing: -0.02em;
}

.apk-screenshots__track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    margin: 0 -12px;
    padding: 4px 12px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.apk-screenshots__track::-webkit-scrollbar {
    display: none;
}

.apk-screenshots__item {
    flex: 0 0 auto;
    scroll-snap-align: center;
    display: block;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--line);
}

.apk-screenshots__img {
    display: block;
    width: min(72vw, 240px);
    height: auto;
    aspect-ratio: 9 / 16;
    object-fit: cover;
    background: var(--surface-soft);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.stat-card__label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.stat-card__value {
    font-size: 0.98rem;
    font-weight: 700;
    word-break: break-word;
}

.stat-card__value--views {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.stat-card__views-icon {
    display: block;
    flex-shrink: 0;
    color: var(--text-muted);
    opacity: 0.85;
}

.stat-card__views-count {
    font-variant-numeric: tabular-nums;
}

.content-card,
.text-content,
.apk-content {
    padding: 24px;
    border-radius: calc(var(--radius) + 2px);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
}

.text-content h1,
.apk-content h2,
.apk-content h3,
.text-content h2,
.text-content h3 {
    letter-spacing: -0.02em;
}

.apk-content h2,
.text-content h2 {
    margin-top: 1.6em;
}

.filter-chips--page-top + .catalog {
    margin-top: 0;
}

.catalog + .section-head--featured {
    margin-top: 40px;
}

.section-head--featured + .top-apks-grid {
    margin-top: -8px;
}

.top-apks-grid + .hero {
    margin-top: 0;
}

.section-head--featured + .hero {
    margin-top: 22px;
}

.hero + .text-content--body {
    margin-top: 22px;
}

.hero + .text-content--body h2:first-child {
    margin-top: 0;
}

.catalog + .text-content--body {
    margin-top: 22px;
}

.catalog + .text-content--body h2:first-child {
    margin-top: 0;
}

.apk-content a,
.text-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.breadcrumb a {
    color: var(--accent);
}

.site-footer {
    position: relative;
    margin-top: 48px;
    overflow: hidden;
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
    color: rgba(255, 255, 255, 0.88);
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--gradient);
}

.site-footer__main {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    padding: 42px 0 34px;
}

.site-footer__logo {
    display: inline-flex;
    margin-bottom: 16px;
}

.site-footer__logo img {
    width: auto;
    height: 46px;
    max-width: 160px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.site-footer__about {
    margin: 0;
    max-width: 360px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.94rem;
    line-height: 1.65;
}

.site-footer__nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.site-footer__nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-footer__socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-start;
}

.site-footer__social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.site-footer__social--icon {
    width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 14px;
    background: #fff;
    border-color: transparent;
}

.site-footer__social--icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__bottom-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 18px;
    padding: 16px 0 calc(18px + var(--safe-bottom));
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.84rem;
}

.site-footer__copy {
    color: rgba(255, 255, 255, 0.68);
}

.site-footer__note {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .site-footer__main {
        grid-template-columns: 1fr 1fr;
    }

    .site-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .apk-hero {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "icon hint"
            "content content";
        gap: 14px 16px;
        align-items: start;
        padding: 20px 18px;
    }

    .apk-hero__install {
        position: static;
        grid-area: hint;
        align-self: start;
        justify-self: end;
    }

    .apk-hero__content {
        padding-right: 0;
    }

    .apk-hero--no-hint {
        grid-template-columns: 1fr;
        grid-template-areas:
            "icon"
            "content";
    }

    .apk-hero__icon-wrap {
        width: 80px;
        height: 80px;
    }

    .apk-hero__icon {
        border-radius: 20px;
    }

    .apk-hero__title {
        font-size: clamp(1.35rem, 5vw, 1.75rem);
    }

    .apk-hero__desc {
        max-width: none;
    }

    .apk-hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .apk-hero__actions .btn {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(calc(100% - 20px), var(--container));
    }

    .site-header__inner {
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding-left: 0;
        padding-top: 8px;
        padding-bottom: 8px;
        gap: 10px;
    }

    .site-header .brand {
        position: static;
        transform: none;
        flex: 0 0 auto;
        order: 1;
    }

    .menu-toggle {
        display: block;
        order: 2;
        flex: 0 0 auto;
    }

    .site-search {
        order: 3;
        flex: 1 0 100%;
        width: 100%;
        max-width: none;
        margin-right: 0;
    }

    .site-search__submit {
        padding: 0 12px;
    }

    .page-main {
        padding-top: 18px;
    }

    .site-nav {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 125;
        width: min(320px, 86vw);
        height: 100dvh;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: calc(var(--header-height) + var(--safe-top) + 20px) 18px calc(20px + var(--safe-bottom));
        background: var(--surface);
        box-shadow: var(--shadow-lg);
        border-left: 1px solid var(--line);
        transform: translateX(105%);
        transition: transform 0.28s ease;
    }

    body.nav-open .site-nav {
        transform: translateX(0);
    }

    .site-nav__link {
        width: 100%;
        border-radius: var(--radius-sm);
        font-size: 1rem;
    }

    .hero {
        padding: 22px 18px;
    }

    .scroll-hint {
        display: inline-flex;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .top-apks-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .app-card {
        border-radius: var(--radius-sm);
    }

    .app-card__link {
        flex-direction: row;
        align-items: center;
        gap: 14px;
        padding: 14px 16px;
        text-align: left;
    }

    .app-card__icon-wrap,
    .app-card__icon {
        width: 64px;
        height: 64px;
    }

    .app-card__icon {
        border-radius: 16px;
    }

    .app-card__body {
        flex: 1;
    }

    .app-card__title {
        font-size: 0.94rem;
    }

    .app-card__chevron {
        display: block;
        flex-shrink: 0;
        color: var(--text-muted);
        font-size: 1.5rem;
        line-height: 1;
    }

    .app-card:active {
        transform: scale(0.985);
    }

    .stats-grid--scroll {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        margin-right: -10px;
        padding: 2px 2px 8px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .stats-grid--scroll::-webkit-scrollbar {
        display: none;
    }

    .stats-grid--scroll .stat-card {
        flex: 0 0 min(42vw, 170px);
        scroll-snap-align: start;
    }

    .apk-hero {
        gap: 12px 12px;
        padding: 18px 16px;
    }

    .apk-hero__install {
        top: auto;
        right: auto;
    }

    .apk-hero__icon-wrap {
        width: 72px;
        height: 72px;
    }

    .apk-hero__icon {
        border-radius: 18px;
        margin: 0;
    }

    .apk-hero__install {
        align-self: start;
        justify-self: end;
    }

    .apk-hero__content {
        padding-top: 2px;
    }

    .apk-hero__title {
        font-size: 1.42rem;
        margin-bottom: 10px;
    }

    .apk-hero__desc {
        font-size: 0.92rem;
        line-height: 1.55;
        margin-bottom: 14px;
    }

    .apk-hero__quick {
        gap: 6px;
        margin-bottom: 16px;
    }

    .apk-hero__pill {
        min-height: 30px;
        padding: 0 10px;
        font-size: 0.74rem;
    }

    .badge--inline {
        margin-bottom: 8px;
    }

    .apk-hero__actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .apk-hero__actions .btn {
        width: 100%;
    }

    .apk-rating {
        padding: 18px 16px;
    }

    .apk-rating__picker {
        justify-content: center;
        width: 100%;
    }

    .content-card,
    .text-content,
    .apk-content {
        padding: 18px 16px;
    }

    .site-footer__main {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 32px 0 26px;
    }

    .site-footer__nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px 16px;
    }

    .site-footer__bottom-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (min-width: 761px) {
    .apk-mobile-bar {
        display: none !important;
    }
}

@media (hover: hover) {
    .btn:hover {
        transform: translateY(-1px);
    }

    .app-card:hover {
        transform: translateY(-3px);
    }

    .site-nav__link:hover,
    .filter-chip:hover {
        transform: translateY(-1px);
    }

    .apk-rating__pick:hover .apk-rating__star,
    .apk-rating__pick:focus-visible .apk-rating__star {
        color: #fbbf24;
        transform: scale(1.08);
    }

    .apk-rating__picker:hover .apk-rating__pick .apk-rating__star.is-active {
        color: #f59e0b;
    }

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

    .site-footer__nav-link:hover,
    .site-footer__social:hover {
        color: #fff;
        transform: translateY(-1px);
    }

    .site-footer__social:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .site-footer__social--icon:hover {
        background: #fff;
        border-color: transparent;
        box-shadow: 0 10px 24px rgba(255, 255, 255, 0.12);
    }

    .cookie-notice__accept:hover {
        transform: translateY(-1px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
