:root {
    --black: #050505;
    --black-soft: #0b0b0b;
    --panel: #101010;
    --panel-deep: #080808;

    --gold: #d4af37;
    --gold-light: #f3d86f;
    --gold-deep: #8c6919;

    --text: #f4e8bf;
    --muted: #bcae86;

    --red: #7a111f;
    --blue: #0b2748;

    --border: rgba(212, 175, 55, 0.28);
    --border-strong: rgba(212, 175, 55, 0.55);
}

/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top, rgba(122, 17, 31, 0.12), transparent 28%),
        linear-gradient(180deg, #050505 0%, #020202 100%);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

button,
a {
    font: inherit;
}

/* =========================================================
   APP SHELL
   ========================================================= */

.entertainment-current-app {
    width: 100%;
    min-height: 100vh;
    background: transparent;
}

/* =========================================================
   TOP APP BAR
   ========================================================= */

.entertainment-topbar {
    position: sticky;
    top: 0;
    z-index: 50;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    padding: 18px 28px;

    background:
        linear-gradient(
            180deg,
            rgba(10, 10, 10, 0.98),
            rgba(5, 5, 5, 0.96)
        );

    border-bottom: 1px solid var(--border-strong);
    backdrop-filter: blur(12px);
}

.entertainment-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-to-media {
    display: grid;
    place-items: center;

    width: 46px;
    height: 46px;

    border: 1px solid var(--border-strong);
    border-radius: 50%;

    color: var(--gold-light);
    text-decoration: none;

    background: #090909;

    font-size: 1.3rem;
    font-weight: 900;

    transition: 0.2s ease;
}

.back-to-media:hover {
    background: var(--gold);
    color: #050505;
}

.entertainment-brand p {
    margin: 0 0 5px;

    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.2em;
}

.entertainment-brand h1 {
    margin: 0;

    color: var(--gold-light);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
    line-height: 1;
}

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

.entertainment-actions button {
    padding: 11px 16px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: #0c0c0c;
    color: var(--gold-light);

    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;

    cursor: pointer;

    transition: 0.2s ease;
}

.entertainment-actions button:hover {
    background: var(--gold);
    color: #050505;
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.entertainment-nav {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 16px 28px;

    overflow-x: auto;

    background: #070707;
    border-bottom: 1px solid var(--border);
}

.entertainment-nav-tab {
    flex: 0 0 auto;

    padding: 11px 16px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: #0d0d0d;
    color: var(--muted);

    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.11em;

    cursor: pointer;

    transition: 0.2s ease;
}

.entertainment-nav-tab:hover,
.entertainment-nav-tab.is-active {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-light);
}

/* =========================================================
   FEATURED PLAYER
   ========================================================= */

.featured-entertainment {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
    gap: 28px;

    max-width: 1500px;
    margin: 0 auto;

    padding: 38px 28px 22px;
}

.featured-player,
.featured-info {
    min-height: 470px;

    border: 1px solid var(--border);
    border-radius: 24px;

    background:
        linear-gradient(
            180deg,
            rgba(20, 20, 20, 0.98),
            rgba(7, 7, 7, 0.98)
        );

    overflow: hidden;
}

.player-placeholder {
    display: grid;
    place-items: center;

    width: 100%;
    height: 100%;

    min-height: 470px;

    background:
        radial-gradient(
            circle at center,
            rgba(212, 175, 55, 0.13),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            rgba(122, 17, 31, 0.25),
            rgba(7, 7, 7, 0.95) 55%,
            rgba(11, 39, 72, 0.2)
        );
}

.player-placeholder span {
    display: grid;
    place-items: center;

    width: 110px;
    height: 110px;

    border: 2px solid var(--gold);
    border-radius: 50%;

    color: var(--gold-light);

    font-size: 2.5rem;

    box-shadow:
        0 0 40px rgba(212, 175, 55, 0.18);
}

/* =========================================================
   RELATED / UP NEXT MEDIA RAIL
   ========================================================= */

.related-media-panel {
    height: 470px;
    min-height: 470px;

    display: flex;
    flex-direction: column;

    padding: 18px;

    border: 1px solid var(--border);
    border-radius: 24px;

    background:
        linear-gradient(
            180deg,
            rgba(18, 18, 18, 0.98),
            rgba(6, 6, 6, 0.98)
        );

    overflow: hidden;
}

.related-media-heading {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 14px;
}

.related-media-heading p {
    margin: 0 0 4px;

    color: var(--gold);

    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.related-media-heading h2 {
    margin: 0;

    color: var(--gold-light);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    line-height: 1;
}

.autoplay-toggle {
    flex: 0 0 auto;

    padding: 8px 11px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: #090909;
    color: var(--gold-light);

    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.08em;

    cursor: pointer;
}

.autoplay-toggle:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.related-media-list {
    flex: 1 1 auto;

    display: flex;
    flex-direction: column;
    gap: 10px;

    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    padding-right: 4px;

    scrollbar-width: thin;
}

.related-media-item {
    flex: 0 0 auto;

    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    gap: 12px;

    padding: 7px;

    border: 1px solid transparent;
    border-radius: 13px;

    cursor: pointer;

    transition: 0.2s ease;
}

.related-media-item:hover {
    border-color: var(--border);
    background: rgba(212, 175, 55, 0.06);
}

.related-thumbnail {
    position: relative;

    display: grid;
    place-items: center;

    width: 138px;
    aspect-ratio: 16 / 9;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 10px;

    background:
        radial-gradient(
            circle at center,
            rgba(212, 175, 55, 0.16),
            transparent 42%
        ),
        #080808;

    color: var(--gold-light);
}

.related-thumbnail > span {
    font-size: 1.35rem;
}

.related-thumbnail > small {
    position: absolute;

    right: 5px;
    bottom: 5px;

    padding: 3px 5px;

    border-radius: 4px;

    background: rgba(0, 0, 0, 0.86);
    color: #fff;

    font-size: 0.58rem;
    font-weight: 800;
}

.related-copy {
    min-width: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-copy > span {
    color: var(--gold);

    font-size: 0.54rem;
    font-weight: 900;
    letter-spacing: 0.11em;
}

.related-copy h3 {
    margin: 5px 0 5px;

    color: var(--gold-light);

    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.25;
}

.related-copy p {
    margin: 0;

    color: var(--muted);

    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.66rem;
    line-height: 1.3;
}

.featured-kicker {
    margin: 0 0 14px;

    color: var(--gold);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.featured-info h2 {
    margin: 0;

    color: var(--gold-light);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.8rem;
    line-height: 1.05;
}

.featured-info > p:not(.featured-kicker) {
    margin: 22px 0 0;

    color: var(--muted);

    font-size: 1rem;
    line-height: 1.8;
}

.featured-buttons {
    display: flex;
    gap: 12px;

    margin-top: 28px;
}

.featured-buttons button {
    flex: 1;

    padding: 14px 18px;

    border: 1px solid var(--border-strong);
    border-radius: 999px;

    background: transparent;
    color: var(--gold-light);

    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.1em;

    cursor: pointer;

    transition: 0.2s ease;
}

.featured-buttons button:first-child,
.featured-buttons button:hover {
    background: var(--gold);
    color: #050505;
}

/* =========================================================
   GENERAL SECTIONS
   ========================================================= */

.entertainment-section {
    max-width: 1500px;
    margin: 0 auto;

    padding: 42px 28px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 22px;
}

.section-heading p {
    margin: 0 0 7px;

    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.17em;
}

.section-heading h2 {
    margin: 0;

    color: var(--gold-light);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
}

.section-heading button {
    padding: 11px 15px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: #0b0b0b;
    color: var(--gold-light);

    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;

    cursor: pointer;
}

/* =========================================================
   MEDIA CARD GRID
   ========================================================= */

.media-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.media-card {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 18px;

    background:
        linear-gradient(
            180deg,
            rgba(18, 18, 18, 0.98),
            rgba(7, 7, 7, 0.98)
        );

    transition: 0.22s ease;
}

.media-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
}

.media-thumbnail {
    display: grid;
    place-items: center;

    aspect-ratio: 16 / 9;

    background:
        radial-gradient(
            circle at center,
            rgba(212, 175, 55, 0.18),
            transparent 33%
        ),
        linear-gradient(
            135deg,
            #2d090f,
            #0b0b0b 55%,
            #09192c
        );

    color: var(--gold-light);

    font-size: 2rem;
}

.media-card-content {
    padding: 18px;
}

.media-card-content h3 {
    margin: 0;

    color: var(--gold-light);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
}

.media-card-content p {
    margin: 10px 0 0;

    color: var(--muted);
    font-size: 0.9rem;
}

.media-card-content span {
    display: inline-block;

    margin-top: 12px;

    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}
/* =========================================================
   THETA MEDIA PLAYER
   ========================================================= */

.theta-media-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 0;
    height: auto;
    overflow: hidden;
    background: #000;
}

.entertainment-video {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    background: #000;
}

.video-empty-state {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;

    background:
        radial-gradient(
            circle at center,
            rgba(212, 175, 55, 0.14),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            rgba(122, 17, 31, 0.22),
            #070707 55%,
            rgba(11, 39, 72, 0.20)
        );

    color: var(--gold-light);
}
.video-empty-state[hidden] {
    display: none;
}
.video-empty-state span {
    display: grid;
    place-items: center;

    width: 110px;
    height: 110px;

    border: 2px solid var(--gold);
    border-radius: 50%;

    font-size: 2.5rem;
}

.video-empty-state p {
    margin: 0;

    color: var(--gold-light);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.theta-player-controls {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 10;

    display: flex;
    align-items: center;
    gap: 6px;

    padding: 6px 10px;

    border: 1px solid var(--border-strong);
    border-radius: 12px;

    background: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(12px);
}
.theta-player-controls[hidden] {
    display: none !important;
}
.theta-player-controls button {
    display: grid;
    place-items: center;

    min-width: 34px;
    height: 34px;

    padding: 0 8px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: #0b0b0b;
    color: var(--gold-light);

    font-size: 0.9rem;
    font-weight: 900;
    cursor: pointer;
    transition: 0.2s ease;
}

.social-control {
    flex: 0 0 auto;
}

.social-control.is-active {
    background: var(--gold);
    color: #050505;
    border-color: var(--gold);
}

.theta-player-controls .subscribe-control {
    width: auto;
    min-width: 108px;
    padding: 0 16px;

    background: var(--gold);
    color: #050505;
    border-color: var(--gold);

    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.theta-player-controls .subscribe-control:hover {
    background: var(--gold-light);
    color: #050505;
}

.theta-player-controls .subscribe-control.is-subscribed {
    background: #0b0b0b;
    color: var(--gold-light);
    border-color: var(--gold);
}

/* Push fullscreen to the far-right edge */
#fullscreenBtn {
    margin-left: auto;
}

.theta-player-controls button:hover {
    border-color: var(--gold);
    background: var(--gold);
    color: #050505;
}

.player-divider {
    width: 1px;
    height: 28px;

    margin: 0 3px;

    background: var(--border-strong);
}

.volume-readout {
    min-width: 48px;

    color: var(--gold-light);

    text-align: center;

    font-size: 0.72rem;
    font-weight: 900;
}

.theta-media-player:fullscreen {
    width: 100vw;
    height: 100vh;
    background: #000;
}

.theta-media-player:fullscreen .entertainment-video {
    width: 100%;
    height: 100%;
}

.theta-media-player:fullscreen .theta-player-controls {
    bottom: 26px;
}

/* =========================================================
   MUSIC STRIP
   ========================================================= */

.horizontal-content-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 18px;
}

.compact-media-card {
    padding: 22px;

    border: 1px solid var(--border);
    border-radius: 18px;

    background:
        linear-gradient(
            180deg,
            rgba(17, 17, 17, 0.98),
            rgba(7, 7, 7, 0.98)
        );
}

.compact-thumbnail {
    display: grid;
    place-items: center;

    width: 68px;
    height: 68px;

    margin-bottom: 20px;

    border: 1px solid var(--gold-deep);
    border-radius: 18px;

    background: rgba(212, 175, 55, 0.08);

    color: var(--gold-light);
    font-size: 1.8rem;
}

.compact-media-card h3 {
    margin: 0;

    color: var(--gold-light);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
}

.compact-media-card p {
    margin: 9px 0 0;

    color: var(--muted);
    font-size: 0.9rem;
}

/* =========================================================
   CHANNELS
   ========================================================= */

.channel-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.channel-card {
    padding: 26px;

    text-align: center;

    border: 1px solid var(--border);
    border-radius: 20px;

    background:
        linear-gradient(
            180deg,
            rgba(18, 18, 18, 0.98),
            rgba(7, 7, 7, 0.98)
        );
}

.channel-avatar {
    display: grid;
    place-items: center;

    width: 86px;
    height: 86px;

    margin: 0 auto 18px;

    border: 2px solid var(--gold);
    border-radius: 50%;

    background: #090909;

    color: var(--gold-light);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;

    box-shadow:
        0 0 26px rgba(212, 175, 55, 0.1);
}

.channel-card h3 {
    margin: 0;

    color: var(--gold-light);

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
}

.channel-card p {
    min-height: 42px;

    margin: 10px 0 18px;

    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.channel-card button {
    width: 100%;

    padding: 11px 14px;

    border: 1px solid var(--border-strong);
    border-radius: 999px;

    background: transparent;
    color: var(--gold-light);

    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.09em;

    cursor: pointer;

    transition: 0.2s ease;
}

.channel-card button:hover {
    background: var(--gold);
    color: #050505;
}

/* =========================================================
   FOOTER
   ========================================================= */

.entertainment-footer {
    margin-top: 34px;

    padding: 30px 20px 36px;

    border-top: 1px solid var(--border);

    color: #90793f;

    text-align: center;

    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.18em;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .featured-entertainment {
        grid-template-columns: 1fr;
    }

    .featured-info {
        min-height: auto;
    }

    .media-card-grid,
    .channel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .horizontal-content-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {

    .entertainment-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .entertainment-actions {
        width: 100%;
        overflow-x: auto;
    }

    .featured-entertainment,
    .entertainment-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .featured-info h2 {
        font-size: 2.15rem;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .media-card-grid,
    .channel-grid,
    .horizontal-content-strip {
        grid-template-columns: 1fr;
    }
}

/* ==================================================
   INTERACTION / COMMENTS
================================================== */

.interaction-section {
    max-width: 1500px;
    margin: 0 auto;
    padding: 34px 28px 18px;
}

.interaction-section .section-heading {
    margin-bottom: 18px;
}

.interaction-section .section-heading p {
    margin: 0 0 6px;
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
}

.interaction-section .section-heading h2 {
    margin: 0;
    color: var(--gold-light);
    font-size: 1.65rem;
}

.interaction-shell {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background:
        linear-gradient(
            180deg,
            rgba(20, 20, 20, 0.98),
            rgba(7, 7, 7, 0.98)
        );
}

.comment-composer {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.comment-avatar {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid var(--gold);
    border-radius: 50%;
    background: #090909;
    color: var(--gold);
    font-weight: 900;
}

.comment-entry {
    flex: 1;
}

.comment-entry textarea {
    display: block;
    width: 100%;
    min-height: 90px;
    resize: vertical;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: none;
    background: #080808;
    color: #f5f0df;
    font: inherit;
    line-height: 1.5;
}

.comment-entry textarea:focus {
    border-color: var(--gold);
}

.comment-entry textarea::placeholder {
    color: var(--muted);
}

.comment-entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}

#commentCharacterCount {
    color: var(--muted);
    font-size: 0.72rem;
}

#postCommentBtn {
    padding: 11px 18px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: var(--gold);
    color: #080808;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 0 14px;
}

.comments-header strong {
    color: var(--gold-light);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
}

#commentSort {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #080808;
    color: var(--gold-light);
    outline: none;
}

.comments-list {
    display: grid;
    gap: 12px;
}

.comment-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.28);
}

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

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.comment-author strong {
    color: var(--gold-light);
    font-size: 0.82rem;
}

