@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Roboto+Mono:wght@400;500;600&display=swap');

/* Personal channel — dark editorial video site. */
body.tube-v2 {
    --ink: #0b0f0d;
    --surface: #121916;
    --surface-raised: #18221d;
    --paper: #f1f0e9;
    --muted: #8e9b93;
    --faint: #63716a;
    --line: #2b3931;
    --accent: #d8ff55;
    --warm: #ff745b;
    --font: "Manrope", "Segoe UI", Arial, sans-serif;
    --mono: "Roboto Mono", "Cascadia Mono", Consolas, monospace;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--ink);
    color: var(--paper);
    font: 16px/1.55 var(--font);
    color-scheme: dark;
}
.tube-v2 *, .tube-v2 *::before, .tube-v2 *::after { box-sizing: border-box; }
.tube-v2 a { color: inherit; text-decoration: none; }
.tube-v2 button, .tube-v2 input, .tube-v2 textarea { font: inherit; }
.tube-v2 img { max-width: 100%; }
.tube-v2 h1, .tube-v2 h2, .tube-v2 h3, .tube-v2 p { margin: 0; }
.tube-v2 :focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.tube-v2 ::selection { background: var(--accent); color: var(--ink); }
.tube-v2 .skip-link { position: absolute; z-index: 20; top: -100px; left: 20px; padding: 12px 18px; background: var(--accent); color: var(--ink); font-weight: 800; }
.tube-v2 .skip-link:focus { top: 14px; }

.tube-v2 .site-header { border-bottom: 1px solid var(--line); background: rgba(11,15,13,.97); }
.tube-v2 .header-inner, .tube-v2 .main-shell { width: min(100% - 96px, 1440px); margin-inline: auto; }
.tube-v2 .header-inner { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.tube-v2 .brand { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; color: var(--paper); font-size: 18px; font-weight: 800; letter-spacing: -.04em; white-space: nowrap; }
.tube-v2 .brand-mark { flex: 0 0 auto; width: 42px; height: 42px; padding: 9px; border-radius: 11px; background: var(--accent); color: var(--ink); }
.tube-v2 .brand small { margin-left: 4px; color: var(--muted); font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; vertical-align: top; }
.tube-v2 nav { display: flex; align-items: center; gap: 6px; }
.tube-v2 nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 10px 14px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; transition: color 180ms ease; }
.tube-v2 nav a::after { position: absolute; right: 14px; bottom: 4px; left: 14px; height: 2px; background: var(--accent); content: ""; transform: scaleX(0); transform-origin: left; transition: transform 180ms ease; }
.tube-v2 nav a:hover, .tube-v2 nav a[aria-current] { color: var(--paper); }
.tube-v2 nav a:hover::after, .tube-v2 nav a[aria-current]::after { transform: scaleX(1); }
.tube-v2 .main-shell { flex: 1; padding-block: 58px 84px; }
.tube-v2 .home-shell { padding-top: 64px; }
.tube-v2 .eyebrow { display: flex; align-items: center; gap: 9px; color: var(--muted); font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .15em; line-height: 1.4; text-transform: uppercase; }
.tube-v2 .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(216,255,85,.12); }
.tube-v2 .heading-dot { color: var(--warm); }
.tube-v2 .back-link { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 28px; color: var(--muted); font-family: var(--mono); font-size: 12px; transition: color 180ms ease, transform 180ms ease; }
.tube-v2 .back-link:hover { color: var(--accent); transform: translateX(-3px); }
.tube-v2 .site-footer { width: min(100% - 96px, 1440px); margin: auto; padding: 22px 0 28px; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--faint); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

