:root {
    --bg-primary: #0f0f12;
    --bg-secondary: #17171b;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-card: rgba(255, 255, 255, 0.06);
    
    --color-primary: #6c5ce7;
    --color-primary-glow: rgba(108, 92, 231, 0.35);
    --color-secondary: #a29bfe;
    
    --text-main: #f3f3f7;
    --text-muted: #8c8c9e;
    --text-hint: #56566b;
    
    --color-success: #00b894;
    --color-warning: #fdcb6e;
    --color-danger: #d63031;
    
    --header-height: 70px;
    --nav-height: 75px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

button:disabled, input:disabled, textarea:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* Ограничитель ширины для тестирования на десктопе */
.app-wrapper, .screen {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    background-color: var(--bg-primary);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

@media (min-width: 481px) {
    body {
        background-color: #040405;
        background-image: radial-gradient(circle at 50% 50%, #141416 0%, #040405 100%);
    }
    .app-wrapper, .screen {
        border-radius: 20px;
        height: 85vh;
        max-height: 900px;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
}

.hidden {
    display: none !important;
}

/* === ГЛОБАЛЬНЫЕ СТИЛИ ДЛЯ SVG ИКОНОК === */
.svg-icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Специфические размеры и цвета */
.logo-icon {
    width: 26px;
    height: 26px;
    color: var(--color-secondary);
}

.spinner-logo .svg-icon {
    display: block;
    width: 36px;
    height: 36px;
    color: var(--color-primary);
}

.card-icon .svg-icon {
    width: 32px;
    height: 32px;
}

.new-card .card-icon .svg-icon {
    color: var(--color-primary);
}

.comments-card .card-icon .svg-icon {
    color: var(--color-warning);
}

.sent-card .card-icon .svg-icon {
    color: #74b9ff;
}

.viewed-card .card-icon .svg-icon {
    color: var(--color-success);
}

.chevron {
    width: 20px;
    height: 20px;
    color: var(--text-hint);
    transition: transform 0.2s ease, color 0.2s ease;
}

.dash-card:active .chevron,
.dash-card:hover .chevron {
    color: var(--color-primary);
    transform: translateX(4px);
}

.dropzone-icon {
    width: 44px;
    height: 44px;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.file-icon .svg-icon {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
}

.remove-file-btn .svg-icon {
    width: 14px;
    height: 14px;
}

.empty-state .icon .svg-icon {
    width: 48px;
    height: 48px;
    color: var(--text-hint);
}

.nav-item .icon .svg-icon {
    width: 22px;
    height: 22px;
    color: var(--text-muted);
}

.nav-item.active .icon .svg-icon {
    color: var(--color-primary);
    filter: drop-shadow(0 0 6px var(--color-primary-glow));
}

.about-logo .svg-icon {
    width: 48px;
    height: 48px;
    color: var(--color-primary);
}

.about-logo.test-logo .svg-icon {
    color: var(--color-warning);
}

.send-reply-icon {
    width: 18px;
    height: 18px;
    color: white;
}

.toast-icon .svg-icon {
    width: 20px;
    height: 20px;
}

.toast.success .toast-icon {
    color: var(--color-success);
}

.toast.error .toast-icon {
    color: var(--color-danger);
}

.toast.warning .toast-icon {
    color: var(--color-warning);
}

/* Кнопки Назад */
.back-to-dash-btn, .back-modal-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.btn-back-icon {
    width: 18px;
    height: 18px;
}

/* Иконка в кнопке Далее */
.button-icon-down {
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

/* Плейсхолдеры карточек */
.preview-placeholder .placeholder-svg {
    width: 32px;
    height: 32px;
    color: var(--text-hint);
    margin-bottom: 8px;
}

/* Иконка в аудио плеере */
.audio-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid var(--border-card);
}

.audio-detail-icon {
    width: 48px;
    height: 48px;
    color: var(--color-primary);
}


/* === ЭКРАН ЗАГРУЗКИ === */

.screen {
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader-content {
    text-align: center;
}

.logo-spinner {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
}

.spinner-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(108, 92, 231, 0.15);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-logo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-content h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.loader-content p {
    font-size: 14px;
    color: var(--text-muted);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === ШАПКА === */

.app-header {
    height: var(--header-height);
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-card);
    background-color: rgba(15, 15, 18, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
}

.header-left, .header-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-right {
    justify-content: flex-end;
}

.header-center {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a29bfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.header-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.header-icon-btn:hover {
    background-color: rgba(255,255,255,0.1);
}


.header-actions {
    position: relative;
}

.badge-pulse {
    background-color: var(--color-danger);
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 4px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(214, 48, 49, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(214, 48, 49, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(214, 48, 49, 0); }
}

/* === КОНТЕНТ === */

.app-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: calc(var(--nav-height) + var(--safe-area-bottom) + 20px);
}

.app-content::-webkit-scrollbar {
    width: 4px;
}

.app-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === 1. ДАШБОРД === */

.welcome-banner {
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.welcome-banner h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.welcome-banner p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.dash-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dash-card:active {
    transform: scale(0.97);
    background-color: rgba(255, 255, 255, 0.08);
}

.dash-card .card-icon {
    font-size: 26px;
    margin-bottom: 12px;
}

.dash-card .card-info {
    display: flex;
    flex-direction: column;
}

.dash-card .card-info .title {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.dash-card .card-info .value {
    font-size: 24px;
    font-weight: 700;
}

.dash-card .card-arrow {
    position: absolute;
    bottom: 16px;
    right: 16px;
    font-size: 14px;
    color: var(--text-hint);
    transition: transform 0.2s ease;
}

.dash-card:hover .card-arrow {
    transform: translateX(4px);
    color: var(--color-primary);
}

/* Свечение карт при наличии данных */
.new-card {
    border-left: 3px solid var(--color-primary);
}
.comments-card {
    border-left: 3px solid var(--color-warning);
}
.sent-card {
    border-left: 3px solid #74b9ff;
}
.viewed-card {
    border-left: 3px solid var(--color-success);
}

.dash-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-muted);
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.action-btn.secondary {
    background-color: transparent;
}

.action-btn:active {
    background-color: var(--border-card);
}

/* === 2. ВКЛАДКА ЗАГРУЗКИ === */

.section-title {
    margin-bottom: 24px;
}

.section-title h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.section-title p {
    font-size: 13px;
    color: var(--text-muted);
}

.upload-mode-selector {
    display: flex;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.mode-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn.active {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 12px var(--color-primary-glow);
}

.form-group {
    margin-bottom: 20px;
    display: none;
}

.form-group.active {
    display: block;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    padding: 14px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--color-primary);
}

.adaptive-textarea {
    resize: none;
    min-height: 80px;
    max-height: 200px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: hidden;
    line-height: 1.5;
}

.adaptive-textarea:focus {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
    transform: scale(1.005);
}

.form-hint {
    display: block;
    font-size: 11px;
    color: var(--text-hint);
    margin-top: 6px;
}

/* Drag and Drop Zone */
.file-drop-zone {
    border: 2px dashed var(--border-card);
    border-radius: 16px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.01);
}

.file-drop-zone.dragover {
    border-color: var(--color-primary);
    background-color: rgba(108, 92, 231, 0.05);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.drop-icon {
    font-size: 38px;
    margin-bottom: 12px;
}

.drop-text {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.drop-subtext {
    font-size: 11px;
    color: var(--text-hint);
}

.file-card {
    background-color: rgba(108, 92, 231, 0.05);
    border: 1px solid var(--color-primary);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.file-card .file-icon {
    font-size: 24px;
}

.file-card .file-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.file-card .file-details .name {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-card .file-details .size {
    font-size: 11px;
    color: var(--text-muted);
}

.remove-file-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    gap: 8px;
    position: relative;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 16px var(--color-primary-glow);
}

.btn-primary:active {
    transform: scale(0.98);
    background-color: #5b4bc4;
}

.btn-block {
    width: 100%;
    margin-top: 12px;
}

.btn-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* === 3. ВКЛАДКА ПЛЕЕРА === */

.player-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    height: 40px;
}

.back-to-dash-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    z-index: 10;
}

.player-header .category-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    text-align: center;
}

.player-header .player-counter {
    font-size: 13px;
    color: var(--text-muted);
    z-index: 10;
}

.player-container {
    height: 100%;
    min-height: 450px;
}

/* Пустой экран плеера */
.empty-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px 20px;
    height: 380px;
}

.empty-state .icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 280px;
}

.active-player-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

/* Видеообласть */
.media-viewport {
    width: 100%;
    background-color: #000;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    /* 16:9 Aspect Ratio */
    padding-top: 56.25%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.renderer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.renderer iframe, .renderer video {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: contain;
}

.renderer audio {
    width: 90%;
}

.video-info-box {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 12px 16px;
}

.video-info-box .video-owner {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.video-info-box .video-comment {
    font-size: 14px;
    line-height: 1.4;
}

/* Навигация плеера */
.player-navigation-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 4px 0;
}

.nav-control-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    width: 44px;
    height: 44px;
    border-radius: 22px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nav-control-btn.primary-nav {
    width: 56px;
    height: 56px;
    border-radius: 28px;
    font-size: 20px;
    background-color: var(--color-primary);
    box-shadow: 0 4px 16px var(--color-primary-glow);
    border: none;
}

.nav-control-btn:active {
    transform: scale(0.92);
}

.nav-control-btn.primary-nav:active {
    background-color: #5b4bc4;
}

/* Секция комментариев (Drawer) */
.comments-section {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.comments-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.comments-header.active {
    border-bottom-color: var(--border-card);
}

.comments-header .title {
    font-size: 14px;
    font-weight: 600;
}

.comments-header .count-badge {
    background-color: rgba(255, 255, 255, 0.08);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    margin-right: auto;
}

.comments-header .arrow-icon {
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.comments-header.active .arrow-icon {
    transform: rotate(180deg);
}

.comments-drawer {
    display: none;
    max-height: 250px;
    flex-direction: column;
}

.comments-drawer.open {
    display: flex;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 180px;
}

.comment-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
}

.comment-bubble.incoming {
    align-self: flex-start;
    background-color: #161f21;
    border-bottom-left-radius: 3px;
}

.comment-bubble.outgoing {
    align-self: flex-end;
    background-color: var(--color-primary);
    border-bottom-right-radius: 3px;
    color: white;
}

.comment-bubble .author {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    opacity: 0.8;
}

.comment-bubble .time {
    font-size: 9px;
    opacity: 0.6;
    align-self: flex-end;
    margin-top: 4px;
}

.reply-input-wrapper {
    display: flex;
    align-items: flex-end; /* Выравнивание по нижнему краю для растущей текстовой области */
    padding: 12px;
    border-top: 1px solid var(--border-card);
    background-color: rgba(0, 0, 0, 0.15);
}

.reply-input {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    resize: none;
    height: 38px;
    line-height: 1.4;
    overflow-y: hidden;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.reply-input:focus {
    border-color: var(--color-primary);
}

.reply-send-btn {
    background-color: var(--color-primary);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    margin-left: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Чтобы кнопка не сжималась */
    font-size: 16px;
    box-shadow: 0 4px 10px var(--color-primary-glow);
}

.reply-send-btn:active {
    transform: scale(0.94);
}

/* === 4. ВКЛАДКА НАСТРОЕК === */

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.setting-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 12px;
}

.setting-info .title {
    font-size: 15px;
    font-weight: 600;
}

.setting-info .description {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* CSS Тоггл (Переключатель) */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
    border: 1px solid var(--border-card);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked + .slider {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.about-card {
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--border-card);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-top: 12px;
}

.about-logo {
    font-size: 44px;
    margin-bottom: 12px;
}

.about-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.about-card .version {
    font-size: 11px;
    color: var(--text-hint);
    margin-bottom: 12px;
}

.about-card .description {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* === НИЖНЕЕ МЕНЮ НАВИГАЦИИ === */

.app-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(var(--nav-height) + var(--safe-area-bottom));
    background-color: rgba(15, 15, 18, 0.9);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-card);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: var(--safe-area-bottom);
    z-index: 100;
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 4px;
}

.nav-item .icon {
    font-size: 20px;
    transition: transform 0.2s ease;
}

.nav-item .label {
    font-size: 11px;
    font-weight: 500;
}

.nav-item.active {
    color: var(--color-secondary);
}

.nav-item.active .icon {
    transform: translateY(-2px) scale(1.1);
}

/* === СИСТЕМНЫЕ ТОСТЫ (Уведомления) === */

.toast-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background-color: #17171b;
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 12px 18px;
    color: var(--text-main);
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
    pointer-events: auto;
}

.toast.success {
    border-left: 4px solid var(--color-success);
}

.toast.error {
    border-left: 4px solid var(--color-danger);
}

.toast.warning {
    border-left: 4px solid var(--color-warning);
}

@keyframes toastSlideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.toast.fade-out {
    animation: toastFadeOut 0.3s ease forwards;
}

@keyframes toastFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* === СТИЛИ ДЛЯ ЛЕНТЫ ВИДЕО В 2 СТОЛБИКА И МОДАЛЬНОГО ОКНА ДЕТАЛЕЙ === */

/* Шапка плеера: правая часть */
.player-header-right {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

.header-sort-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.header-sort-btn:active {
    background-color: rgba(255, 255, 255, 0.05);
}

.header-sort-btn:hover {
    color: var(--text-main);
}

.header-sort-btn .svg-icon {
    width: 20px;
    height: 20px;
}

.video-feed-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.video-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.video-card:hover {
    border-color: rgba(108, 92, 231, 0.3);
}

.video-card:active {
    transform: scale(0.97);
    background-color: rgba(255, 255, 255, 0.06);
}

.video-card.viewed-by-partner {
    border-color: rgba(76, 217, 100, 0.4);
    box-shadow: 0 0 10px rgba(76, 217, 100, 0.15);
}

.video-card.viewed-by-partner:hover {
    border-color: rgba(76, 217, 100, 0.6);
}

/* Оболочка превью */
.video-card-preview {
    width: 100%;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 */
    background-color: #000;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.video-card-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.video-card-preview video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-card-preview video.loaded {
    opacity: 1;
}

/* Заглушка для платформ */
.video-card-preview .preview-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #1a1a1f 0%, #0f0f12 100%);
    font-size: 26px;
}

.preview-placeholder .placeholder-label {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-hint);
    margin-top: 4px;
}

/* Оверлей кнопки Play */
.play-overlay-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(108, 92, 231, 0.85);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    z-index: 2;
}

.video-card:active .play-overlay-btn {
    transform: translate(-50%, -50%) scale(0.9);
}

/* Бадж новизны на превью */
.video-card-preview .new-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 3;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.video-card-preview .new-badge.comments {
    background-color: var(--color-warning);
    color: #000;
    animation: none;
}

.video-card-preview .new-badge.partner-viewed {
    background-color: #2ed573;
    color: #000;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(46, 213, 115, 0.4);
}

.video-card-preview .new-badge.partner-unviewed {
    background-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
}

/* Инфо блок карточки в сетке */
.video-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.video-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}

.video-card-meta .owner-tag {
    font-size: 10px;
    font-weight: 700;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.video-card-meta .date-tag {
    font-size: 9px;
    color: var(--text-hint);
    white-space: nowrap;
}

/* Сниппет комментария */
.grid-comment-snippet {
    font-size: 11px;
    line-height: 1.35;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 30px; /* ограничение 2 строки */
}

.grid-comment-snippet .muted-text {
    color: var(--text-hint);
    font-style: italic;
}

/* === ГЛОБАЛЬНОЕ МОДАЛЬНОЕ ОКНО ДЕТАЛЕЙ ВИДЕО === */

/* Стили пузырьков ответов и описаний (Liquid Glass design) */
.comment-bubble {
    max-width: 85%;
    padding: 11px 15px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.45;
    display: flex;
    flex-direction: column;
    color: #ffffff;
    margin-bottom: 4px;
    overflow-wrap: anywhere;
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.comment-bubble.incoming {
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.08) 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-left: 4px solid #00b894;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.comment-bubble.outgoing {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.38) 0%, rgba(124, 92, 252, 0.22) 100%);
    border: 1px solid rgba(162, 155, 254, 0.42);
    border-left: 4px solid #a29bfe;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.comment-bubble.description {
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.2) 0%, rgba(255, 180, 0, 0.08) 100%);
    border: 1px solid rgba(255, 204, 0, 0.38);
    border-left: 4px solid #ffcc00;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.comment-bubble .author,
.comment-bubble .author-label {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 4px;
    color: #e0d7ff;
    display: block;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.comment-bubble.incoming .author,
.comment-bubble.incoming .author-label {
    color: #55efc4;
}

.comment-bubble.outgoing .author,
.comment-bubble.outgoing .author-label {
    color: #d6c7ff;
}

.comment-bubble.description .author,
.comment-bubble.description .author-label {
    color: #ffeaa7;
}

.comment-bubble .time {
    font-size: 8.5px;
    opacity: 0.8;
    align-self: flex-end;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.audio-card-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    font-size: 24px;
}

.audio-card-wrapper audio {
    width: 100%;
}

/* ========================================
   SHORTS PLAYER (TikTok-style vertical feed)
   ======================================== */

.shorts-player {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    isolation: isolate;
}

.shorts-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top, 12px));
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
    pointer-events: none;
}

.shorts-header-overlay > * {
    pointer-events: auto;
}

.shorts-back-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.shorts-back-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.shorts-back-btn .svg-icon {
    width: 22px;
    height: 22px;
}

.shorts-header-title-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    border-radius: 20px;
    transition: background-color 0.2s ease;
}

.shorts-header-title-btn:hover, .shorts-header-title-btn:active {
    background-color: rgba(255, 255, 255, 0.1);
}

.shorts-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.shorts-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 12px;
}

