/* ============================================================
   SKYMEMO — ОСНОВНЫЕ ПЕРЕМЕННЫЕ
   ============================================================ */

:root {
    --color-background: #0a1628;
    --color-background-dark: #07101e;
    --color-surface: #0f1f35;
    --color-surface-light: #142944;
    --color-primary: #4a9eff;
    --color-primary-light: #6bb8ff;
    --color-primary-dark: #267edb;
    --color-text: #ffffff;
    --color-text-secondary: #88aacc;
    --color-text-muted: #6688aa;
    --color-border: rgba(74, 158, 255, 0.15);
    --color-border-light: rgba(74, 158, 255, 0.08);
    --color-danger: #ff6b6b;
    --color-success: #63d98a;
    --color-warning: #ffc800;

    --sidebar-width: 70px;
    --sidebar-open-width: 240px;
    --header-height: 62px;

    --border-radius-small: 8px;
    --border-radius: 12px;
    --border-radius-large: 18px;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}


/* ============================================================
   СБРОС И ГЛОБАЛЬНЫЕ СТИЛИ
   ============================================================ */

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

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    padding-left: var(--sidebar-width);
    overflow-x: hidden;
    background:
        radial-gradient(
            circle at top right,
            rgba(74, 158, 255, 0.08),
            transparent 30%
        ),
        var(--color-background);
    color: var(--color-text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    font-size: 16px;
    line-height: 1.6;
    transition: padding-left var(--transition-normal);
}

body.sidebar-open {
    padding-left: var(--sidebar-open-width);
}

body.modal-open {
    overflow: hidden;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

button {
    border: 0;
    outline: 0;
    cursor: pointer;
}

input,
textarea {
    -webkit-user-select: text;
    user-select: text;
}

img,
video,
canvas,
svg {
    max-width: 100%;
}

img {
    display: block;
}

[hidden] {
    display: none !important;
}

::selection {
    background: rgba(74, 158, 255, 0.35);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}


/* ============================================================
   ПОЛОСА ПРОКРУТКИ
   ============================================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-background-dark);
}

::-webkit-scrollbar-thumb {
    border: 2px solid var(--color-background-dark);
    border-radius: 20px;
    background: #244463;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}


/* ============================================================
   БОКОВОЕ МЕНЮ
   ============================================================ */

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1100;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    overflow: hidden;
    padding: 20px 0;
    border-right: 1px solid var(--color-border);
    background: rgba(10, 22, 40, 0.97);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition:
        width var(--transition-normal),
        transform var(--transition-normal);
}

.sidebar.open {
    width: var(--sidebar-open-width);
}

.sidebar-logo {
    display: flex;
    width: 100%;
    min-height: 48px;
    flex-shrink: 0;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
    padding: 0 20px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    white-space: nowrap;
    transition: opacity var(--transition-fast);
}

.sidebar-logo:hover {
    opacity: 0.85;
}

.sidebar-logo-icon {
    display: flex;
    width: 30px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 28px;
}

.sidebar-logo-text {
    overflow: hidden;
    opacity: 0;
    background: linear-gradient(
        135deg,
        var(--color-primary),
        var(--color-primary-light)
    );
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    font-size: 22px;
    font-weight: 750;
    letter-spacing: -0.4px;
    transition: opacity var(--transition-normal);
}

.sidebar.open .sidebar-logo-text {
    opacity: 1;
}

.sidebar-nav {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 10px;
}

.sidebar-link {
    position: relative;
    display: flex;
    min-height: 48px;
    flex-shrink: 0;
    align-items: center;
    gap: 14px;
    padding: 11px 15px;
    overflow: hidden;
    border-radius: var(--border-radius);
    color: #8fa5ba;
    white-space: nowrap;
    transition:
        color var(--transition-fast),
        background var(--transition-fast),
        transform var(--transition-fast);
}

.sidebar-link:hover {
    background: rgba(74, 158, 255, 0.1);
    color: var(--color-text);
}

.sidebar-link:active {
    transform: scale(0.98);
}

.sidebar-link.active {
    background: rgba(74, 158, 255, 0.16);
    color: var(--color-primary-light);
}

.sidebar-link.active::before {
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--color-primary);
    content: "";
}

.sidebar-icon {
    display: flex;
    width: 24px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    color: inherit;
    font-size: 19px;
}

.sidebar-text {
    overflow: hidden;
    opacity: 0;
    font-size: 14px;
    font-weight: 550;
    transition: opacity var(--transition-normal);
}

.sidebar.open .sidebar-text {
    opacity: 1;
}


/* ============================================================
   ШАПКА
   ============================================================ */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: var(--header-height);
    border-bottom: 1px solid rgba(74, 158, 255, 0.1);
    background: rgba(10, 22, 40, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.header-container {
    display: flex;
    width: 100%;
    min-height: var(--header-height);
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 9px 24px;
}

.header-left {
    display: none;
}

.header-center {
    width: 100%;
    max-width: 560px;
    flex: 1;
}

.header-right {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
}

.search-box {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    padding: 7px 17px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    cursor: text;
    transition:
        border-color var(--transition-normal),
        background var(--transition-normal),
        box-shadow var(--transition-normal);
}

.search-box:hover {
    border-color: rgba(74, 158, 255, 0.28);
}

.search-box:focus-within {
    border-color: var(--color-primary);
    background: rgba(74, 158, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.08);
}

.search-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    margin-right: 10px;
    color: var(--color-text-muted);
    font-size: 15px;
}

.search-input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--color-text);
    font-size: 14px;
}

.search-input::placeholder {
    color: #557492;
}

.search-input::-webkit-search-cancel-button {
    cursor: pointer;
    filter: invert(1);
    opacity: 0.5;
}

.user-name {
    display: inline-flex;
    max-width: 220px;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    color: #9ac6e4;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-name i {
    flex-shrink: 0;
    color: var(--color-primary);
    font-size: 18px;
}


/* ============================================================
   ОБЩИЕ КНОПКИ
   ============================================================ */

.btn-login,
.btn-submit,
.btn-register {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast),
        border-color var(--transition-fast),
        opacity var(--transition-fast);
}

.btn-login {
    padding: 9px 22px;
    background: linear-gradient(
        135deg,
        var(--color-primary),
        var(--color-primary-light)
    );
    color: #fff;
    font-size: 14px;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 24px rgba(74, 158, 255, 0.32);
}

.btn-login:active {
    transform: translateY(0) scale(0.98);
}