/* Video-first homepage */
.tube-v2 .videos-section { padding-top: 0; }
.tube-v2 .section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.tube-v2 .section-heading h1 { margin-top: 11px; color: var(--paper); font-size: clamp(2.5rem, 5vw, 4.7rem); font-weight: 800; letter-spacing: -.09em; line-height: .95; }
.tube-v2 .videos-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 52px 22px; }
.tube-v2 .video-card { min-width: 0; display: block; }
.tube-v2 .video-thumbnail { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.tube-v2 .video-thumbnail::after { position: absolute; inset: 0; border: 1px solid rgba(241,240,233,.12); border-radius: inherit; content: ""; pointer-events: none; }
.tube-v2 .video-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 360ms ease, filter 360ms ease; }
.tube-v2 .video-card:hover .video-thumbnail img { filter: saturate(1.1); transform: scale(1.035); }
.tube-v2 .thumbnail-missing { display: grid; place-items: center; background: var(--surface-raised); }
.tube-v2 .thumbnail-missing::before { color: var(--faint); content: "превью недоступно"; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.tube-v2 .video-duration { position: absolute; right: 12px; bottom: 12px; padding: 6px 8px; border-radius: 3px; background: rgba(11,15,13,.87); color: var(--paper); font-family: var(--mono); font-size: 10px; line-height: 1; }
.tube-v2 .thumbnail-play { position: absolute; z-index: 2; top: 50%; left: 50%; display: grid; width: 48px; height: 48px; place-items: center; padding-left: 3px; border: 1px solid var(--accent); border-radius: 50%; background: var(--accent); color: var(--ink); opacity: 0; transform: translate(-50%,-50%) scale(.9); transition: opacity 180ms ease, transform 180ms ease; }
.tube-v2 .video-card:hover .thumbnail-play, .tube-v2 .video-card:focus-visible .thumbnail-play { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.tube-v2 .video-info { padding-top: 15px; }
.tube-v2 .video-info h2 { color: var(--paper); font-size: clamp(17px,1.55vw,22px); font-weight: 700; letter-spacing: -.045em; line-height: 1.22; overflow-wrap: anywhere; transition: color 180ms ease; }
.tube-v2 .video-card:hover .video-info h2 { color: var(--accent); }
.tube-v2 .video-author { margin-top: 8px; color: var(--muted); font-size: 13px; }
.tube-v2 .video-stats { display: flex; flex-wrap: wrap; gap: 5px 16px; margin-top: 5px; color: var(--faint); font-family: var(--mono); font-size: 10px; }
.tube-v2 .empty-state { grid-column: 1 / -1; padding: 72px 24px; border: 1px dashed var(--line); border-radius: 14px; text-align: center; }
.tube-v2 .empty-play { color: var(--accent); font-size: 32px; }
.tube-v2 .empty-state h2 { margin-top: 16px; font-size: 25px; letter-spacing: -.05em; }
.tube-v2 .empty-state p { margin-top: 7px; color: var(--muted); }

/* Watch page */
.tube-v2 .watch-shell { flex: 0 0 auto; padding-top: 30px; padding-bottom: 28px; }
.tube-v2 .watch-layout { display: block; width: 100%; max-width: none; }
.tube-v2 .watch-layout.has-related {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 44px 32px;
    align-items: start;
}
.tube-v2 .watch-layout.has-related .video-section { grid-column: 1; grid-row: 1; }
.tube-v2 .watch-layout.has-related .comments-section { grid-column: 1; grid-row: 2; margin-top: 0; }
.tube-v2 .watch-layout.has-related .related-videos { grid-column: 2; grid-row: 1 / span 2; }
.tube-v2 .watch-layout .comments-section { margin-top: 44px; }
.tube-v2 .video-section { min-width: 0; }
.tube-v2 .video-container { aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #000; box-shadow: 0 20px 70px rgba(0,0,0,.24); }
.tube-v2 #player { width: 100%; height: 100%; }
.tube-v2 #player:empty { display: grid; place-items: center; background: var(--surface); }
.tube-v2 #player:empty::before { color: var(--muted); content: "видео недоступно"; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.tube-v2 .custom-player {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    isolation: isolate;
    background: #050706;
}
.tube-v2 .custom-player:fullscreen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}
.tube-v2 .player-media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    cursor: pointer;
}
.tube-v2 .player-big-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 68px;
    height: 68px;
    min-height: 0;
    margin: 0;
    place-items: center;
    padding: 0 0 0 5px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    background: var(--accent);
    color: var(--ink);
    font-size: 22px;
    transform: translate(-50%, -50%);
    transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
    z-index: 2;
}
.tube-v2 .player-big-play:hover { background: #e8ff91; color: var(--ink); transform: translate(-50%, -50%) scale(1.05); }
.tube-v2 .custom-player.is-playing .player-big-play { opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(.9); }
.tube-v2 .player-controls {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: auto auto minmax(90px, 1fr) auto minmax(55px, 90px) auto;
    align-items: center;
    gap: 9px;
    min-height: 58px;
    padding: 20px 15px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,.9));
    opacity: 0;
    transition: opacity 180ms ease;
}
.tube-v2 .custom-player:hover .player-controls,
.tube-v2 .custom-player:focus-within .player-controls,
.tube-v2 .custom-player.is-paused .player-controls,
.tube-v2 .custom-player.is-ended .player-controls { opacity: 1; }
.tube-v2 .custom-player.is-playing:not(:hover):not(:focus-within) .player-controls { opacity: 0; }
.tube-v2 .player-control {
    display: grid;
    width: 30px;
    height: 30px;
    min-height: 30px;
    margin: 0;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}