.comment-author span {
    color: var(--muted);
    font-size: 0.68rem;
}

.comment-body > p {
    margin: 8px 0 12px;
    color: #ddd6c4;
    font-size: 0.84rem;
    line-height: 1.5;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-actions button {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 11px;
    background: #080808;
    color: var(--gold-light);
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
}

.comment-actions button:hover,
#commentSort:hover {
    border-color: var(--gold);
}

@media (max-width: 760px) {
    .interaction-section {
        padding: 26px 16px 14px;
    }

    .interaction-shell {
        padding: 16px;
    }

    .comment-composer,
    .comment-item {
        gap: 10px;
    }

    .comment-avatar {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    .comment-entry-footer {
        align-items: flex-end;
        flex-direction: column;
    }
}
/* =========================================================
   UPLOAD MEDIA PANEL
========================================================= */

.upload-panel {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
}

.upload-panel[hidden] {
    display: none;
}

.upload-panel-card {
    width: min(620px, 100%);
    max-height: 90vh;
    overflow-y: auto;

    padding: 28px;

    border: 1px solid rgba(212, 175, 55, 0.55);
    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            rgba(35, 5, 8, 0.98),
            rgba(5, 7, 9, 0.99)
        );

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.75),
        0 0 40px rgba(212, 175, 55, 0.08);
}