.btn-login.small {
    min-height: 34px;
    padding: 6px 15px;
    font-size: 12px;
}

.btn-register {
    padding: 8px 20px;
    border: 1px solid rgba(74, 158, 255, 0.3);
    background: transparent;
    color: #9ac6e4;
    font-size: 14px;
}

.btn-register:hover {
    border-color: var(--color-primary);
    background: rgba(74, 158, 255, 0.1);
    color: #fff;
}

.btn-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
    padding: 13px 20px;
    border: 0;
    background: linear-gradient(
        135deg,
        var(--color-primary),
        var(--color-primary-light)
    );
    color: #fff;
    font-size: 15px;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(74, 158, 255, 0.32);
}

.btn-submit:active {
    transform: translateY(0) scale(0.99);
}

.btn-login:disabled,
.btn-submit:disabled,
.btn-register:disabled,
.like-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}


/* ============================================================
   СООБЩЕНИЯ
   ============================================================ */

.message {
    display: flex;
    max-width: 1100px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 12px auto 0;
    padding: 13px 20px;
    border-radius: var(--border-radius);
    font-size: 14px;
    text-align: center;
    transition:
        opacity 0.5s ease,
        transform 0.5s ease;
}

.message i {
    flex-shrink: 0;
    font-size: 18px;
}

.message.success {
    border: 1px solid rgba(99, 217, 138, 0.25);
    background: rgba(99, 217, 138, 0.1);
    color: #83e7a4;
}

.message.error {
    border: 1px solid rgba(255, 107, 107, 0.25);
    background: rgba(255, 107, 107, 0.1);
    color: #ff8a8a;
}

.message.error > div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.message-hidden {
    opacity: 0;
    transform: translateY(-10px);
}


/* ============================================================
   МОДАЛЬНЫЕ ОКНА
   ============================================================ */

.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

.modal.active {
    display: flex;
    animation: modalBackdropIn 0.2s ease;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 430px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 38px 34px 34px;
    border: 1px solid rgba(74, 158, 255, 0.18);
    border-radius: 20px;
    background: var(--color-surface);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
    animation: modalContentIn 0.25s ease;
}

.modal-content h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    color: #fff;
    font-size: 25px;
    line-height: 1.25;
    text-align: center;
}

.modal-content h2 i {
    color: var(--color-primary);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    display: flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #7794af;
    font-size: 29px;
    line-height: 1;
    transition:
        color var(--transition-fast),
        background var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.modal-switch {
    margin-top: 18px;
    color: var(--color-text-secondary);
    font-size: 14px;
    text-align: center;
}

.modal-switch a {
    color: var(--color-primary-light);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.modal-switch a:hover {
    color: #fff;
}

@keyframes modalBackdropIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalContentIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* ============================================================
   ФОРМЫ
   ============================================================ */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    color: var(--color-text-secondary);
    font-size: 13px;
    font-weight: 550;
}

.form-group label i {
    width: 16px;
    flex-shrink: 0;
    color: var(--color-primary);
    text-align: center;
}

.form-group input,
.form-group textarea,
.form-group select,
.comment-form textarea,
.reply-form textarea {
    width: 100%;
    border: 1px solid rgba(74, 158, 255, 0.15);
    border-radius: 10px;
    outline: 0;
    background: rgba(255, 255, 255, 0.045);
    color: #fff;
    font: inherit;
    font-size: 14px;
    transition:
        border-color var(--transition-normal),
        background var(--transition-normal),
        box-shadow var(--transition-normal);
}

.form-group input,
.form-group select {
    min-height: 44px;
    padding: 10px 14px;
}

.form-group textarea,
.comment-form textarea,
.reply-form textarea {
    min-height: 100px;
    padding: 11px 14px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder,
.comment-form textarea::placeholder,
.reply-form textarea::placeholder {
    color: #54718c;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.comment-form textarea:focus,
.reply-form textarea:focus {
    border-color: var(--color-primary);
    background: rgba(74, 158, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.08);
}

.form-group select option {
    background: var(--color-surface);
    color: #fff;
}


/* ============================================================
   ГЛАВНАЯ СТРАНИЦА И ЛЕНТА
   ============================================================ */

.video-feed {
    min-height: calc(100vh - var(--header-height));
    padding: 24px 20px 45px;
}

.feed-container {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
}

.feed-header {
    margin-bottom: 26px;
}

.feed-title {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 7px;
    color: #fff;
    font-size: 28px;
    font-weight: 750;
    line-height: 1.25;
}

.feed-title i {
    color: var(--color-primary);
}

.feed-subtitle {
    color: var(--color-text-secondary);
    font-size: 15px;
}

.feed-grid,
.feed-grid.masonry {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
}

/*
 * Совместимость со старой разметкой index.php,
 * в которой видео распределялись по masonry-column.
 */
.feed-grid.masonry .masonry-column {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 12px;
}

.feed-grid:not(.masonry) .masonry-column {
    display: contents;
}


/* ============================================================
   КАРТОЧКА ВИДЕО
   ============================================================ */

.video-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius);
    background: var(--color-surface);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.12);
    animation: cardFadeIn 0.35s ease;
    transition:
        transform var(--transition-normal),
        border-color var(--transition-normal),
        box-shadow var(--transition-normal);
}

.video-card[hidden] {
    display: none !important;
}

.video-card:hover {
    z-index: 5;
    border-color: rgba(74, 158, 255, 0.3);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
}

.video-card-link {
    display: block;
    height: 100%;
    color: inherit;
}

.video-wrapper,
.video-card .video-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    padding-bottom: 0;
    border-radius: 0;
    background: var(--color-background-dark);
}

.video-thumbnail,
.video-card .video-wrapper .video-thumbnail {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    background: var(--color-background-dark);
    transition:
        transform 0.4s ease,
        opacity var(--transition-normal);
}

.video-thumbnail[hidden] {
    display: none !important;
}

.video-card:hover .video-thumbnail,
.video-card:hover .video-wrapper .video-thumbnail {
    transform: scale(1.035);
}

.video-thumbnail::-webkit-media-controls {
    display: none !important;
}

.video-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(
            circle,
            rgba(74, 158, 255, 0.12),
            transparent 55%
        ),
        var(--color-background-dark);
    color: var(--color-primary);
    font-size: 40px;
}

.video-fallback[hidden] {
    display: none !important;
}