.tube-v2 .player-control:hover { background: rgba(216,255,85,.18); color: var(--accent); }
.tube-v2 .player-time {
    color: #ffffff;
    font-family: var(--mono);
    font-size: 10px;
    white-space: nowrap;
}
.tube-v2 .player-progress,
.tube-v2 .player-volume {
    width: 100%;
    min-height: 0;
    height: 4px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 99px;
    outline: 0;
    accent-color: var(--accent);
    background: rgba(255,255,255,.35);
    cursor: pointer;
}
.tube-v2 .player-volume { width: 100%; }
.tube-v2 .player-status {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 4;
    max-width: calc(100% - 32px);
    padding: 6px 9px;
    border-radius: 5px;
    background: rgba(11,15,13,.82);
    color: #ffb2a2;
    font-size: 11px;
    opacity: 0;
    pointer-events: none;
}
.tube-v2 .player-status.is-visible { opacity: 1; }
@media (max-width: 520px) {
    .tube-v2 .player-controls { grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 6px; padding-inline: 9px; }
    .tube-v2 .player-volume { display: none; }
    .tube-v2 .player-big-play { width: 56px; height: 56px; }
}
.tube-v2 .watch-info { padding-top: 28px; }
.tube-v2 .watch-info h1 { max-width: 920px; margin-top: 13px; color: var(--paper); font-size: clamp(2rem,4vw,4.5rem); font-weight: 700; letter-spacing: -.08em; line-height: 1.02; overflow-wrap: anywhere; }
.tube-v2 .author-row { display: flex; align-items: center; gap: 11px; margin-top: 18px; }
.tube-v2 .author-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: var(--accent);
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}
.tube-v2 .author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tube-v2 .watch-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.tube-v2 .watch-meta .author { color: var(--accent); }
.tube-v2 .video-description-card {
    position: relative;
    width: 100%;
    margin-top: 22px;
    padding: 12px;
    border-radius: 12px;
    background: #272727;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 180ms ease;
}
.tube-v2 .video-description-card:hover { background: #3f3f3f; }
.tube-v2 .video-description-card.is-expanded,
.tube-v2 .video-description-card.is-expanded:hover,
.tube-v2 .video-description-card.is-empty { background: #272727; }
.tube-v2 .video-description-card.is-expanded { cursor: default; }
.tube-v2 .video-description-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 8px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}
.tube-v2 .video-description-text-wrap { position: relative; margin-top: 8px; }
.tube-v2 .video-description-text {
    margin: 0;
    color: #f1f1f1;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-line;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}
.tube-v2 .video-description-card.is-expanded .video-description-text {
    display: block;
    overflow: visible;
}
.tube-v2 .video-description-text a {
    color: #3ea6ff;
    text-decoration: none;
}
.tube-v2 .video-description-text a:hover { text-decoration: underline; }
.tube-v2 .description-more,
.tube-v2 .description-collapse {
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
}
.tube-v2 .description-more {
    position: absolute;
    right: 0;
    bottom: 0;
    padding-left: 18px;
    background: linear-gradient(90deg, rgba(39,39,39,0), #272727 22%);
}
.tube-v2 .video-description-card:hover .description-more { background: linear-gradient(90deg, rgba(63,63,63,0), #3f3f3f 22%); }
.tube-v2 .description-more:hover,
.tube-v2 .description-collapse:hover { color: #3ea6ff; }
.tube-v2 .description-collapse { display: block; margin-top: 10px; }
.tube-v2 .description-more[hidden],
.tube-v2 .description-collapse[hidden] { display: none; }
.tube-v2 .related-videos {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}
.tube-v2 .related-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.tube-v2 .related-heading h2 {
    color: var(--paper);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.05em;
}
.tube-v2 .related-heading span {
    color: var(--faint);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.tube-v2 .related-list { display: grid; gap: 18px; }
.tube-v2 .related-video {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 11px;
    min-width: 0;
}
.tube-v2 .related-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-raised);
}
.tube-v2 .related-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 240ms ease, filter 240ms ease;
}
.tube-v2 .related-video:hover .related-thumbnail img { filter: saturate(1.1); transform: scale(1.04); }
.tube-v2 .related-thumbnail .thumbnail-missing::before { font-size: 8px; }
.tube-v2 .related-play {
    position: absolute;
    right: 6px;
    bottom: 5px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    padding-left: 2px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--ink);
    font-size: 9px;
    opacity: 0;
    transition: opacity 180ms ease;
}
.tube-v2 .related-video:hover .related-play { opacity: 1; }
.tube-v2 .related-info { min-width: 0; }
.tube-v2 .related-info h3 {
    display: -webkit-box;
    color: var(--paper);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.tube-v2 .related-video:hover .related-info h3 { color: var(--accent); }
.tube-v2 .related-info p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tube-v2 .related-info > span {
    display: block;
    margin-top: 3px;
    color: var(--faint);
    font-family: var(--mono);
    font-size: 9px;
}
.tube-v2 .comments-section { width: 100%; min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tube-v2 .comments-section h2 { color: var(--paper); font-size: 25px; font-weight: 700; letter-spacing: -.07em; line-height: 1.1; }
.tube-v2 .comment-form { display: flex; flex-direction: column; gap: 8px; margin-top: 25px; }
.tube-v2 .comment-form label { margin-top: 4px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.tube-v2 input, .tube-v2 textarea { width: 100%; min-height: 48px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: var(--surface-raised); color: var(--paper); transition: border-color 180ms ease, background 180ms ease; }
.tube-v2 input:focus, .tube-v2 textarea:focus { border-color: var(--accent); background: #202c25; }
.tube-v2 textarea { min-height: 112px; resize: vertical; }
.tube-v2 input::placeholder, .tube-v2 textarea::placeholder { color: var(--faint); }
.tube-v2 button { min-height: 48px; margin-top: 8px; padding: 12px 16px; border: 1px solid var(--accent); border-radius: 5px; background: var(--accent); color: var(--ink); font-size: 13px; font-weight: 800; cursor: pointer; transition: background 180ms ease, color 180ms ease, transform 180ms ease; }
.tube-v2 button:hover { background: transparent; color: var(--accent); }
.tube-v2 button:active { transform: translateY(1px); }
.tube-v2 button:disabled { cursor: wait; opacity: .6; }
.tube-v2 .form-status { min-height: 18px; color: var(--muted); font-size: 11px; }
.tube-v2 .form-status[data-state="error"] { color: #ff9f8d; }
.tube-v2 .form-status[data-state="success"] { color: var(--accent); }
.tube-v2 .comments-list { list-style: none; margin: 24px 0 0; padding: 0; }
.tube-v2 .comment-item { padding: 18px 0; border-top: 0; overflow-wrap: anywhere; }
.tube-v2 .comment-author { color: var(--paper); font-size: 13px; font-weight: 800; }
.tube-v2 .comment-text { margin-top: 7px; color: #bdc8c0; font-size: 13px; white-space: pre-wrap; }
.tube-v2 .comments-empty { padding-top: 18px; border-top: 0; color: var(--muted); font-size: 13px; }

/* About and restricted page */
.tube-v2 .text-page { padding-top: 70px; }
.tube-v2 .text-page > .content-heading { display: block; }
.tube-v2 .text-page > h1, .tube-v2 .text-page .content-heading h1 { margin-top: 20px; color: var(--paper); font-size: clamp(3.3rem,8vw,7.7rem); font-weight: 800; letter-spacing: -.1em; line-height: .92; overflow-wrap: anywhere; }
.tube-v2 .about-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 72px; margin-top: 55px; padding-top: 24px; border-top: 1px solid var(--line); }
.tube-v2 .about-content { max-width: 820px; }
.tube-v2 .about-text { padding: 24px 0; border-bottom: 1px solid var(--line); color: #c6d0c9; font-size: clamp(19px,2.2vw,29px); line-height: 1.5; overflow-wrap: anywhere; }
.tube-v2 .about-text a { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.tube-v2 .about-text a:hover { color: var(--paper); }
.tube-v2 .about-aside { color: var(--muted); font-family: var(--mono); font-size: 11px; line-height: 1.8; }
.tube-v2 .aside-label { display: block; margin-bottom: 12px; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }
.tube-v2 .upload-panel { display: flex; align-items: flex-start; gap: 20px; max-width: 760px; margin-top: 54px; padding: 25px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tube-v2 .access-mark { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--accent); color: var(--ink); font-size: 25px; font-weight: 800; }
.tube-v2 .upload-panel h2 { color: var(--paper); font-size: 18px; }
.tube-v2 .upload-panel p { margin-top: 7px; color: var(--muted); }

@media (max-width: 1050px) {
    .tube-v2 .header-inner, .tube-v2 .main-shell { width: min(100% - 64px, 1000px); }
    .tube-v2 .videos-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .tube-v2 .watch-layout.has-related { grid-template-columns: minmax(0,1fr) 320px; gap: 28px; }
    .tube-v2 .about-layout { gap: 42px; }
    .tube-v2 .site-footer { width: min(100% - 64px, 1000px); }
}
@media (max-width: 800px) {
    .tube-v2 .header-inner, .tube-v2 .main-shell { width: min(100% - 40px, 680px); }
    .tube-v2 .header-inner { min-height: 82px; }
    .tube-v2 .watch-layout { grid-template-columns: 1fr; }
    .tube-v2 .watch-layout.has-related { display: block; }
    .tube-v2 .watch-layout.has-related .video-section,
    .tube-v2 .watch-layout.has-related .comments-section,
    .tube-v2 .watch-layout.has-related .related-videos {
        grid-column: auto;
        grid-row: auto;
    }
    .tube-v2 .watch-layout.has-related .comments-section { margin-top: 44px; }
    .tube-v2 .related-videos { margin-top: 36px; }
    .tube-v2 .comments-section { max-width: 620px; }
    .tube-v2 .about-layout { grid-template-columns: 1fr; gap: 28px; margin-top: 42px; }
    .tube-v2 .about-aside { max-width: 380px; }
}
@media (max-width: 520px) {
    .tube-v2 .header-inner, .tube-v2 .main-shell { width: min(100% - 32px, 470px); }
    .tube-v2 .header-inner { align-items: flex-start; flex-wrap: wrap; gap: 11px 16px; padding-block: 16px; }
    .tube-v2 .brand { font-size: 16px; }
    .tube-v2 .brand-mark { width: 38px; height: 38px; padding: 8px; }
    .tube-v2 nav { width: 100%; }
    .tube-v2 nav a { padding: 8px 10px 10px 0; margin-right: 14px; font-size: 10px; }
    .tube-v2 nav a::after { right: 10px; left: 0; }
    .tube-v2 .main-shell { padding-block: 38px 48px; }
    .tube-v2 .home-shell { padding-top: 40px; }
    .tube-v2 .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
    .tube-v2 .section-heading h1 { font-size: 3.5rem; }
    .tube-v2 .videos-grid { grid-template-columns: 1fr; gap: 38px; }
    .tube-v2 .video-info h2 { font-size: 21px; }
    .tube-v2 .watch-shell { padding-top: 25px; }
    .tube-v2 .watch-info h1 { font-size: 2.25rem; }
    .tube-v2 .text-page { padding-top: 46px; }
    .tube-v2 .text-page .content-heading h1 { font-size: clamp(3.4rem,17vw,5.6rem); }
    .tube-v2 .about-layout { margin-top: 34px; }
    .tube-v2 .about-text { padding: 19px 0; font-size: 20px; }
    .tube-v2 .upload-panel { margin-top: 38px; padding: 20px; }
    .tube-v2 .site-footer { width: min(100% - 32px, 470px); flex-direction: column; gap: 7px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
    .tube-v2 *, .tube-v2 *::before, .tube-v2 *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Authentication and profile */
.tube-v2 .auth-shell { width: min(100% - 40px, 560px); padding-top: 72px; }
.tube-v2 .auth-card { padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.tube-v2 .auth-card h1 { margin-top: 14px; color: var(--paper); font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -.08em; line-height: 1; }
.tube-v2 .auth-form, .tube-v2 .profile-form { display: flex; flex-direction: column; gap: 9px; margin-top: 28px; }
.tube-v2 .auth-form label, .tube-v2 .profile-form label { margin-top: 6px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.tube-v2 .auth-form button, .tube-v2 .profile-form button { margin-top: 10px; }
.tube-v2 .auth-error { margin-top: 18px; color: #ff9f8d; font-size: 13px; }
.tube-v2 .auth-success { margin-top: 18px; color: var(--accent); font-size: 13px; }
.tube-v2 .auth-switch { margin-top: 22px; color: var(--muted); font-size: 13px; }
.tube-v2 .auth-switch a, .tube-v2 .comment-login-prompt a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.tube-v2 .account-link { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.tube-v2 .profile-layout { display: grid; grid-template-columns: 170px minmax(0, 560px); gap: 48px; margin-top: 42px; align-items: start; }
.tube-v2 .profile-card { display: flex; flex-direction: column; align-items: center; gap: 13px; color: var(--muted); font-size: 12px; text-align: center; }
.tube-v2 .profile-avatar, .tube-v2 .comment-avatar, .tube-v2 .comment-avatar-fallback { display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--accent); color: var(--ink); font-weight: 800; overflow: hidden; }
.tube-v2 .profile-avatar { width: 128px; height: 128px; font-size: 40px; }
.tube-v2 .profile-avatar img, .tube-v2 .comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tube-v2 .profile-username { color: var(--paper); font-family: var(--mono); font-size: 11px; }
.tube-v2 .profile-form { margin-top: 0; }
.tube-v2 .profile-form small { color: var(--faint); font-size: 11px; }
.tube-v2 .logout-form { margin-top: 24px; }
.tube-v2 .logout-link { min-height: 44px; margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--muted); font-size: 12px; }
.tube-v2 .logout-link:hover { border-color: var(--accent); color: var(--accent); background: transparent; }

/* YouTube-like comments */
.tube-v2 .comment-login-prompt { margin-top: 22px; padding: 17px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; }
.tube-v2 .comment-item { display: flex; gap: 12px; }
.tube-v2 .comment-avatar, .tube-v2 .comment-avatar-fallback { width: 34px; height: 34px; font-size: 13px; }
.tube-v2 .comment-content { min-width: 0; flex: 1; }
.tube-v2 .comment-author { display: block; color: var(--paper); font-size: 13px; font-weight: 800; }
.tube-v2 .comment-date { margin-left: 7px; color: var(--faint); font-family: var(--mono); font-size: 9px; font-weight: 400; }
.tube-v2 .comment-text { margin-top: 5px; color: #c6d0c9; font-size: 13px; line-height: 1.5; }

@media (max-width: 800px) {
    .tube-v2 .profile-layout { grid-template-columns: 1fr; gap: 30px; }
    .tube-v2 .profile-card { align-items: flex-start; text-align: left; }
}
@media (max-width: 520px) {
    .tube-v2 .auth-shell { width: min(100% - 32px, 470px); padding-top: 48px; }
    .tube-v2 .auth-card { padding: 21px; }
}

.tube-v2 .comments-heading { display: flex; align-items: baseline; justify-content: flex-start; gap: 10px; }
.tube-v2 .comments-count { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.tube-v2 .comments-section { padding: 0; border: 0; border-radius: 0; background: transparent; }
.tube-v2 .comments-section h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.tube-v2 .comment-form { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 0 13px; align-items: start; padding: 24px 0; border-bottom: 0; }
.tube-v2 .comment-compose-avatar { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; overflow: hidden; background: var(--accent); color: var(--ink); font-weight: 800; }
.tube-v2 .comment-compose-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tube-v2 .comment-compose-fields { min-width: 0; }
.tube-v2 .comment-form textarea { min-height: 46px; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.tube-v2 .comment-form textarea:focus { border-color: var(--accent); background: transparent; box-shadow: none; }
.tube-v2 .comment-compose-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
.tube-v2 .comment-hint { color: var(--muted); font-size: 11px; }
.tube-v2 .comment-form button { min-height: 40px; margin-top: 0; padding: 9px 14px; }
.tube-v2 .comment-form .form-status { grid-column: 2; }
.tube-v2 .comments-list { margin-top: 0; }
.tube-v2 .comments-list > :first-child { border-top: 0; }
.tube-v2 .comment-item { padding: 22px 0; }
@media (max-width: 520px) {
    .tube-v2 .comment-compose-actions { align-items: flex-start; flex-direction: column; gap: 9px; }
    .tube-v2 .comment-form button { width: 100%; }
}

/* Inline YouTube-like comment composer */
.tube-v2 .comment-form { grid-template-columns: 40px minmax(0, 1fr); }
.tube-v2 .comment-compose-avatar { width: 40px; height: 40px; }
.tube-v2 .comment-compose-actions { display: none; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; }
.tube-v2 .comment-form.is-active .comment-compose-actions { display: flex; }
.tube-v2 .comment-form textarea {
    min-height: 42px;
    height: 42px;
    max-height: 220px;
    padding: 10px 0 8px;
    overflow-y: hidden;
    border: 0;
    border-bottom: 1px solid #3f3f3f;
    border-radius: 0;
    outline: 0;
    background: transparent;
    color: var(--paper);
    resize: none;
    transition: border-color 180ms ease, border-bottom-width 180ms ease;
}
.tube-v2 .comment-form textarea:focus {
    border: 0;
    border-bottom: 2px solid #ffffff;
    background: transparent;
    box-shadow: none;
}
.tube-v2 .comment-form textarea::placeholder { color: #aaaaaa; opacity: 1; }
.tube-v2 .comment-actions-buttons { display: flex; align-items: center; gap: 8px; }
.tube-v2 .comment-actions-buttons button { width: auto; }
.tube-v2 .comment-form .comment-cancel,
.tube-v2 .comment-form .comment-cancel:hover {
    min-height: 36px;
    margin: 0;
    padding: 8px 16px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
}
.tube-v2 .comment-form .comment-cancel:hover { background: rgba(255,255,255,.1); }
.tube-v2 .comment-form .comment-actions-buttons button[type="submit"] {
    min-height: 36px;
    margin: 0;
    padding: 8px 16px;
    border: 0;
    border-radius: 18px;
    background: #272727;
    color: #717171;
    font-size: 13px;
    font-weight: 500;
    cursor: not-allowed;
}
.tube-v2 .comment-form .comment-actions-buttons button[type="submit"]:not(:disabled) {
    background: #ffffff;
    color: #0f0f0f;
    cursor: pointer;
}
.tube-v2 .comment-form .comment-actions-buttons button[type="submit"]:not(:disabled):hover { background: #e5e5e5; }
@media (max-width: 520px) {
    .tube-v2 .comment-compose-actions { align-items: center; flex-direction: row; }
    .tube-v2 .comment-hint { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tube-v2 .comment-actions-buttons { flex: 0 0 auto; }
}