.upload-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 24px;
}

.upload-panel-header h2 {
    margin: 0;

    color: #f4d35e;

    font-size: 30px;
}

#closeUploadPanelBtn {
    width: 44px;
    height: 44px;

    border: 1px solid rgba(212, 175, 55, 0.55);
    border-radius: 50%;

    background: transparent;
    color: #f4d35e;

    font-size: 28px;
    cursor: pointer;
}

#mediaUploadForm {
    display: grid;
    gap: 14px;
}

#mediaUploadForm label {
    color: #f4d35e;
    font-weight: 700;
    letter-spacing: 1px;
}

#mediaUploadForm input,
#mediaUploadForm select,
#mediaUploadForm textarea {
    width: 100%;
    box-sizing: border-box;

    padding: 14px 16px;

    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 12px;

    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;

    font: inherit;
}

#submitMediaUploadBtn {
    margin-top: 12px;
    padding: 16px 20px;

    border: 1px solid #d4af37;
    border-radius: 14px;

    background: #d4af37;
    color: #090909;

    font-weight: 900;
    letter-spacing: 1.5px;

    cursor: pointer;
}

#mediaUploadMessage {
    min-height: 22px;
    margin: 4px 0 0;

    color: #f4d35e;
}
.toggle-controls-btn {
    position: absolute;
    bottom: 12px;
    right: 56px;          /* moved left of the expand button */
    z-index: 15;

    width: 36px;
    height: 36px;

    display: grid;
    place-items: center;

    border: 1px solid var(--border-strong);
    border-radius: 8px;

    background: rgba(5, 5, 5, 0.92);
    color: var(--gold);
    font-size: 1.1rem;
    cursor: pointer;
}
/* ==================== SEARCH MODAL ==================== */
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.search-modal-content {
  background: #0A0A0A;
  border: 1px solid #D4AF37;
  border-radius: 12px;
  width: 90%;
  max-width: 640px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #333;
}