/* Feed Container */
.shorts-feed {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-y: contain;
    transform: translateZ(0);
}

.shorts-feed::-webkit-scrollbar {
    display: none;
}

.shorts-feed.comments-locked {
    overflow: hidden;
    touch-action: none;
}

/* Individual Short */
.short-item {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    contain: layout paint;
}

.short-item video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.short-item iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

/* Gradient overlay */
.short-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.5) 30%,
        rgba(0, 0, 0, 0.15) 60%,
        transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Action buttons (right side, TikTok-style) */
.short-actions {
    position: absolute;
    right: 10px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    z-index: 5;
}

.short-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.action-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.short-action-btn:active .action-icon-wrap {
    transform: scale(0.88);
}

.action-icon-wrap .svg-icon {
    width: 22px;
    height: 22px;
}

.action-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.2px;
}

/* Like button states */
.short-action-btn.liked .action-icon-wrap {
    background: rgba(255, 43, 88, 0.25);
    border-color: rgba(255, 43, 88, 0.3);
}

.short-action-btn.liked .like-icon {
    fill: #FF2B58;
    stroke: #FF2B58;
}

.short-action-btn.liked .action-label {
    color: #FF2B58;
}

@keyframes likeHeartPop {
    0% { transform: scale(1); }
    15% { transform: scale(1.35); }
    30% { transform: scale(0.95); }
    45% { transform: scale(1.15); }
    60% { transform: scale(1); }
    100% { transform: scale(1); }
}

