/* =========================================================
   TOKENS — те же переменные, что на about.html/subscribe.html,
   для полного визуального единства с сайтом.
========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg: #F6F7FB;
    --surface: #FFFFFF;
    --surface-soft: #FBFBFE;
    --ink: #14151A;
    --ink-soft: #5B5F6B;
    --ink-faint: #9AA0AE;
    --border: #E7E8F0;
    --border-soft: #F0F1F7;

    --coral: #FF4D6D;
    --coral-tint: #FFE6EB;
    --teal: #17B0A3;
    --teal-tint: #DFF6F2;
    --violet: #7C6CF0;
    --violet-tint: #EAE7FE;
    --gold: #F5A623;
    --gold-tint: #FDF0DC;

    --r-xl: 32px;
    --r-lg: 24px;
    --r-md: 16px;
    --r-sm: 11px;

    --shadow-sm: 0 1px 2px rgba(20, 21, 26, .05);
    --shadow-md: 0 14px 34px -18px rgba(20, 21, 26, .28);
    --shadow-lg: 0 30px 70px -30px rgba(20, 21, 26, .32);

    --ease: cubic-bezier(.16, 1, .3, 1);
}
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}
h1, h2, h3, .display { font-family: 'Unbounded', sans-serif; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--coral); color: #fff; }
svg { display: block; }

/* =========================================================
   NAV (идентична about.html/subscribe.html)
========================================================= */
#nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px clamp(20px, 4vw, 56px);
    background: rgba(246, 247, 251, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}
.logo { display: flex; flex-direction: column; line-height: .78; cursor: pointer; user-select: none; }
.logo .flip {
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: 22px;
    transform: rotate(180deg) scaleX(-1);
    transition: transform .5s var(--ease), color .3s ease;
}
.logo:hover .flip { transform: rotate(0deg) scaleX(1); color: var(--coral); }
.logo .app {
    font-family: 'Unbounded', sans-serif;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: .18em;
    color: var(--ink-soft);
    margin-top: 8px;
}
.nav-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
    transition: color .2s ease;
    position: relative;
    padding: 4px 0;
    cursor: pointer;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    height: 1.5px; width: 0;
    background: var(--ink);
    transition: width .25s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--ink); }