.search-modal-header h2 {
  color: #D4AF37;
  margin: 0;
  font-size: 1.25rem;
}

.search-close-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.search-input {
  margin: 16px 20px;
  padding: 12px 16px;
  background: #111;
  border: 1px solid #444;
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  outline: none;
}

.search-input:focus {
  border-color: #D4AF37;
}

.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 16px;
}

.search-result-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.search-result-item:hover {
  background: #1a1a1a;
}

.search-result-thumb {
  width: 80px;
  height: 50px;
  background: #222;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-info h4 {
  margin: 0 0 4px;
  color: #D4AF37;
  font-size: 0.95rem;
}

.search-result-info p {
  margin: 0;
  color: #aaa;
  font-size: 0.8rem;
}
/* ==================== COMMENT REPLIES ==================== */

.comment-replies {
    margin-top: 16px;
    padding-left: 28px;
    border-left: 1px solid rgba(212, 175, 55, 0.35);
}

.comment-reply-item {
    margin-top: 14px;
}

.inline-reply-box {
    margin-top: 14px;
}

.reply-input {
    width: 100%;
    min-height: 90px;
    padding: 14px;
    resize: vertical;
    box-sizing: border-box;

    background: #090909;
    color: #ffffff;

    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 12px;
}

.reply-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.post-reply-btn,
.cancel-reply-btn {
    padding: 10px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
}

