/* Global shell, header, buttons, tables and helpers */

:root {
    --primary: #38bdf8;
    --primary2: #6366f1;
    --card: rgba(255,255,255,.05);
    --card-border: rgba(255,255,255,.08);
    --muted: rgba(255,255,255,.7);
    --text-accent: #c084fc;
}

html {
    min-height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: #050816;
    font-family: Arial, sans-serif;
    color: var(--text-accent);
    min-height: 100svh;
    overflow-x: hidden;
}

.head {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    padding: 16px 40px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    position: relative;
    overflow: hidden;
    top: 0;
    z-index: 1000;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 2px;
    color: purple;
    text-shadow: 0 10px 20px purple, 0 0 20px #0ea5e9;
    text-decoration: none;
    white-space: nowrap;
}

.logo:hover {
    color: white;
}

.head__menu {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    margin-left: 0;
    min-width: 0;
}

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

.head-search {
    display: flex;
    flex: 0 1 320px;
    align-items: center;
    width: min(28vw, 320px);
    min-width: 180px;
    margin-left: auto;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(2,6,23,.54);
}

.head-search input {
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    border: 0;
    outline: 0;
    background: transparent;
    color: white;
}

.head-search input::placeholder {
    color: rgba(255,255,255,.54);
}

.head-search:focus-within {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168,85,247,.16);
}

.head-search button {
    align-self: stretch;
    padding: 0 16px;
    border: 0;
    color: white;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    cursor: pointer;
}

.nav {
    display: grid;
    flex-shrink: 0;
    align-items: center;
    gap: 3px;
}

.nav__row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav__row--secondary {
    padding-top: 3px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.nav a {
    display: inline-flex;
    align-items: center;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    position: relative;
    transition: 0.3s;
    white-space: nowrap;
}

.nav a:hover {
    color: white;
    text-shadow: 0 0 10px #38bdf8;
}

@media (min-width: 1181px) {
    .nav__row--primary a {
        font-size: 20px;
        font-weight: 600;
        line-height: 1.05;
    }
}

.auth {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    transition: 0.3s;
}

.nav-toggle,
.nav-close {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.06);
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.nav-toggle {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 999px;
    white-space: nowrap;
}

.nav-toggle__icon {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    width: 18px;
}

.nav-toggle__icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: white;
}

.nav-toggle__label {
    font-size: 14px;
    letter-spacing: .02em;
}

.nav-close {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.nav-toggle:hover,
.nav-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(56,189,248,0.18);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(56,189,248,0.4);
}

.btn-primary {
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    border: none;
}

.head::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(56,189,248,0.15), transparent 60%);
    animation: glowMove 6s infinite linear;
    z-index: -1;
    pointer-events: none;
}

.head__menu-top,
.head__overlay {
    display: none;
}

body.menu-open {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
}

.text {
    color: white;
}

@keyframes glowMove {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background: rgba(255,255,255,0.05);
    color: var(--muted);
}

