/* RV_WATCH_YOUTUBE_COMMUNITY_PHASE2_20260729 */

:root {
    --rvc-red: #ff0033;
    --rvc-red-bright: #ff335c;
    --rvc-red-deep: #c90028;
    --rvc-bg: #090a0d;
    --rvc-panel: #111318;
    --rvc-panel-raised: #171a20;
    --rvc-border: rgba(255, 255, 255, 0.1);
    --rvc-muted: rgba(255, 255, 255, 0.64);
    --rvc-soft: rgba(255, 255, 255, 0.045);
}

.watch-community-page {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 5rem;
    color: #fff;
}

.watch-community-hero,
.watch-community-channel-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(1.5rem, 4vw, 3.3rem);
    overflow: hidden;
    border: 1px solid var(--rvc-border);
    border-radius: 28px;
    background:
        radial-gradient(circle at 85% 0%, rgba(255, 0, 51, 0.24), transparent 38%),
        linear-gradient(145deg, #17191f, #0d0f13 68%);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
}

.watch-community-hero span,
.watch-community-channel-header span,
.watch-community-sidebar-panel > span,
.watch-community-composer > header > span,
.watch-community-comments > header > span {
    color: var(--rvc-red-bright);
    font-size: 0.73rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.watch-community-hero h1,
.watch-community-channel-header h1,
.watch-community-composer h1 {
    margin: 0.55rem 0 0.7rem;
    font-size: clamp(2.1rem, 5vw, 4.4rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.watch-community-channel-header h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

.watch-community-hero p,
.watch-community-channel-header p,
.watch-community-composer > header p,
.watch-community-sidebar-panel p {
    max-width: 680px;
    margin: 0;
    color: var(--rvc-muted);
    line-height: 1.7;
}

.watch-community-primary,
.watch-community-secondary,
.watch-community-composer-actions button,
.watch-community-comment-form button,
.watch-community-signin-panel a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.85rem;
    padding: 0.7rem 1.1rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #fff;
    font: inherit;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.watch-community-primary,
.watch-community-composer-actions button,
.watch-community-comment-form button,
.watch-community-signin-panel a {
    background: linear-gradient(135deg, var(--rvc-red-bright), var(--rvc-red) 55%, var(--rvc-red-deep));
    box-shadow: 0 15px 35px rgba(255, 0, 51, 0.22);
}

.watch-community-secondary {
    border-color: var(--rvc-border);
    background: rgba(255, 255, 255, 0.055);
}

.watch-community-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.watch-community-channel-tabs {
    display: flex;
    gap: 1.5rem;
    margin: 0.9rem 0 1.6rem;
    padding: 0 1rem;
    border-bottom: 1px solid var(--rvc-border);
}

.watch-community-channel-tabs a {
    position: relative;
    padding: 1rem 0;
    color: var(--rvc-muted);
    font-weight: 800;
    text-decoration: none;
}

.watch-community-channel-tabs a.is-active {
    color: #fff;
}

.watch-community-channel-tabs a.is-active::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 3px;
    border-radius: 999px;
    background: var(--rvc-red);
    content: "";
}

.watch-community-layout,
.watch-community-detail-grid,
.watch-community-create-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.5rem;
    margin-top: 1.5rem;
    align-items: start;
}

.watch-community-feed,
.watch-community-detail-grid > main {
    display: grid;
    gap: 1rem;
}

.watch-community-card,
.watch-community-comments,
.watch-community-composer,
.watch-community-sidebar-panel,
.watch-community-empty {
    border: 1px solid var(--rvc-border);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(24, 27, 33, 0.98), rgba(14, 16, 20, 0.98));
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.22);
}

.watch-community-card {
    padding: 1.2rem;
}

.watch-community-card.is-detail {
    padding: clamp(1.2rem, 3vw, 2rem);
}

.watch-community-card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.watch-community-avatar,
.watch-community-comment-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 2.75rem;
    width: 2.75rem;
    height: 2.75rem;
    overflow: hidden;
    border: 2px solid var(--rvc-red);
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
    text-decoration: none;
    background: #20232b;
    box-shadow: 0 0 0 4px rgba(255, 0, 51, 0.1);
}

.watch-community-avatar img,
.watch-community-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.watch-community-author {
    min-width: 0;
}

.watch-community-author > a {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    color: #fff;
    text-decoration: none;
}

.watch-community-author span,
.watch-community-author time {
    color: var(--rvc-muted);
}

.watch-community-author time {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.78rem;
}

.watch-community-delete-form {
    margin-left: auto;
}

.watch-community-delete-form button {
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid transparent;
    border-radius: 50%;
    color: var(--rvc-muted);
    background: transparent;
    cursor: pointer;
}