.post-reply-btn {
    background: #d4af37;
    color: #000000;
    border: 1px solid #d4af37;
}

.cancel-reply-btn {
    background: transparent;
    color: #d4af37;
    border: 1px solid rgba(212, 175, 55, 0.45);
}

/* =========================================================
   COMMENT THREAD POLISH
   Keeps replies compact, readable, and visually connected
   ========================================================= */

/* Main reply thread rail */
.comment-replies {
    margin-top: 14px;
    margin-left: 6px;
    padding-left: 18px;

    border-left: 1px solid rgba(212, 175, 55, 0.28);
}

/* Nested comment card */
.comment-reply-item {
    margin-top: 12px;
    padding: 18px 20px;

    background:
        linear-gradient(
            135deg,
            rgba(212, 175, 55, 0.035),
            rgba(255, 255, 255, 0.008)
        );

    border: 1px solid rgba(212, 175, 55, 0.20);
    border-radius: 18px;
}

/* Replies should feel slightly lighter than top-level comments */
.comment-reply-item .comment-avatar {
    transform: scale(0.88);
    transform-origin: top left;
}

.comment-reply-item .comment-author strong {
    font-size: 0.95rem;
}

.comment-reply-item .comment-author span {
    font-size: 0.78rem;
    opacity: 0.72;
}