.short-action-btn.like-animating .action-icon-wrap {
    animation: likeHeartPop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Double-tap like overlay heart */
@keyframes doubleTapHeart {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    15% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0; }
}

.double-tap-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 10;
    pointer-events: none;
}

.double-tap-heart svg {
    width: 80px;
    height: 80px;
    fill: #FF2B58;
    stroke: none;
    filter: drop-shadow(0 4px 12px rgba(255, 43, 88, 0.5));
    animation: doubleTapHeart 0.8s ease forwards;
}

/* Play overlay when video is paused */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.play-overlay.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.play-overlay svg {
    width: 32px;
    height: 32px;
    fill: #fff;
    margin-left: 4px;
}

/* Info section (bottom left) */
.short-info {
    position: absolute;
    bottom: 24px;
    left: 16px;
    right: 76px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.short-author {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.short-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.45;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Audio placeholder in shorts */
.shorts-audio-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: linear-gradient(135deg, #18181b 0%, #121215 50%, #0f0f12 100%);
}

.shorts-audio-placeholder .svg-icon {
    width: 80px;
    height: 80px;
    color: rgba(255, 255, 255, 0.25);
}

.shorts-audio-placeholder audio {
    width: 80%;
    max-width: 300px;
}

/* URL embed wrapper in shorts */
.shorts-url-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
}

.shorts-url-wrapper iframe {
    width: 100%;
    height: 80%;
    max-height: 80vh;
}

/* Empty state */
.shorts-empty {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.shorts-empty .svg-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.short-action-btn:active .action-icon-wrap {
    transform: scale(0.88);
}

.action-icon-wrap .svg-icon {
    width: 22px;
    height: 22px;
}

.action-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.2px;
}

/* Like button states */
.short-action-btn.liked .action-icon-wrap {
    background: rgba(255, 43, 88, 0.25);
    border-color: rgba(255, 43, 88, 0.3);
}

.short-action-btn.liked .like-icon {
    fill: #FF2B58;
    stroke: #FF2B58;
}

.short-action-btn.liked .action-label {
    color: #FF2B58;
}

@keyframes likeHeartPop {
    0% { transform: scale(1); }
    15% { transform: scale(1.35); }
    30% { transform: scale(0.95); }
    45% { transform: scale(1.15); }
    60% { transform: scale(1); }
    100% { transform: scale(1); }
}

.short-action-btn.like-animating .action-icon-wrap {
    animation: likeHeartPop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Double-tap like overlay heart */
@keyframes doubleTapHeart {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    15% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0; }
}

.double-tap-heart {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 10;
    pointer-events: none;
}

.double-tap-heart svg {
    width: 80px;
    height: 80px;
    fill: #FF2B58;
    stroke: none;
    filter: drop-shadow(0 4px 12px rgba(255, 43, 88, 0.5));
    animation: doubleTapHeart 0.8s ease forwards;
}

/* Play overlay when video is paused */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.play-overlay.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.play-overlay svg {
    width: 32px;
    height: 32px;
    fill: #fff;
    margin-left: 4px;
}

/* Info section (bottom left) */
.short-info {
    position: absolute;
    bottom: 24px;
    left: 16px;
    right: 76px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.short-author {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.short-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.45;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Audio placeholder in shorts */
.shorts-audio-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background: linear-gradient(135deg, #18181b 0%, #121215 50%, #0f0f12 100%);
}

.shorts-audio-placeholder .svg-icon {
    width: 80px;
    height: 80px;
    color: rgba(255, 255, 255, 0.25);
}

.shorts-audio-placeholder audio {
    width: 80%;
    max-width: 300px;
}

/* URL embed wrapper in shorts */
.shorts-url-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
}

.shorts-url-wrapper iframe {
    width: 100%;
    height: 80%;
    max-height: 80vh;
}

/* Empty state */
.shorts-empty {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.shorts-empty .svg-icon {
    width: 64px;
    height: 64px;
    color: rgba(255, 255, 255, 0.15);
}

.shorts-empty h3 {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.shorts-empty p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
    margin: 0;
}

/* === Shorts Comments Bottom Sheet === */
.shorts-comments-sheet,
.shorts-share-sheet {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    visibility: hidden;
    pointer-events: none;
    contain: layout paint style;
    transition: visibility 0s linear 0.34s;
}

.shorts-comments-sheet.is-open,
.shorts-share-sheet.is-open,
.shorts-comments-sheet.is-closing,
.shorts-share-sheet.is-closing {
    visibility: visible;
    transition-delay: 0s;
}

.shorts-comments-sheet.is-open,
.shorts-share-sheet.is-open {
    pointer-events: auto;
}

.shorts-comments-backdrop,
.shorts-share-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.22s ease;
    will-change: opacity;
}

.shorts-comments-sheet.is-open .shorts-comments-backdrop,
.shorts-share-sheet.is-open .shorts-share-backdrop {
    opacity: 1;
}

.shorts-comments-panel,
.shorts-share-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(14, 14, 20, 0.38) 0%, rgba(8, 8, 12, 0.48) 100%);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px 24px 0 0;
    display: flex;
    flex-direction: column;
    max-height: min(72vh, 640px);
    overscroll-behavior: contain;
    transform: translate3d(0, 100%, 0);
    transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    contain: layout paint;
    box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    overflow: hidden;
    touch-action: pan-y;
}