.video-play-icon {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    background: rgba(0, 0, 0, 0.07);
    color: #fff;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.video-play-icon i {
    display: flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(5, 12, 22, 0.66);
    box-shadow: 0 5px 22px rgba(0, 0, 0, 0.35);
    font-size: 20px;
}

.video-card:hover .video-play-icon {
    opacity: 1;
}

.video-card .video-wrapper .video-placeholder {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: rgba(10, 22, 40, 0.22);
    color: var(--color-primary);
    font-size: 31px;
    pointer-events: none;
    transform: none;
}

.video-card .video-wrapper .video-placeholder i {
    display: flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(5, 12, 22, 0.62);
    color: #fff;
}

.video-overlay,
.video-card .video-overlay {
    position: absolute;
    right: 7px;
    bottom: 7px;
    z-index: 3;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.5;
}

.video-card-info {
    padding: 10px 11px 12px;
}

.video-title {
    display: -webkit-box;
    margin: 0 0 7px;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.video-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    color: #7594b3;
    font-size: 11px;
}

.video-card-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-card-meta i {
    margin-right: 3px;
    color: #6388aa;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================
   ПУСТЫЕ СОСТОЯНИЯ
   ============================================================ */

.no-videos,
.empty-state {
    display: flex;
    min-height: 260px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 45px 20px;
    color: var(--color-text-muted);
    font-size: 17px;
    text-align: center;
}

.no-videos {
    grid-column: 1 / -1;
}

.no-videos > i,
.empty-state > i {
    color: var(--color-primary);
    font-size: 48px;
}

.no-videos .btn-login,
.empty-state .btn-login {
    margin-top: 8px;
}


/* ============================================================
   СТРАНИЦА ЗАГРУЗКИ
   ============================================================ */

.upload-page {
    min-height: calc(100vh - var(--header-height));
    padding: 38px 20px 50px;
}

.upload-container {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

.upload-header {
    margin-bottom: 28px;
    text-align: center;
}

.upload-header h1 {
    margin-bottom: 6px;
    color: #fff;
    font-size: 31px;
    line-height: 1.25;
}

.upload-header h1 i {
    margin-right: 6px;
    color: var(--color-primary);
}

.upload-header p {
    color: var(--color-text-secondary);
    font-size: 15px;
}

.upload-form {
    padding: 29px;
    border: 1px solid rgba(74, 158, 255, 0.11);
    border-radius: 17px;
    background: rgba(15, 31, 53, 0.68);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
}

.upload-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px 19px;
    border: 1px solid rgba(74, 158, 255, 0.12);
    border-radius: var(--border-radius);
    background: rgba(74, 158, 255, 0.06);
    color: var(--color-text-secondary);
    font-size: 14px;
}

.upload-info > i {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--color-primary);
    font-size: 20px;
}

.upload-info strong {
    color: #fff;
}

.feature-list {
    margin-top: 7px;
    padding: 0;
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}

.feature-list li i {
    width: 15px;
    flex-shrink: 0;
    margin-top: 4px;
    color: var(--color-primary);
    font-size: 12px;
    text-align: center;
}

.file-upload-area {
    position: relative;
    display: flex;
    min-height: 220px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 35px 20px;
    border: 2px dashed rgba(74, 158, 255, 0.25);
    border-radius: var(--border-radius);
    background: rgba(74, 158, 255, 0.025);
    text-align: center;
    cursor: pointer;
    transition:
        border-color var(--transition-normal),
        background var(--transition-normal),
        transform var(--transition-fast);
}

.file-upload-area:hover {
    border-color: rgba(74, 158, 255, 0.55);
    background: rgba(74, 158, 255, 0.055);
}

.file-upload-area.dragover {
    border-color: var(--color-primary);
    background: rgba(74, 158, 255, 0.1);
    transform: scale(1.01);
}

.file-upload-area > i {
    display: block;
    margin-bottom: 12px;
    color: var(--color-primary);
    font-size: 47px;
    pointer-events: none;
}

.file-upload-area p {
    margin-bottom: 4px;
    color: #a1bad1;
    font-size: 15px;
    pointer-events: none;
}

.file-upload-area .file-hint {
    color: var(--color-text-muted);
    font-size: 12px;
    pointer-events: none;
}

.file-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

#fileInfo {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 11px 14px;
    overflow: hidden;
    border: 1px solid rgba(74, 158, 255, 0.1);
    border-radius: var(--border-radius-small);
    background: rgba(74, 158, 255, 0.06);
    color: var(--color-text-secondary);
    font-size: 13px;
}

#fileInfo i {
    flex-shrink: 0;
    color: var(--color-success);
}

#fileName {
    min-width: 0;
    overflow: hidden;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#fileSize {
    flex-shrink: 0;
    color: var(--color-text-muted);
}


/* ============================================================
   СТРАНИЦА ПРОФИЛЯ
   ============================================================ */

.profile-header {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 30px;
    padding: 28px;
    border: 1px solid rgba(74, 158, 255, 0.11);
    border-radius: 17px;
    background: rgba(15, 31, 53, 0.65);
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.15);
}

.profile-avatar {
    display: flex;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(74, 158, 255, 0.2);
    border-radius: 50%;
    background: rgba(74, 158, 255, 0.13);
    color: var(--color-primary);
    font-size: 47px;
}

.profile-info {
    min-width: 0;
}

.profile-info h1 {
    overflow: hidden;
    margin-bottom: 3px;
    color: #fff;
    font-size: 27px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.profile-info p {
    color: var(--color-text-secondary);
    font-size: 15px;
    overflow-wrap: anywhere;
}

.profile-stats {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-top: 11px;
    color: var(--color-text-secondary);
    font-size: 13px;
}

.profile-stats span {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.profile-stats strong {
    color: #fff;
    font-size: 17px;
}

.profile-videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
}

.profile-video-item {
    display: block;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(74, 158, 255, 0.1);
    border-radius: var(--border-radius);
    background: rgba(15, 31, 53, 0.68);
    transition:
        transform var(--transition-normal),
        border-color var(--transition-normal),
        box-shadow var(--transition-normal);
}

.profile-video-item:hover {
    border-color: rgba(74, 158, 255, 0.32);
    box-shadow: 0 13px 35px rgba(0, 0, 0, 0.22);
    transform: translateY(-4px);
}

.profile-video-item .thumb {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    padding-bottom: 0;
    background: var(--color-background-dark);
}

.profile-video-item .thumb img,
.profile-video-item .thumb video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.profile-video-item:hover .thumb img,
.profile-video-item:hover .thumb video {
    transform: scale(1.035);
}

.profile-video-item .thumb .placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 34px;
}