.watch-community-delete-form button:hover {
    border-color: rgba(255, 0, 51, 0.35);
    color: #fff;
    background: rgba(255, 0, 51, 0.1);
}

.watch-community-body {
    margin-top: 1.1rem;
    color: rgba(255, 255, 255, 0.93);
    font-size: 1rem;
    line-height: 1.72;
    overflow-wrap: anywhere;
}

.watch-community-card.is-detail .watch-community-body {
    font-size: 1.08rem;
}

.watch-community-image {
    display: block;
    margin-top: 1rem;
    overflow: hidden;
    border: 1px solid var(--rvc-border);
    border-radius: 18px;
    background: #08090c;
}

.watch-community-image img {
    display: block;
    width: 100%;
    max-height: 650px;
    object-fit: contain;
}

.watch-community-poll {
    display: grid;
    gap: 0.65rem;
    margin-top: 1.1rem;
}

.watch-community-poll-option {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--rvc-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.watch-community-poll-option.is-selected {
    border-color: rgba(255, 0, 51, 0.65);
}

.watch-community-poll-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: linear-gradient(90deg, rgba(255, 0, 51, 0.23), rgba(255, 51, 92, 0.12));
    pointer-events: none;
}

.watch-community-poll-option button {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.86rem 1rem;
    border: 0;
    color: #fff;
    font: inherit;
    text-align: left;
    background: transparent;
    cursor: pointer;
}

.watch-community-poll-option button:disabled {
    cursor: default;
}

.watch-community-vote-total {
    margin: 0.15rem 0 0;
    color: var(--rvc-muted);
    font-size: 0.82rem;
}

.watch-community-vote-total a {
    color: var(--rvc-red-bright);
}

.watch-community-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--rvc-border);
}

.watch-community-actions form {
    margin: 0;
}

.watch-community-action {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-height: 2.4rem;
    padding: 0.48rem 0.72rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--rvc-muted);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
}

.watch-community-action:hover,
.watch-community-action.is-active {
    border-color: rgba(255, 0, 51, 0.32);
    color: #fff;
    background: rgba(255, 0, 51, 0.09);
}

.watch-community-action strong {
    color: #fff;
}

.watch-community-sidebar-panel {
    position: sticky;
    top: 5.5rem;
    padding: 1.35rem;
}

.watch-community-sidebar-panel h2 {
    margin: 0.45rem 0 0.65rem;
    font-size: 1.4rem;
}

.watch-community-sidebar-panel ul {
    display: grid;
    gap: 0.65rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.watch-community-sidebar-panel li {
    position: relative;
    padding-left: 1.15rem;
    color: var(--rvc-muted);
    line-height: 1.45;
}

.watch-community-sidebar-panel li::before {
    position: absolute;
    left: 0;
    color: var(--rvc-red-bright);
    content: "•";
}

.watch-community-empty {
    display: grid;
    justify-items: center;
    padding: 4rem 2rem;
    text-align: center;
}

.watch-community-empty > span {
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    background: var(--rvc-red);
    box-shadow: 0 18px 50px rgba(255, 0, 51, 0.22);
}

.watch-community-empty h2 {
    margin: 1rem 0 0.5rem;
}

.watch-community-empty p {
    margin: 0 0 1.2rem;
    color: var(--rvc-muted);
}

.watch-community-pagination {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.watch-community-pagination a,
.watch-community-detail-nav a {
    color: var(--rvc-red-bright);
    font-weight: 800;
    text-decoration: none;
}

.watch-community-notice {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--rvc-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.055);
}

.watch-community-notice.is-success {
    border-color: rgba(60, 208, 135, 0.38);
}

.watch-community-notice.is-error {
    border-color: rgba(255, 0, 51, 0.45);
}

.watch-community-detail-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.watch-community-comments {
    padding: clamp(1.2rem, 3vw, 2rem);
}

.watch-community-comments > header h2 {
    margin: 0.4rem 0 1rem;
}

.watch-community-comment-form {
    padding: 1rem;
    border: 1px solid var(--rvc-border);
    border-radius: 18px;
    background: var(--rvc-soft);
}

.watch-community-comment-form label {
    display: block;
    margin-bottom: 0.55rem;
    font-weight: 850;
}

.watch-community-comment-form textarea,
.watch-community-field textarea,
.watch-community-field input {
    width: 100%;
    border: 1px solid var(--rvc-border);
    border-radius: 13px;
    color: #fff;
    font: inherit;
    background: rgba(3, 4, 6, 0.58);
    outline: 0;
}

.watch-community-comment-form textarea,
.watch-community-field textarea {
    padding: 0.9rem;
    resize: vertical;
}

.watch-community-field input {
    min-height: 3rem;
    padding: 0.7rem 0.85rem;
}

.watch-community-comment-form textarea:focus,
.watch-community-field textarea:focus,
.watch-community-field input:focus {
    border-color: var(--rvc-red);
    box-shadow: 0 0 0 3px rgba(255, 0, 51, 0.12);
}

.watch-community-comment-form > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.65rem;
}