.shorts-share-panel {
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
}

.shorts-comments-sheet.is-open .shorts-comments-panel,
.shorts-share-sheet.is-open .shorts-share-panel {
    transform: translate3d(0, 0, 0);
}

.shorts-comments-sheet.is-dragging .shorts-comments-panel,
.shorts-comments-sheet.is-dragging .shorts-comments-backdrop {
    transition: none;
}

@media (prefers-reduced-motion: reduce) {
    .shorts-comments-sheet,
    .shorts-share-sheet,
    .shorts-comments-backdrop,
    .shorts-share-backdrop,
    .shorts-comments-panel,
    .shorts-share-panel {
        transition-duration: 0.01ms !important;
    }
}

.shorts-comments-handle {
    width: 38px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    margin: 10px auto 6px;
    touch-action: none;
}

.shorts-comments-header,
.shorts-share-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shorts-comments-title,
.shorts-share-header span {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary, #fff);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.shorts-comments-close {
    background: none;
    border: none;
    color: var(--text-muted, rgba(255,255,255,0.7));
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.shorts-comments-close:active {
    background: rgba(255, 255, 255, 0.12);
}

.shorts-comments-close .svg-icon {
    width: 20px;
    height: 20px;
}

.shorts-comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    max-height: 38vh;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    contain: content;
}