.comment-reply-item .comment-body > p {
    margin-top: 7px;
    margin-bottom: 10px;
    line-height: 1.55;
}

/* Compact action buttons inside threads */
.comment-reply-item .comment-actions {
    gap: 8px;
}

.comment-reply-item .comment-actions button {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 0.78rem;
}

/* Reduce indentation as threads become deeper */
.comment-replies .comment-replies {
    padding-left: 14px;
    margin-left: 2px;
}

.comment-replies
.comment-replies
.comment-replies {
    padding-left: 10px;
}

/* Open reply composer */
.inline-reply-box {
    margin-top: 14px;
    padding: 14px;

    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 14px;
}

/* Reply text field */
.reply-input {
    width: 100%;
    min-height: 82px;
    padding: 13px 15px;

    box-sizing: border-box;
    resize: vertical;

    background: rgba(7, 7, 7, 0.96);
    color: #f4f4f4;

    border: 1px solid rgba(212, 175, 55, 0.38);
    border-radius: 10px;

    font: inherit;
    line-height: 1.5;

    outline: none;
}

.reply-input:focus {
    border-color: rgba(212, 175, 55, 0.85);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.08);
}

.reply-input::placeholder {
    color: rgba(255, 255, 255, 0.42);
}

/* Reply controls */
.reply-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 8px;
    margin-top: 10px;
}

.post-reply-btn,
.cancel-reply-btn {
    min-height: 38px;
    padding: 8px 16px;

    border-radius: 999px;
    cursor: pointer;

    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.post-reply-btn {
    background: #d4af37;
    color: #050505;

    border: 1px solid #d4af37;
}

.cancel-reply-btn {
    background: transparent;
    color: #d4af37;

    border: 1px solid rgba(212, 175, 55, 0.38);
}

/* Desktop hover polish */
@media (hover: hover) and (pointer: fine) {
    .comment-reply-item {
        transition:
            border-color 160ms ease,
            background 160ms ease;
    }

    .comment-reply-item:hover {
        border-color: rgba(212, 175, 55, 0.34);

        background:
            linear-gradient(
                135deg,
                rgba(212, 175, 55, 0.055),
                rgba(255, 255, 255, 0.012)
            );
    }

    .post-reply-btn:hover {
        filter: brightness(1.08);
    }

    .cancel-reply-btn:hover {
        border-color: rgba(212, 175, 55, 0.72);
        background: rgba(212, 175, 55, 0.06);
    }
}

/* Mobile thread protection */
@media (max-width: 700px) {
    .comment-replies {
        padding-left: 10px;
        margin-left: 0;
    }

    .comment-replies .comment-replies,
    .comment-replies
    .comment-replies
    .comment-replies {
        padding-left: 7px;
    }

    .comment-reply-item {
        padding: 14px;
        border-radius: 14px;
    }

    .reply-actions {
        justify-content: flex-start;
    }
}
/* Keep the search modal hidden until explicitly opened */
.search-modal[hidden] {
    display: none !important;
}