.watch-community-comment-form span,
.watch-community-field small {
    color: var(--rvc-muted);
    font-size: 0.78rem;
}

.watch-community-comment-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 1.2rem;
}

.watch-community-comment {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.8rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--rvc-border);
}

.watch-community-comment-avatar {
    width: 2.35rem;
    height: 2.35rem;
    flex-basis: 2.35rem;
    border-width: 1px;
}

.watch-community-comment header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: baseline;
}

.watch-community-comment time {
    color: var(--rvc-muted);
    font-size: 0.75rem;
}

.watch-community-comment p {
    margin: 0.4rem 0 0;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.55;
}

.watch-community-comment > form button {
    border: 0;
    color: var(--rvc-muted);
    background: transparent;
    cursor: pointer;
}

.watch-community-no-comments,
.watch-community-signin-panel {
    padding: 1rem;
    border: 1px dashed var(--rvc-border);
    border-radius: 15px;
    color: var(--rvc-muted);
    text-align: center;
}

.watch-community-signin-panel a {
    margin-top: 0.5rem;
}

.watch-community-composer {
    padding: clamp(1.2rem, 3vw, 2rem);
}

.watch-community-composer > header {
    margin-bottom: 1.5rem;
}

.watch-community-composer form {
    display: grid;
    gap: 1.2rem;
}

.watch-community-type-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    border: 0;
}

.watch-community-type-picker legend {
    margin-bottom: 0.65rem;
    font-weight: 900;
}

.watch-community-type-picker label {
    position: relative;
}

.watch-community-type-picker input {
    position: absolute;
    opacity: 0;
}

.watch-community-type-picker span {
    display: grid;
    gap: 0.25rem;
    min-height: 5rem;
    padding: 0.85rem;
    border: 1px solid var(--rvc-border);
    border-radius: 15px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.035);
}

.watch-community-type-picker small {
    color: var(--rvc-muted);
}

.watch-community-type-picker input:checked + span {
    border-color: var(--rvc-red);
    background: rgba(255, 0, 51, 0.11);
    box-shadow: 0 0 0 3px rgba(255, 0, 51, 0.08);
}

.watch-community-field {
    display: grid;
    gap: 0.5rem;
    font-weight: 800;
}

.watch-community-composer-panel {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid var(--rvc-border);
    border-radius: 18px;
    background: var(--rvc-soft);
}

.watch-community-composer-panel[hidden] {
    display: none;
}

.watch-community-composer-panel h2,
.watch-community-composer-panel p {
    margin: 0;
}

.watch-community-composer-panel p {
    color: var(--rvc-muted);
}

.watch-community-image-preview {
    overflow: hidden;
    border: 1px solid var(--rvc-border);
    border-radius: 15px;
    background: #08090c;
}

.watch-community-image-preview[hidden] {
    display: none;
}

.watch-community-image-preview img {
    display: block;
    width: 100%;
    max-height: 440px;
    object-fit: contain;
}

.watch-community-composer-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.8rem;
    padding-top: 1rem;
    border-top: 1px solid var(--rvc-border);
}

.watch-community-composer-actions a {
    color: var(--rvc-muted);
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 980px) {
    .watch-community-layout,
    .watch-community-detail-grid,
    .watch-community-create-layout {
        grid-template-columns: 1fr;
    }

    .watch-community-sidebar-panel {
        position: static;
    }
}

@media (max-width: 700px) {
    .watch-community-page {
        width: min(100% - 1rem, 1180px);
        padding-top: 1rem;
    }

    .watch-community-hero,
    .watch-community-channel-header {
        align-items: flex-start;
        flex-direction: column;
        border-radius: 20px;
    }

    .watch-community-hero h1,
    .watch-community-channel-header h1,
    .watch-community-composer h1 {
        font-size: clamp(2rem, 12vw, 3.1rem);
    }

    .watch-community-card,
    .watch-community-comments,
    .watch-community-composer,
    .watch-community-sidebar-panel,
    .watch-community-empty {
        border-radius: 18px;
    }

    .watch-community-type-picker {
        grid-template-columns: 1fr;
    }

    .watch-community-actions {
        gap: 0.2rem;
    }

    .watch-community-action {
        padding-inline: 0.55rem;
    }

    .watch-community-detail-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .watch-community-comment {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .watch-community-comment > form {
        grid-column: 2;
    }
}