tr {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

tr:hover {
    background: rgba(56,189,248,0.05);
}

.glaf {
    position: fixed;
}

@media (max-width: 1180px) {
    .head {
        gap: 10px;
        padding: 10px 14px;
        align-items: center;
        justify-content: flex-start;
        position: sticky;
        overflow: visible;
    }

    .head::before {
        animation: none;
        transform: none;
    }

    .logo {
        order: 0;
        font-size: 17px;
        letter-spacing: .8px;
        max-width: calc(100vw - 92px);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-toggle {
        display: inline-flex;
        order: -1;
        margin-left: 0;
        width: 48px;
        padding: 0;
        border-radius: 14px;
    }

    .nav-close {
        display: inline-flex;
    }

    .nav-toggle__label {
        display: none;
    }

    .nav-toggle__icon {
        width: 20px;
    }

    .head__menu {
        position: fixed;
        top: 0;
        left: 0;
        bottom: auto;
        height: 100dvh;
        max-height: 100dvh;
        width: min(86vw, 340px);
        padding: 18px 18px 22px;
        border-radius: 0 28px 28px 0;
        background: rgba(5, 8, 22, 0.96);
        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: 0 30px 60px rgba(0,0,0,0.42);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 18px;
        overflow-y: auto;
        overflow-x: hidden;
        box-sizing: border-box;
        transform: translateX(-105%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.25s ease, opacity 0.2s ease, visibility 0.2s ease;
        z-index: 1002;
        margin-left: 0;
    }

    .head__menu.is-open {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .head__menu-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
    }

    .head__menu-eyebrow {
        display: block;
        margin-bottom: 4px;
        text-transform: uppercase;
        letter-spacing: .14em;
        font-size: 11px;
        color: #7dd3fc;
    }

    .head__menu-top strong {
        display: block;
        font-size: 18px;
        color: white;
    }

    .head__overlay {
        display: block;
        position: fixed;
        inset: 0;
        border: 0;
        background: rgba(2, 6, 23, 0.72);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s ease;
        z-index: 1001;
        padding: 0;
    }

    .head__overlay.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav,
    .auth {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .nav {
        display: grid;
    }

    .nav__row {
        display: flex;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .nav__row--secondary {
        margin-top: 2px;
        padding-top: 12px;
    }

    .head-search {
        flex: 0 0 48px;
        width: 100%;
        height: 48px;
        min-width: 0;
        min-height: 48px;
        margin-left: 0;
        border-radius: 16px;
        box-sizing: border-box;
    }

    .head-search input {
        font-size: 16px;
    }

    .head-search button {
        padding: 0 18px;
    }

    .nav a,
    .auth .btn {
        width: 100%;
        min-height: 48px;
        box-sizing: border-box;
        padding: 14px 16px;
        border-radius: 16px;
        font-size: 15px;
    }

    .nav a {
        justify-content: flex-start;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.08);
    }

    .auth .btn {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .head {
        padding: 8px 12px;
    }

    .logo {
        font-size: 16px;
    }

    .nav-toggle {
        width: 44px;
        height: 44px;
    }

    .head__menu {
        width: min(88vw, 320px);
        padding: 16px 16px 20px;
        border-radius: 0 22px 22px 0;
    }

    .btn {
        min-height: 48px;
        padding: 14px 16px;
        border-radius: 14px;
        font-size: 15px;
    }

    .btn-primary {
        padding: 14px 18px;
    }

    .site-footer {
        flex-direction: column;
        gap: 12px;
        width: calc(100% - 32px);
        padding-bottom: 24px;
        line-height: 1.55;
    }

    .site-footer > span[aria-hidden="true"] {
        display: none;
    }
}

.site-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: min(1180px, calc(100% - 32px));
    margin: 40px auto 0;
    padding: 22px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
}

.site-footer__links {
    display: flex;
    flex: 1 0 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 6px;
}

.site-footer a,
.video-source a {
    color: #7dd3fc;
}

.video-source {
    margin: 12px 0 0;
    color: #94a3b8;
    font-size: 14px;
}

/* Телефон в горизонтальной ориентации: меню использует ширину экрана,
   не превращаясь в длинную вертикальную колонку. */
@media (orientation: landscape) and (max-width: 950px) and (max-height: 600px) {
    .head {
        min-height: 52px;
        padding: 4px 10px;
        box-sizing: border-box;
    }

    .logo {
        font-size: 15px;
    }

    .nav-toggle {
        width: 40px;
        min-height: 40px;
        height: 40px;
    }

    .head__menu {
        width: min(92vw, 760px);
        padding: 12px;
        border-radius: 0 20px 20px 0;
        gap: 10px;
    }

    .head__menu-top {
        align-items: center;
    }

    .head__menu-eyebrow {
        margin-bottom: 2px;
        font-size: 9px;
    }

    .head__menu-top strong {
        font-size: 16px;
    }

    .nav-close {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .nav__row {
        gap: 6px;
    }

    .nav__row--secondary {
        margin: 0;
        padding: 0 0 0 10px;
        border-top: 0;
        border-left: 1px solid rgba(255,255,255,.1);
    }

    .nav a,
    .auth .btn {
        min-height: 38px;
        padding: 8px 12px;
        border-radius: 12px;
        font-size: 14px;
    }

    .head-search {
        flex-basis: 42px;
        height: 42px;
        min-height: 42px;
        border-radius: 13px;
    }

    .auth {
        flex-direction: row;
        gap: 8px;
    }

    .auth .btn {
        flex: 1 1 0;
    }

    .site-footer {
        margin-top: 26px;
        padding: 16px 0 20px;
    }
}