.shorts-reply-form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
#shorts-reply-text {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 9px 14px;
    color: var(--text-primary, #fff);
    font-size: 13px;
    font-family: inherit;
    resize: none;
    outline: none;
    min-height: 36px;
    max-height: 80px;
    transition: border-color 0.2s;
}

#shorts-reply-text:focus {
    border-color: rgba(255, 255, 255, 0.15);
}

.shorts-reply-send {
    background: var(--color-accent, #7c5cfc);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.shorts-reply-send:active {
    transform: scale(0.92);
}

.shorts-reply-send .svg-icon {
    width: 16px;
    height: 16px;
    color: #fff;
}

/* Share stub */
.shorts-share-stub {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--text-muted, rgba(255,255,255,0.4));
    font-size: 13px;
    text-align: center;
}

.shorts-share-stub p {
    margin: 0;
}

/* URL validation status styles */
.url-input-wrapper {
    position: relative;
    width: 100%;
}

.url-input-wrapper input {
    padding-right: 40px !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Spinner inside the input on the right */
.url-validation-spinner {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin-input 0.8s linear infinite;
    pointer-events: none;
}

@keyframes spin-input {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Border animation / state styles */
.url-input-wrapper.checking input {
    border-color: var(--color-secondary) !important;
    box-shadow: 0 0 10px var(--color-primary-glow) !important;
}

.url-input-wrapper.success input {
    border-color: var(--color-success) !important;
    box-shadow: 0 0 10px rgba(0, 184, 148, 0.25) !important;
}

.url-input-wrapper.error input {
    border-color: var(--color-danger) !important;
    box-shadow: 0 0 10px rgba(214, 48, 49, 0.25) !important;
}

/* Text styles under input */
#url-validation-msg.success-msg {
    color: var(--color-success) !important;
}

#url-validation-msg.error-msg {
    color: var(--color-danger) !important;
}