.profile-video-item .info {
    padding: 12px 15px 14px;
}

.profile-video-item .info .title {
    display: -webkit-box;
    min-height: 38px;
    margin-bottom: 5px;
    overflow: hidden;
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.profile-video-item .info .meta {
    color: var(--color-text-secondary);
    font-size: 12px;
}

.profile-video-item .info .status,
.status {
    display: inline-block;
    margin-top: 7px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.5;
}

.status-pending {
    background: rgba(255, 200, 0, 0.14);
    color: var(--color-warning);
}

.status-approved {
    background: rgba(99, 217, 138, 0.14);
    color: #72e799;
}

.status-rejected {
    background: rgba(255, 107, 107, 0.14);
    color: #ff8585;
}


/* ============================================================
   СТРАНИЦА ПРОСМОТРА ВИДЕО
   ============================================================ */

.video-page {
    min-height: calc(100vh - var(--header-height));
    padding: 25px 20px 50px;
}

.video-page-container {
    display: grid;
    width: 100%;
    max-width: 1450px;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    margin: 0 auto;
}

.video-page-left,
.video-page-right {
    min-width: 0;
}

.video-page-player-wrapper {
    display: flex;
    width: 100%;
    min-height: 520px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(74, 158, 255, 0.1);
    border-radius: 16px;
    background:
        radial-gradient(
            circle at center,
            rgba(74, 158, 255, 0.06),
            transparent 45%
        ),
        #030811;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.3);
}

.video-page-player {
    display: flex;
    width: 100%;
    height: min(75vh, 820px);
    min-height: 520px;
    align-items: center;
    justify-content: center;
}

.video-page-player video {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
    object-fit: contain;
}

.video-error {
    display: flex;
    min-height: 350px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--color-text-secondary);
    text-align: center;
}

.video-error i {
    color: var(--color-danger);
    font-size: 48px;
}

.video-page-info {
    margin-top: 18px;
    padding: 21px 23px;
    border: 1px solid rgba(74, 158, 255, 0.1);
    border-radius: 15px;
    background: rgba(15, 31, 53, 0.62);
}

.video-page-title {
    margin-bottom: 13px;
    color: #fff;
    font-size: 25px;
    font-weight: 720;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.video-page-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    color: var(--color-text-secondary);
    font-size: 13px;
}

.video-page-meta > div {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.video-page-meta i {
    color: var(--color-primary);
}

.video-page-description {
    margin-top: 17px;
    padding-top: 16px;
    border-top: 1px solid rgba(74, 158, 255, 0.09);
    color: #a3bad0;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.video-page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.like-btn {
    display: inline-flex;
    min-width: 80px;
    min-height: 41px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 17px;
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 999px;
    background: rgba(255, 107, 107, 0.07);
    color: #ff9a9a;
    font-weight: 650;
    transition:
        transform var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast);
}

.like-btn:hover {
    border-color: rgba(255, 107, 107, 0.5);
    background: rgba(255, 107, 107, 0.13);
    transform: translateY(-1px);
}

.like-btn.liked {
    border-color: rgba(255, 70, 100, 0.45);
    background: rgba(255, 70, 100, 0.15);
    color: #ff4664;
}


/* ============================================================
   КОММЕНТАРИИ
   ============================================================ */

.video-page-comments {
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid rgba(74, 158, 255, 0.1);
    border-radius: 15px;
    background: rgba(15, 31, 53, 0.62);
}

.video-page-comments > h3 {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 9px;
    padding: 14px 20px;
    color: #fff;
    font-size: 17px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.video-page-comments > h3 > i {
    color: var(--color-primary);
}

.toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    color: var(--color-text-secondary);
    font-size: 13px;
}

.comments-body {
    display: none;
    padding: 0 20px 20px;
    border-top: 1px solid rgba(74, 158, 255, 0.08);
}

.comments-body.open {
    display: block;
}

.comment-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 18px 0;
}

.comment-form textarea {
    min-height: 88px;
    flex: 1;
}

.comment-form .btn-login {
    flex-shrink: 0;
}

.comment-auth-required {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 18px 0;
    padding: 15px 17px;
    border: 1px solid rgba(74, 158, 255, 0.1);
    border-radius: var(--border-radius);
    background: rgba(74, 158, 255, 0.05);
    color: var(--color-text-secondary);
    font-size: 14px;
}

.comment-auth-required p {
    display: flex;
    align-items: center;
    gap: 7px;
}

.comment-auth-required p i {
    color: var(--color-primary);
}

.comment-list {
    display: flex;
    flex-direction: column;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid rgba(74, 158, 255, 0.08);
}

.comment-list > .comment-item:first-child {
    border-top: 0;
}

.comment-avatar {
    flex-shrink: 0;
    color: var(--color-primary);
    font-size: 32px;
    line-height: 1;
}

.comment-body {
    min-width: 0;
    flex: 1;
}

.comment-author {
    margin-bottom: 3px;
    color: #fff;
    font-size: 14px;
    font-weight: 650;
}

.comment-text {
    color: #abc0d3;
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.comment-date {
    margin-top: 5px;
    color: #58748d;
    font-size: 11px;
}

.reply-btn {
    margin-top: 7px;
    border: 0;
    background: transparent;
    color: var(--color-primary-light);
    font-size: 12px;
    transition: color var(--transition-fast);
}

.reply-btn:hover {
    color: #fff;
}

.comment-item.reply {
    margin-top: 13px;
    padding: 13px;
    border: 0;
    border-left: 2px solid rgba(74, 158, 255, 0.25);
    border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0;
    background: rgba(74, 158, 255, 0.035);
}

.comment-item.reply .comment-avatar {
    font-size: 27px;
}

.reply-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.reply-form textarea {
    min-height: 70px;
    flex: 1;
}

.reply-form .btn-login {
    flex-shrink: 0;
}


/* ============================================================
   ПРАВАЯ КОЛОНКА С ДРУГИМИ ВИДЕО
   ============================================================ */

.video-page-right {
    position: sticky;
    top: calc(var(--header-height) + 18px);
    align-self: start;
    max-height: calc(100vh - var(--header-height) - 36px);
    overflow-y: auto;
    padding: 18px;
    border: 1px solid rgba(74, 158, 255, 0.1);
    border-radius: 15px;
    background: rgba(15, 31, 53, 0.58);
}

.sidebar-videos-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 15px;
    color: #fff;
    font-size: 17px;
}