.nav-link.active::after { width: 100%; background: var(--coral); }
.lang-switch { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.heart-nav {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface);
    color: var(--ink-soft); transition: all .2s ease; flex: none;
}
.heart-nav svg { width: 16px; height: 16px; }
.heart-nav:hover { border-color: var(--coral); color: var(--coral); }
.lang-btn {
    border: none; background: transparent; padding: 6px 15px; border-radius: 999px;
    font-weight: 600; font-size: 12.5px; cursor: pointer; color: var(--ink-soft);
    font-family: 'Inter', sans-serif; transition: background .2s ease, color .2s ease;
}
.lang-btn.active { background: var(--ink); color: #fff; }
.lang-btn:hover:not(.active) { background: var(--border-soft); }
.btn-primary {
    display: inline-flex; align-items: center; justify-content:center; gap: 8px;
    padding: 12px 22px; border-radius: 999px; border: none;
    background: var(--ink); color: #fff; font-weight: 700; font-size: 13.5px;
    cursor: pointer; font-family: 'Inter', sans-serif; white-space: nowrap;
    transition: background .2s ease, transform .2s ease;
}
.btn-primary:hover { background: var(--coral); transform: translateY(-2px); }
.btn-outline {
    display: inline-flex; align-items: center; justify-content:center; gap: 8px;
    padding: 10.5px 20px; border-radius: 999px; border: 1.5px solid var(--ink);
    background: transparent; color: var(--ink); font-weight: 700; font-size: 13.5px;
    cursor: pointer; font-family: 'Inter', sans-serif; white-space: nowrap;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.btn-outline:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }

@media (max-width: 760px) {
    .nav-links { gap: 12px 16px; font-size: 12.5px; }
    .nav-link { font-size: 12.5px; }
}

/* =========================================================
   HERO
========================================================= */
.apps-hero { max-width: 760px; margin: 48px auto 8px; padding: 0 20px; text-align: center; }
.apps-hero h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
.apps-hero p { color: var(--ink-soft); font-size: 15.5px; }

/* =========================================================
   ФИЛЬТРЫ
========================================================= */
.apps-filters {
    max-width: 960px; margin: 32px auto 8px; padding: 0 20px;
    display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
}
.filter-tab {
    border: 1.5px solid var(--border); background: var(--surface); color: var(--ink-soft);
    font-family: 'Inter', sans-serif; font-weight: 600; font-size: 13.5px;
    padding: 9px 18px; border-radius: 999px; cursor: pointer; transition: all .2s ease;
}
.filter-tab:hover { border-color: var(--ink); color: var(--ink); }
.filter-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* =========================================================
   СЕТКА / КАРТОЧКИ
========================================================= */
.apps-wrap { max-width: 1120px; margin: 24px auto 80px; padding: 0 20px; }
.apps-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px;
}
.apps-loading, .apps-empty { text-align: center; color: var(--ink-faint); padding: 60px 0; font-size: 14px; }
.app-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 22px; display: flex; flex-direction: column; gap: 14px;
    box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease;
    position: relative;
}
.app-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.app-card.locked { opacity: .92; }
.app-card-top { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
/* Обложка карточки — на всю ширину карточки (выходит за внутренние отступы до самых краёв).
   Пропорции меняются одной переменной --app-cover-ratio. */
.app-card { --app-cover-ratio: 16 / 10; }
.app-icon {
    display: block; width: calc(100% + 44px); max-width: none; height: auto; aspect-ratio: var(--app-cover-ratio);
    margin: -22px -22px 0; border: 0; border-bottom: 1px solid var(--border);
    border-radius: calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0;
    object-fit: cover; background: var(--border-soft); flex: none;
}
.app-icon.placeholder { display:flex; align-items:center; justify-content:center; font-size:44px; color:var(--ink-faint); }
.app-name { font-family: 'Unbounded', sans-serif; font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.app-desc { color: var(--ink-soft); font-size: 13.5px; line-height: 1.55; flex: 1; }
.app-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
    background: var(--border-soft); color: var(--ink-soft);
}
.chip.plan-free { background: var(--teal-tint); color: var(--teal); }
.chip.plan-pro { background: var(--violet-tint); color: var(--violet); }
.chip.plan-super { background: var(--gold-tint); color: var(--gold); }
.app-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.app-actions .btn-primary, .app-actions .btn-outline { flex: 1; padding: 10px 14px; font-size: 13px; }
.lock-badge {
    position: absolute; top: 18px; right: 18px; width: 30px; height: 30px; border-radius: 50%;
    background: var(--surface); border: 1.5px solid var(--border); display: flex; align-items: center;
    justify-content: center; font-size: 14px;
}

/* =========================================================
   МОДАЛКА "СКОРО"
========================================================= */
.apps-modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(20,21,26,.45); backdrop-filter: blur(3px);
    z-index: 200; align-items: center; justify-content: center; padding: 20px;
}
.apps-modal-overlay.open { display: flex; }
.apps-modal {
    background: var(--surface); border-radius: var(--r-xl); padding: 36px 30px; max-width: 360px; width: 100%;
    text-align: center; position: relative; box-shadow: var(--shadow-lg);
}
.apps-modal-icon { font-size: 36px; margin-bottom: 12px; }
.apps-modal h3 { font-size: 18px; margin-bottom: 10px; }
.apps-modal p { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 22px; }
.apps-modal-close {
    position: absolute; top: 14px; right: 14px; border: none; background: none; font-size: 20px;
    color: var(--ink-faint); cursor: pointer; line-height: 1;
}