/* Adjust share button icon position */
.short-action-btn.share-btn .action-icon-wrap .svg-icon {
    transform: translateX(-1px);
}



/* === RATING SHEET === */
.rating-options-container { display: flex; justify-content: space-around; padding: 20px 10px 40px; }
.rating-option-btn { background: transparent; border: none; color: var(--text-main); display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; transition: transform 0.2s; }
.rating-option-btn:active { transform: scale(0.9); }
.rating-icon-wrap { width: 56px; height: 56px; border-radius: 50%; display: flex; justify-content: center; align-items: center; background: var(--bg-card); }
.rating-icon-wrap .svg-icon { width: 32px; height: 32px; }
.rate-bad .rating-icon-wrap .svg-icon { color: var(--text-muted); }
.rate-normal .rating-icon-wrap .svg-icon { color: var(--color-warning); }
.rate-cool .rating-icon-wrap .svg-icon { color: var(--color-danger); }

.short-action-btn.like-btn.liked.rating-1 .like-icon { color: var(--text-muted); fill: var(--text-muted); }
.short-action-btn.like-btn.liked.rating-2 .like-icon { color: var(--color-warning); fill: var(--color-warning); }
.short-action-btn.like-btn.liked.rating-3 .like-icon { color: var(--color-danger); fill: var(--color-danger); }