.sidebar-videos-title i {
    color: var(--color-primary);
}

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

.sidebar-video-item {
    display: block;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(74, 158, 255, 0.08);
    border-radius: 10px;
    background: var(--color-background-dark);
    transition:
        transform var(--transition-fast),
        border-color var(--transition-fast);
}

.sidebar-video-item:hover {
    border-color: rgba(74, 158, 255, 0.35);
    transform: translateY(-2px);
}

.sidebar-video-thumb {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 9 / 16;
    background: var(--color-background-dark);
}

.sidebar-video-thumb img,
.sidebar-video-thumb video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.sidebar-video-item:hover img,
.sidebar-video-item:hover video {
    transform: scale(1.04);
}

.video-placeholder-small {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 27px;
}

.sidebar-video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    background: rgba(0, 0, 0, 0.22);
    color: #fff;
    font-size: 20px;
    transition: opacity var(--transition-fast);
}

.sidebar-video-overlay i {
    display: flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding-left: 3px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
}

.sidebar-video-item:hover .sidebar-video-overlay {
    opacity: 1;
}


/* ============================================================
   ВКЛАДКИ ЛЕНТЫ
   ============================================================ */

.feed-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.feed-tab {
    min-height: 38px;
    padding: 7px 17px;
    border: 1px solid rgba(74, 158, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--color-text-secondary);
    font-size: 13px;
    font-weight: 600;
    transition:
        color var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast);
}

.feed-tab:hover {
    border-color: rgba(74, 158, 255, 0.35);
    color: #fff;
}

.feed-tab.active {
    border-color: rgba(74, 158, 255, 0.4);
    background: rgba(74, 158, 255, 0.15);
    color: var(--color-primary-light);
}

.tab-content {
    width: 100%;
}


/* ============================================================
   ИНДИКАТОР ЗАГРУЗКИ
   ============================================================ */

#loadingIndicator {
    display: none;
    min-height: 90px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--color-text-secondary);
}

#loadingIndicator i {
    color: var(--color-primary);
    font-size: 22px;
}

#endMessage {
    display: none;
    padding: 30px 20px;
    color: var(--color-text-muted);
    font-size: 14px;
    text-align: center;
}


/* ============================================================
   АДМИНИСТРАТИВНЫЕ КНОПКИ
   ============================================================ */

.btn-approve,
.btn-reject {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 650;
    transition:
        transform var(--transition-fast),
        opacity var(--transition-fast);
}

.btn-approve {
    background: #269b56;
}

.btn-reject {
    background: #d74545;
}

.btn-approve:hover,
.btn-reject:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}


/* ============================================================
   АДАПТИВНОСТЬ — БОЛЬШИЕ ЭКРАНЫ
   ============================================================ */

