:root {
    --color-text: #1a2634;
    --color-text-muted: #4a5a6a;
    --color-text-light: #7a8a9a;
    --color-border: #dce5ec;
    --color-border-soft: #e8edf5;
    --color-primary: #1d7e5c;
    --color-primary-dark: #0f6448;
}

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

body {
    min-height: 100vh;
    padding: 20px 0;
    background: linear-gradient(135deg, #f5f7fc 0%, #e8edf5 100%);
    color: var(--color-text);
    font-family: system-ui, -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;
    line-height: 1.5;
}

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

a:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(29, 126, 92, 0.35);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 8px 14px;
    border-radius: 5px;
    background: var(--color-text);
    color: #ffffff;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.metrics-noscript {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 18px;
    background: #ffffff;
}

.main-content {
    min-width: 0;
}

/* Главная страница */

.apps-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.catalog-title {
    font-size: 1.5em;
    line-height: 1.2;
}

.app-card {
    padding: 20px;
    border: 1px solid var(--color-border-soft);
    border-radius: 8px;
    background: #fafbfc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
    border-color: #d0d9e4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.app-card__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}

.app-card__header h2 {
    color: var(--color-text);
    font-size: 1.15rem;
    font-weight: 700;
}

.app-card__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 5px;
    object-fit: cover;
}

.app-card > p {
    margin-bottom: 14px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Кнопки */

.button {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 5px;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.button:hover {
    background: var(--color-primary-dark);
    box-shadow: 0 4px 12px rgba(29, 126, 92, 0.3);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button--compact {
    padding: 4px 14px;
    font-size: 0.75rem;
}

.button--large {
    padding: 10px 32px;
    font-size: 1rem;
    letter-spacing: 0.02em;
}

/* Страницы приложений */

.app-hero {
    margin-bottom: 24px;
    padding-top: 10px;
}

.app-hero__heading {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 16px;
}

.app-hero__icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 5px;
    object-fit: cover;
}

.app-hero > p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.content-section {
    margin-bottom: 24px;
}

.section-heading {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.content-list {
    margin: 0 0 20px;
    padding-left: 1.5rem;
    list-style-position: outside;
}

.content-list li {
    padding-left: 0.2rem;
    line-height: 1.6;
}

.content-list li + li {
    margin-top: 6px;
}

.content-image {
    width: 100%;
    height: auto;
    border: 1px solid var(--color-border-soft);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(26, 38, 52, 0.08);
}

.notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    padding: 5px;
    border-left: 5px solid;
    border-radius: 5px;
}

.notice--warning {
    border-color: #f5a623;
    background: #fffaf2;
}

.notice--support {
    border-color: #53ba53;
    background: #d2f8d2;
}

.notice__icon {
    flex-shrink: 0;
    font-size: 1.2rem;
}

.notice p {
    color: #6a5a3a;
    font-size: 0.95rem;
    line-height: 1.5;
}

.video-panel {
    overflow: hidden;
    padding: 10px;
    border-radius: 5px;
}

.media-frame {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
    padding-bottom: 56.25%;
    background: #1a1a1a;
}

.media-frame video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.versions-panel {
    padding: 10px;
    border-radius: 5px;
    background: #ffffff;
}

.table-scroll {
    margin: 0 -8px;
    overflow-x: auto;
}

.version-table {
    width: 100%;
    border-collapse: collapse;
}

.version-table th {
    padding: 6px 12px;
    border-bottom: 2px solid #c8d4de;
    background: #e8edf4;
    color: #1a3a4a;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-align: left;
    text-transform: uppercase;
}

.version-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #eef3f8;
    color: #2a3a44;
    font-size: 0.85rem;
}

.version-table tbody tr:nth-child(odd) td {
    background: #f8fafc;
}

.version-table tbody tr:nth-child(even) td {
    background: #ffffff;
}

.version-table tbody tr:hover td {
    background: #eaf3fa;
}

.version-table tbody tr:last-child td {
    border-bottom: 0;
}

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

/* Страница поддержки */

.donate-header {
    margin-bottom: 24px;
    padding-top: 10px;
    text-align: center;
}

.donate-header h1 {
    margin-bottom: 12px;
    color: var(--color-text);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.donate-content {
    margin-bottom: 24px;
    padding: 4px 0;
}

.article-block {
    max-width: 800px;
    margin: 0 auto;
}

.article-block p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    text-align: left;
}

.donate-actions {
    margin-bottom: 24px;
    padding: 8px 0 4px;
    text-align: center;
}

.donate-actions .button:hover {
    box-shadow: 0 6px 18px rgba(29, 126, 92, 0.35);
    transform: translateY(-2px);
}

.donate-actions .button:active {
    transform: translateY(0);
}

/* Подвал */

.site-footer {
    padding: 8px 0 0;
    text-align: center;
}

.site-footer__line {
    margin-bottom: 16px;
    border-top: 1px solid var(--color-border);
}

.site-footer__content {
    display: block;
}

.site-footer p {
    margin-bottom: 4px;
    color: var(--color-text-light);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.yandex-badge {
    display: block;
    width: 88px;
    margin: 0 auto;
}

.yandex-badge img {
    width: 88px;
    height: 31px;
    border: 0;
}

/* Адаптивность */

@media (max-width: 768px) {
    body {
        padding: 12px 0;
    }

    .container {
        padding: 0 16px;
    }

    .app-card {
        padding: 16px;
    }

    .app-card__header h2 {
        font-size: 1.05rem;
    }

    .app-card > p {
        font-size: 0.85rem;
    }

    .app-card__icon {
        width: 44px;
        height: 44px;
    }

    .app-page .app-hero,
    .app-page .versions-panel {
        padding: 20px 20px 16px;
    }

    .app-hero > p {
        font-size: 0.95rem;
    }

    .app-hero__icon {
        width: 64px;
        height: 64px;
    }

    .version-table th,
    .version-table td {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .button--compact {
        padding: 3px 12px;
        font-size: 0.7rem;
    }

    .donate-header {
        padding: 20px 20px 16px;
    }

    .donate-header h1 {
        font-size: 1.6rem;
    }

    .article-block {
        max-width: 100%;
    }

    .article-block p {
        font-size: 0.95rem;
    }

    .button--large {
        padding: 8px 26px;
        font-size: 0.9rem;
    }
}

@media (max-width: 580px) {
    .donate-header {
        padding: 16px 16px 14px;
    }

    .donate-header h1 {
        font-size: 1.4rem;
    }

    .article-block p {
        font-size: 0.9rem;
    }

    .button--large {
        width: 100%;
        max-width: 280px;
        padding: 8px 22px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .app-card__header {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        text-align: center;
    }

    .app-card {
        padding: 14px;
        text-align: center;
    }

    .app-card > p {
        text-align: left;
    }

    .app-card__icon {
        width: 48px;
        height: 48px;
    }

    .app-hero__heading {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }

    .app-page .app-hero,
    .app-page .versions-panel {
        padding: 16px 16px 14px;
    }

    .notice--warning {
        flex-direction: column;
        align-items: center;
        padding: 14px 16px;
        text-align: center;
    }

    .version-table th,
    .version-table td {
        padding: 5px 8px;
        font-size: 0.7rem;
    }

    .app-hero__icon {
        width: 56px;
        height: 56px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