/* === NEW DESIGN PLAYER === */
.new-design-panel {
    position: absolute;
    bottom: 20px;
    left: 15px;
    right: 15px;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 10;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.new-design-panel.panel-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(100px);
}

.nd-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nd-avatar-container {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.nd-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.nd-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    font-weight: bold;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.nd-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.nd-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.nd-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.nd-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nd-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    padding: 0;
    width: 36px;
    height: 36px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.nd-btn:active {
    background: rgba(0, 0, 0, 0.6);
}

.nd-btn .svg-icon {
    width: 18px;
    height: 18px;
}

.nd-content-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nd-comment-btn {
    position: relative;
}

.comment-dot {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 8px;
    height: 8px;
    background-color: #ffcc00; /* Yellow dot */
    border-radius: 50%;
    border: 1px solid #000;
    box-shadow: 0 0 4px #ffcc00;
}

.nd-btn.active-like {
    color: #4cd964;
    border-color: #4cd964;
}
.nd-btn.active-like .svg-icon {
    stroke: #4cd964;
}

.nd-btn.active-dislike {
    color: #ff3b30;
    border-color: #ff3b30;
}
.nd-btn.active-dislike .svg-icon {
    stroke: #ff3b30;
}

/* Settings Select */
.settings-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color, #fff);
    border: 1px solid rgba(255, 255, 255, 0.1);
    outline: none;
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-select:hover {
    background: rgba(255, 255, 255, 0.08);
}

.settings-select option {
    background: #1c1c1e;
    color: #fff;
}
.style-opt-btn.active {
    background-color: var(--color-primary);
    color: white !important;
    box-shadow: 0 4px 12px var(--color-primary-glow);
}

/* Full Minimalism Mode UI Panel styles */
.minimal-panel {
    position: absolute;
    bottom: calc(48px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 14px;
    border-radius: 16px;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s, transform 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Video Progress Bar / Scrubber (TikTok / Shorts Style) */
.video-progress-container {
    position: absolute;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: 12px;
    height: 24px;
    z-index: 15;
    cursor: pointer;
    display: flex;
    align-items: center;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.video-progress-track {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    position: relative;
    border-radius: 2px;
    transition: height 0.15s ease, background-color 0.15s ease;
}

.video-progress-container:hover .video-progress-track,
.video-progress-container.is-dragging .video-progress-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
}

.video-progress-filled {
    height: 100%;
    width: 0%;
    background: #ffffff;
    border-radius: 2px;
    position: absolute;
    left: 0;
    top: 0;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

.video-progress-thumb {
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.15s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.video-progress-container:hover .video-progress-thumb,
.video-progress-container.is-dragging .video-progress-thumb {
    transform: translate(-50%, -50%) scale(1);
}

.minimal-panel:active {
    background: rgba(0, 0, 0, 0.6);
    transform: translateX(-50%) scale(0.95);
}

.minimal-comment-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.minimal-comment-arrow {
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.5);
    stroke-width: 2.5;
    transition: transform 0.2s;
}

.minimal-panel:hover .minimal-comment-arrow {
    transform: translateY(-2px);
    color: #fff;
}

.minimal-comment-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    background-color: var(--color-warning, #ffcc00);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--color-warning, #ffcc00);
    border: 1px solid #000;
}

/* Submitting state for reply send button */
.shorts-reply-send.submitting {
    opacity: 0.5;
    pointer-events: none;
}

/* Уведомление по центру экрана (Toast) */
.center-toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.center-toast-container.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.center-toast-card {
    background: rgba(20, 20, 26, 0.95);
    border: 1px solid rgba(46, 213, 115, 0.45);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(46, 213, 115, 0.25);
    border-radius: 16px;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    backdrop-filter: blur(16px);
    white-space: nowrap;
}

.center-toast-card .svg-icon {
    width: 22px;
    height: 22px;
    color: #2ed573;
}