@media (min-width: 1800px) {
    .feed-container {
        max-width: 1760px;
    }

    .feed-grid,
    .feed-grid.masonry {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}

@media (max-width: 1450px) {
    .feed-grid,
    .feed-grid.masonry {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .video-page-container {
        grid-template-columns: minmax(0, 1fr) 290px;
    }
}

@media (max-width: 1220px) {
    .feed-grid,
    .feed-grid.masonry {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .video-page-container {
        grid-template-columns: minmax(0, 1fr) 260px;
        gap: 18px;
    }

    .video-page-right {
        padding: 13px;
    }
}

@media (max-width: 1024px) {
    .feed-grid,
    .feed-grid.masonry {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .video-page-container {
        display: block;
    }

    .video-page-right {
        position: static;
        max-height: none;
        margin-top: 20px;
        overflow: visible;
    }

    .sidebar-videos-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


/* ============================================================
   АДАПТИВНОСТЬ — ПЛАНШЕТЫ И МОБИЛЬНЫЕ
   ============================================================ */

@media (max-width: 768px) {
    :root {
        --header-height: 58px;
    }

    body,
    body.sidebar-open {
        padding-left: 0;
    }

    .sidebar {
        width: 270px;
        transform: translateX(-100%);
    }

    .sidebar.open {
        width: 270px;
        transform: translateX(0);
    }

    .sidebar .sidebar-logo-text,
    .sidebar .sidebar-text {
        opacity: 1;
    }

    .sidebar.open::after {
        position: fixed;
        inset: 0;
        left: 270px;
        width: calc(100vw - 270px);
        background: rgba(0, 0, 0, 0.35);
        content: "";
        pointer-events: none;
    }

    .header-container {
        min-height: var(--header-height);
        gap: 10px;
        padding: 8px 12px;
    }

    .header-center {
        max-width: none;
    }

    .search-box {
        min-height: 40px;
        padding: 6px 13px;
    }

    .user-name {
        max-width: 130px;
        font-size: 12px;
    }

    .video-feed {
        padding: 19px 12px 36px;
    }

    .feed-header {
        margin-bottom: 20px;
    }

    .feed-title {
        font-size: 23px;
    }

    .feed-subtitle {
        font-size: 13px;
    }

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

    .feed-grid.masonry .masonry-column {
        gap: 10px;
    }

    .video-card-info {
        padding: 9px;
    }

    .video-title {
        font-size: 13px;
    }

    .video-card-meta {
        font-size: 10px;
    }

    .profile-header {
        gap: 20px;
        padding: 22px;
    }

    .profile-avatar {
        width: 82px;
        height: 82px;
        font-size: 38px;
    }

    .profile-info h1 {
        font-size: 23px;
    }

    .profile-stats {
        flex-wrap: wrap;
        gap: 10px 18px;
    }

    .profile-videos {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 13px;
    }

    .upload-page {
        padding: 28px 14px 40px;
    }

    .upload-header h1 {
        font-size: 26px;
    }

    .video-page {
        padding: 17px 12px 38px;
    }

    .video-page-player-wrapper,
    .video-page-player {
        min-height: 430px;
    }

    .video-page-player {
        height: 70vh;
    }

    .video-page-title {
        font-size: 21px;
    }

    .sidebar-videos-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .message {
        margin-right: 12px;
        margin-left: 12px;
    }
}


/* ============================================================
   АДАПТИВНОСТЬ — ТЕЛЕФОНЫ
   ============================================================ */

@media (max-width: 560px) {
    .header-right {
        display: none;
    }

    .video-feed {
        padding-right: 9px;
        padding-left: 9px;
    }

    .feed-title {
        font-size: 21px;
    }

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

    .feed-grid.masonry .masonry-column {
        gap: 8px;
    }

    .video-card {
        border-radius: 10px;
    }

    .video-play-icon {
        opacity: 1;
        background: transparent;
    }

    .video-play-icon i {
        width: 43px;
        height: 43px;
        font-size: 16px;
    }

    .video-card-info {
        padding: 8px;
    }

    .video-title {
        margin-bottom: 5px;
        font-size: 12px;
    }

    .video-card-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
        font-size: 10px;
    }

    .modal {
        padding: 12px;
    }

    .modal-content {
        max-height: calc(100vh - 24px);
        padding: 34px 20px 25px;
        border-radius: 16px;
    }

    .modal-content h2 {
        font-size: 22px;
    }

    .profile-header {
        align-items: center;
        flex-direction: column;
        padding: 22px 16px;
        text-align: center;
    }

    .profile-info {
        width: 100%;
    }

    .profile-stats {
        justify-content: center;
    }

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

    .profile-video-item .info {
        padding: 9px;
    }

    .profile-video-item .info .title {
        min-height: 35px;
        font-size: 12px;
    }

    .profile-video-item .info .meta {
        font-size: 10px;
    }

    .upload-form {
        padding: 20px 16px;
    }

    .upload-info {
        padding: 14px;
        font-size: 12px;
    }

    .file-upload-area {
        min-height: 190px;
        padding: 28px 14px;
    }

    .file-upload-area > i {
        font-size: 39px;
    }

    .file-upload-area p {
        font-size: 14px;
    }

    #fileInfo {
        flex-wrap: wrap;
    }

    .video-page {
        padding-right: 8px;
        padding-left: 8px;
    }

    .video-page-player-wrapper,
    .video-page-player {
        min-height: 380px;
    }

    .video-page-player {
        height: 65vh;
    }

    .video-page-info {
        padding: 17px 15px;
    }

    .video-page-title {
        font-size: 19px;
    }

    .video-page-meta {
        gap: 9px 14px;
        font-size: 12px;
    }

    .video-page-comments > h3 {
        padding-right: 15px;
        padding-left: 15px;
    }

    .comments-body {
        padding-right: 14px;
        padding-left: 14px;
    }

    .comment-form {
        align-items: stretch;
        flex-direction: column;
    }

    .comment-form .btn-login {
        align-self: flex-end;
    }

    .comment-auth-required {
        align-items: stretch;
        flex-direction: column;
    }

    .comment-auth-required .btn-login {
        align-self: flex-start;
    }

    .reply-form {
        align-items: stretch;
        flex-direction: column;
    }

    .reply-form .btn-login {
        align-self: flex-end;
    }

    .sidebar-videos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 380px) {
    .feed-grid,
    .feed-grid.masonry {
        gap: 6px;
    }

    .feed-grid.masonry .masonry-column {
        gap: 6px;
    }

    .video-card-info {
        padding: 7px;
    }

    .profile-videos {
        grid-template-columns: 1fr;
    }

    .video-page-player-wrapper,
    .video-page-player {
        min-height: 340px;
    }
}


/* ============================================================
   ПОЛЬЗОВАТЕЛИ С ОТКЛЮЧЁННОЙ АНИМАЦИЕЙ
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ============================================================
   ПЕЧАТЬ
   ============================================================ */

@media print {
    .sidebar,
    .header,
    .modal,
    .video-page-actions,
    .video-page-comments,
    .video-page-right,
    .search-box {
        display: none !important;
    }

    body {
        padding: 0 !important;
        background: #fff !important;
        color: #000 !important;
    }

    .video-feed,
    .video-page {
        padding: 0 !important;
    }

    .video-page-container {
        display: block !important;
    }

    .video-page-info {
        border: 1px solid #ccc !important;
        background: #fff !important;
        color: #000 !important;
    }

    .video-page-title,
    .video-page-description {
        color: #000 !important;
    }
}

/*
 * ============================================================
 * SKYMEMO — КОНТРАСТ ТЕКСТОВ В СВЕТЛОЙ ТЕМЕ
 * ============================================================
 */

html[data-theme="light"] body {
    color: #22384b;
}

/*
 * Поддержка.
 */
html[data-theme="light"] .support-panel {
    border-color: #cad8e3 !important;
    background: #ffffff !important;
    color: #22384b !important;
}

html[data-theme="light"] .support-panel h1,
html[data-theme="light"] .support-panel h2 {
    color: #102c45 !important;
}

html[data-theme="light"] .ticket-link {
    border: 1px solid #d0dbe4 !important;
    background: #edf2f6 !important;
    color: #22384b !important;
}

html[data-theme="light"] .ticket-link:hover,
html[data-theme="light"] .ticket-link.active {
    border-color: #6ba7dc !important;
    background: #dcecf9 !important;
    color: #153f62 !important;
}

html[data-theme="light"] .ticket-link strong {
    color: #102c45 !important;
}

html[data-theme="light"] .ticket-link small,
html[data-theme="light"] .ticket-link span {
    color: #47647d !important;
}

html[data-theme="light"] .support-message {
    background: #eef3f7 !important;
    color: #263f55 !important;
}

html[data-theme="light"] .support-message.mine {
    background: #dceeff !important;
    color: #173f60 !important;
}

html[data-theme="light"] .support-message small {
    color: #526f87 !important;
}

html[data-theme="light"] .support-input,
html[data-theme="light"] .support-textarea {
    border-color: #c8d6e1 !important;
    background: #f3f6f8 !important;
    color: #172433 !important;
}

html[data-theme="light"] .support-input::placeholder,
html[data-theme="light"] .support-textarea::placeholder {
    color: #61788c !important;
    opacity: 1 !important;
}

html[data-theme="light"] .support-submit {
    background: #2378c9 !important;
    color: #ffffff !important;
}

html[data-theme="light"] .support-submit i,
html[data-theme="light"] .support-submit span {
    color: #ffffff !important;
}

/*
 * Профиль и блок премиум-аккаунта.
 * Добавлены разные возможные названия классов,
 * чтобы правило сработало в текущей вёрстке профиля.
 */
html[data-theme="light"] .premium-card,
html[data-theme="light"] .premium-block,
html[data-theme="light"] .premium-banner,
html[data-theme="light"] .premium-info,
html[data-theme="light"] .profile-premium,
html[data-theme="light"] .premium-section {
    color: #283f52 !important;
}

html[data-theme="light"] .premium-card h1,
html[data-theme="light"] .premium-card h2,
html[data-theme="light"] .premium-card h3,
html[data-theme="light"] .premium-block h1,
html[data-theme="light"] .premium-block h2,
html[data-theme="light"] .premium-block h3,
html[data-theme="light"] .premium-banner h1,
html[data-theme="light"] .premium-banner h2,
html[data-theme="light"] .premium-banner h3,
html[data-theme="light"] .premium-info h1,
html[data-theme="light"] .premium-info h2,
html[data-theme="light"] .premium-info h3,
html[data-theme="light"] .profile-premium h1,
html[data-theme="light"] .profile-premium h2,
html[data-theme="light"] .profile-premium h3 {
    color: #25394a !important;
    text-shadow: none !important;
}

html[data-theme="light"] .premium-card p,
html[data-theme="light"] .premium-card span,
html[data-theme="light"] .premium-block p,
html[data-theme="light"] .premium-block span,
html[data-theme="light"] .premium-banner p,
html[data-theme="light"] .premium-banner span,
html[data-theme="light"] .premium-info p,
html[data-theme="light"] .premium-info span,
html[data-theme="light"] .profile-premium p,
html[data-theme="light"] .profile-premium span {
    color: #536b80 !important;
    text-shadow: none !important;
}

/*
 * Общие вторичные надписи профиля.
 */
html[data-theme="light"] .profile-card,
html[data-theme="light"] .profile-info,
html[data-theme="light"] .profile-header {
    color: #263f55;
}

html[data-theme="light"] .profile-card p,
html[data-theme="light"] .profile-card small,
html[data-theme="light"] .profile-info p,
html[data-theme="light"] .profile-info small,
html[data-theme="light"] .profile-stat,
html[data-theme="light"] .profile-meta {
    color: #49667e !important;
}

/*
 * Статусы.
 */
html[data-theme="light"] .status-approved {
    background: #ddf7e6 !important;
    color: #16733a !important;
}

html[data-theme="light"] .status-pending {
    background: #fff1c7 !important;
    color: #7b5700 !important;
}

html[data-theme="light"] .status-rejected {
    background: #ffe1e1 !important;
    color: #9d2929 !important;
}

/*
 * Все основные синие кнопки.
 */
html[data-theme="light"] .app-button,
html[data-theme="light"] .support-submit,
html[data-theme="light"] .settings-save,
html[data-theme="light"] .collection-create-form button,
html[data-theme="light"] .mems-comment-submit,
html[data-theme="light"] .mems-collection-submit {
    background: #2378c9 !important;
    color: #ffffff !important;
}

html[data-theme="light"] .app-button *,
html[data-theme="light"] .support-submit *,
html[data-theme="light"] .settings-save *,
html[data-theme="light"] .collection-create-form button *,
html[data-theme="light"] .mems-comment-submit *,
html[data-theme="light"] .mems-collection-submit * {
    color: #ffffff !important;
}

/*
 * ============================================================
 * КНОПКА ОПЛАТЫ В БОКОВОМ МЕНЮ
 * ============================================================
 */

.sidebar-payment-link {
    position: relative;
    display: flex;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #7891a8;
    font-size: 17px;
    line-height: 1;
    text-decoration: none;
    box-sizing: border-box;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.sidebar-payment-link i {
    display: block;
    width: 20px;
    color: inherit;
    font-size: 17px;
    line-height: 1;
    text-align: center;
}

.sidebar-payment-link:hover {
    background:
        rgba(74, 158, 255, 0.1);
    color: #4a9eff;
}

.sidebar-payment-link.active {
    background:
        rgba(74, 158, 255, 0.16);
    color: #4a9eff;
}

.sidebar-payment-link.active::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #4a9eff;
}

/*
 * В свёрнутом меню подпись не показывается.
 */
.sidebar-payment-label {
    display: none !important;
}

html[data-theme="light"]
.sidebar-payment-link {
    color: #71879a;
}

html[data-theme="light"]
.sidebar-payment-link:hover {
    background: #edf5fc;
    color: #2378c9;
}

html[data-theme="light"]
.sidebar-payment-link.active {
    background: #e1effc;
    color: #2378c9;
}
/*
 * ============================================================
 * ОБЩИЙ ФУТЕР
 * ============================================================
 */

.site-footer {
    width: 100%;
    margin-top: 45px;
    border-top: 1px solid rgba(74, 158, 255, 0.12);
    background: rgba(8, 20, 36, 0.78);
}

.site-footer-container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 26px 28px;
    box-sizing: border-box;
}

.site-footer-notice {
    max-width: 1050px;
    color: #7891a8;
    font-size: 12px;
    line-height: 1.65;
}

.site-footer-notice strong {
    color: #a8bfd3;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 17px;
}

.site-footer-links a {
    color: #83a2bd;
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer-links a:hover {
    color: #4a9eff;
}

.site-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 19px;
    padding-top: 17px;
    border-top: 1px solid rgba(74, 158, 255, 0.09);
    color: #607b93;
    font-size: 12px;
}

.site-footer-age {
    display: inline-flex;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 107, 107, 0.35);
    border-radius: 50%;
    color: #ff8585;
    font-size: 11px;
    font-weight: 800;
}

/*
 * Светлая тема.
 */

html[data-theme="light"] .site-footer {
    border-top-color: #d8e2ea;
    background: #ffffff;
}

html[data-theme="light"] .site-footer-notice {
    color: #60788d;
}

html[data-theme="light"] .site-footer-notice strong {
    color: #263c50;
}

html[data-theme="light"] .site-footer-links a {
    color: #486b89;
}

html[data-theme="light"] .site-footer-links a:hover {
    color: #2378c9;
}

html[data-theme="light"] .site-footer-bottom {
    border-top-color: #e1e8ee;
    color: #71879a;
}

@media (max-width: 620px) {
    .site-footer-container {
        padding: 22px 18px;
    }

    .site-footer-links {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .site-footer-bottom {
        align-items: flex-start;
    }
}
/*
 * ============================================================
 * SKYMEMO — МОБИЛЬНАЯ НИЖНЯЯ НАВИГАЦИЯ
 * ============================================================
 */

.mobile-bottom-navigation {
    display: none;
}

/*
 * Кнопки являются ссылками или button,
 * поэтому сбрасываем стандартные стили.
 */
.mobile-navigation-item {
    border: 0;
    outline: 0;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

@media (max-width: 760px) {
    /*
     * Оставляем место под нижнее меню.
     * safe-area-inset-bottom нужен для iPhone.
     */
    body {
        padding-bottom:
            calc(
                72px +
                env(safe-area-inset-bottom)
            ) !important;
    }

    .mobile-bottom-navigation {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 29000;
        display: grid;
        grid-template-columns:
            repeat(5, minmax(0, 1fr));
        min-height: 66px;
        padding:
            5px
            6px
            max(
                5px,
                env(safe-area-inset-bottom)
            );
        border-top: 1px solid
            rgba(74, 158, 255, 0.18);
        background:
            rgba(7, 20, 37, 0.96);
        box-shadow:
            0 -8px 30px
            rgba(0, 0, 0, 0.28);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        box-sizing: border-box;
    }

    .mobile-navigation-item {
        position: relative;
        display: flex;
        min-width: 0;
        min-height: 56px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 4px 2px;
        border-radius: 12px;
        background: transparent;
        color: #7f9ab2;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        box-sizing: border-box;
        -webkit-tap-highlight-color:
            transparent;
        transition:
            color 0.18s ease,
            background 0.18s ease,
            transform 0.18s ease;
    }

    .mobile-navigation-item:active {
        transform: scale(0.94);
    }

    .mobile-navigation-item.active {
        background:
            rgba(74, 158, 255, 0.1);
        color: #65adf8;
    }

    .mobile-navigation-icon {
        display: flex;
        width: 27px;
        height: 25px;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        line-height: 1;
    }

    .mobile-navigation-label {
        display: block;
        width: 100%;
        overflow: hidden;
        color: inherit;
        font-size: 9px;
        font-weight: 600;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /*
     * Центральная кнопка добавления.
     */
    .mobile-navigation-create {
        overflow: visible;
    }

    .mobile-navigation-create-icon {
        display: flex;
        width: 43px;
        height: 43px;
        align-items: center;
        justify-content: center;
        margin-top: -22px;
        border: 4px solid #071425;
        border-radius: 50%;
        background:
            linear-gradient(
                135deg,
                #5cb0ff,
                #307fe2
            );
        color: #ffffff;
        font-size: 17px;
        box-shadow:
            0 7px 21px
            rgba(48, 127, 226, 0.42);
        box-sizing: border-box;
    }

    .mobile-navigation-create.active
    .mobile-navigation-create-icon {
        background:
            linear-gradient(
                135deg,
                #7cc0ff,
                #4a9eff
            );
        box-shadow:
            0 7px 24px
            rgba(74, 158, 255, 0.58);
    }

    /*
     * Меню находится выше гостевой стены.
     */
    .guest-wall {
        padding-bottom:
            calc(
                95px +
                env(safe-area-inset-bottom)
            );
    }

    /*
     * Контент страницы не должен закрываться меню.
     */
    .home-page,
    .author-page,
    .mems-page,
    .profile-page,
    main {
        padding-bottom:
            calc(
                95px +
                env(safe-area-inset-bottom)
            ) !important;
    }

    /*
     * Модальные окна должны находиться выше меню.
     */
    .app-modal,
    .mems-collection-overlay {
        z-index: 31000;
    }
}

/*
 * ============================================================
 * СВЕТЛАЯ ТЕМА
 * ============================================================
 */

@media (max-width: 760px) {
    html[data-theme="light"]
    .mobile-bottom-navigation {
        border-top-color: #d4e0e9;
        background:
            rgba(255, 255, 255, 0.96);
        box-shadow:
            0 -7px 25px
            rgba(30, 55, 80, 0.12);
    }

    html[data-theme="light"]
    .mobile-navigation-item {
        color: #61788d;
    }

    html[data-theme="light"]
    .mobile-navigation-item.active {
        background: #e6f2fd;
        color: #1768b2;
    }

    html[data-theme="light"]
    .mobile-navigation-create-icon {
        border-color: #ffffff;
        background:
            linear-gradient(
                135deg,
                #4398e8,
                #1768b2
            );
        color: #ffffff;
    }
}

/*
 * Не показываем нижнее меню на планшетах
 * и компьютерах.
 */
@media (min-width: 761px) {
    .mobile-bottom-navigation {
        display: none !important;
    }
}
.mobile-back-button {
    display: none;
}

@media (max-width: 760px) {
    .mobile-back-button {
        display: inline-flex;
        min-height: 38px;
        align-items: center;
        justify-content: center;
        gap: 7px;
        margin: 0 0 14px;
        padding: 7px 12px;
        border: 1px solid
            rgba(74, 158, 255, 0.22);
        border-radius: 10px;
        outline: 0;
        background:
            rgba(74, 158, 255, 0.08);
        color: #8bc4ff;
        font-family: inherit;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        -webkit-tap-highlight-color:
            transparent;
    }

    .mobile-back-button:active {
        background:
            rgba(74, 158, 255, 0.17);
        transform: scale(0.97);
    }

    html[data-theme="light"]
    .mobile-back-button {
        border-color: #afcde5;
        background: #e9f4fd;
        color: #1768b2;
    }
}
@media (max-width: 760px) {
    .shared-dialog-overlay {
        z-index: 31000 !important;
        padding-bottom:
            calc(
                82px +
                env(safe-area-inset-bottom)
            ) !important;
    }

    #sharedUploadOverlay {
        align-items: flex-end;
    }

    #sharedUploadOverlay .shared-dialog {
        width: 100%;
        max-height:
            calc(
                100dvh -
                95px -
                env(safe-area-inset-bottom)
            );
        overflow-y: auto;
        border-radius: 22px 22px 16px 16px;
    }

    #sharedUploadOverlay
    .shared-upload-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #sharedUploadOverlay
    .shared-upload-option {
        min-height: 94px;
        flex-direction: row;
        justify-content: flex-start;
        padding: 14px;
        text-align: left;
    }

    #sharedUploadOverlay
    .shared-upload-option-icon {
        width: 52px;
        height: 52px;
        min-width: 52px;
        flex: 0 0 52px;
    }

    #sharedUploadOverlay
    .shared-upload-option strong,
    #sharedUploadOverlay
    .shared-upload-option small {
        display: block;
    }
}
.shared-upload-option-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.shared-upload-option-text strong,
.shared-upload-option-text small {
    display: block;
}