:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #161616;
    --bg-tertiary: #202020;
    --bg-card: rgba(255, 255, 255, 0.04);
    --accent-primary: #6777F5;
    --accent-secondary: #8593FE;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --border-color: #333333;
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --success: #00d4aa;
    --warning: #ffb347;
    --error: #ff6b6b;
    --header-padding: 8px 20px;
    --footer-margin-top: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    line-height: 1.6;
    height: 100vh;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: scroll-position;
}

.container {
    max-width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 20px;
    margin-bottom: 6px;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.header-title-section {
    justify-self: start;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    align-items: flex-start;
}

.nav-buttons {
    justify-self: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.logo-container svg {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.logo-container svg path {
    fill: currentColor;
}

.logo-container svg path[fill="#FDFDFD"] {
    fill: #FDFDFD;
}

.logo-container svg path[fill="#4D70EF"] {
    fill: #4D70EF;
}

.logo-container svg path[fill="#003C96"] {
    fill: #003C96;
}

.logo-container svg path[fill="#E4E3E3"] {
    fill: #E4E3E3;
}

.logo-container svg path[fill="black"] {
    fill: black;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    width: 100%;
    max-width: 1000px;
}

.menu-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
}

.menu-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 12px 32px rgba(103, 119, 245, 0.3);
}

.card-image-container {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.menu-card:hover .card-image {
    transform: scale(1.1);
}

.card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.card-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.footer {
    margin-top: 10px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-copyright {
    background: var(--bg-tertiary);
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.footer-copyright .footer-text {
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
}

.footer-text {
    color: var(--text-muted);
    font-size: 11px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-link:hover {
    color: var(--accent-primary);
    background: rgba(103, 119, 245, 0.1);
}

.footer-link svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-link-telegram {
    background: #0077b3 !important;
    color: white !important;
    box-shadow: 0 2px 6px rgba(0, 136, 204, 0.3);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-link-telegram .telegram-icon {
    width: 18px;
    height: 18px;
}

.footer-link-telegram:hover {
    background: #006799 !important;
    box-shadow: 0 3px 10px rgba(0, 136, 204, 0.4);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
}

/* ==================== Правки интерфейса (19.10.2026) ==================== */

/* Страница скроллится целиком, футер не перекрывает контент */
body {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.container {
    height: auto;
    min-height: 100vh;
    overflow: visible;
}

.main-content {
    overflow: visible;
}

.footer {
    margin-top: auto;
}

/* Скриншоты в карточках больше не обрезаются по краям */
.card-image {
    object-fit: contain;
    padding: 14px;
}

.menu-card:hover .card-image {
    transform: scale(1.03);
}

@media (max-width: 768px) {
    .card-image-container {
        height: 200px;
    }

    .main-content {
        padding: 24px 0;
    }

    /* Шапка на телефоне: логотип и навигация в столбик, иначе кнопки уезжают за экран */
    .header-content {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 10px;
    }

    .header-title-section {
        justify-self: center;
        align-items: center;
    }

    .nav-buttons {
        justify-self: center;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .info-tooltip {
        min-width: 0;
        max-width: calc(100vw - 40px);
    }
}

/* ==================== Matte-поверхности и доступность (20.10.2026) ==================== */
/* Ориентир — тёмные дашборды: мягкая тень вместо тяжёлой, уважаем «меньше движения»,
   dvh вместо vh (учитывает панели мобильного браузера). */
:root {
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.24);
}

.menu-card {
    border-radius: 14px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

@supports (height: 100dvh) {
    body,
    .container {
        min-height: 100dvh;
    }
}
