/* ============================================================
   POST CARDS — EDITORIAL DARK REDESIGN
   ============================================================ */

@keyframes postSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

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

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

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

/* ── Base Card ─────────────────────────────────────────────── */
.post {
    display: flex;
    gap: 12px;
    padding: 16px 18px 14px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    margin: 0;
    cursor: pointer;
    transition: background 0.18s ease;
    position: relative;
    overflow: visible;
    animation: postSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-fill-mode: both;
}

.post::before {
    display: none;
}

.post:hover {
    background: rgba(255, 255, 255, 0.025);
}

/* ── Avatar ─────────────────────────────────────────────────── */
.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: #1e2028;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.2s ease, transform 0.25s ease;
    position: relative;
    z-index: 2;
}

.post:hover .post-avatar {
    border-color: rgba(218, 55, 60, 0.5);
    transform: scale(1.04);
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Content wrapper ─────────────────────────────────────────── */
.post-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

/* ── Meta row (author, handle, tags, time) ───────────────────── */
.p-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
    width: 100%;
}

.p-user-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.p-meta-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.p-sub-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.p-tags-wrapper {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.p-author {
    font-size: 0.875rem;
    font-weight: 700;
    color: #e8eaf0;
    letter-spacing: -0.1px;
    transition: color 0.2s;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.p-author:hover {
    color: var(--accent-red);
}

.p-handle {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-mono);
    letter-spacing: -0.2px;
}

/* Tag chips */
.p-topic {
    font-size: 0.64rem;
    font-family: var(--font-ui);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 10px;
    border-radius: 50px;
    line-height: 1.4;
    white-space: nowrap;
    border: 1.5px solid transparent;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.p-topic-more {
    background: rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    cursor: help;
    font-family: var(--font-mono);
}

.p-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    margin-left: auto;
    white-space: nowrap;
    letter-spacing: -0.2px;
    opacity: 0.85;
}

/* Edit / delete buttons */
.action-btn-group {
    display: flex;
    gap: 4px;
}

.post-edit-btn,
.post-delete-btn {
    opacity: 0;
    transition: opacity 0.2s, color 0.2s, background 0.2s, transform 0.2s;
    font-size: 0.72rem !important;
    width: 26px !important;
    height: 26px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.post:hover .post-edit-btn,
.post:hover .post-delete-btn {
    opacity: 1;
}

.post-edit-btn:hover {
    color: var(--accent-red) !important;
    background: rgba(248, 49, 47, 0.1) !important;
}

.post-delete-btn:hover {
    color: #fff !important;
    background: var(--accent-red) !important;
}

/* ── Title ───────────────────────────────────────────────────── */
.p-title {
    font-size: 0.97rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.3px;
    color: #f0f2f8;
    margin-bottom: 5px;
    background: none;
    -webkit-text-fill-color: unset;
    text-shadow: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Body text ───────────────────────────────────────────────── */
.p-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.p-text.expanded {
    display: block;
    -webkit-line-clamp: unset;
}

.post-iceberg-level span {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p-expand-btn {
    background: none;
    border: none;
    color: rgba(248, 49, 47, 0.7);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    font-family: var(--font-mono);
    letter-spacing: 0.3px;
    transition: color 0.2s;
    margin-bottom: 8px;
    display: block;
}

.p-expand-btn:hover {
    color: var(--accent-red);
}

/* ── Media Grid ──────────────────────────────────────────────── */
.p-media-grid {
    display: grid;
    gap: 3px;
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: #0a0a0c;
}

.p-media-grid.grid-1 {
    grid-template-columns: 1fr;
    max-height: 480px;
    /* Cap single images so tall photos don't dominate feed */
}

.p-media-grid.grid-2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 280px;
}

.p-media-grid.grid-3 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 200px;
}

.p-media-grid.grid-3 img:first-child,
.p-media-grid.grid-3 .p-grid-item:first-child {
    grid-row: span 2;
}

.p-media-grid.grid-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 180px 180px;
}

.p-media-grid img,
.p-media-grid .p-grid-item {
    width: 100%;
    height: 100%;
    min-height: 180px;
    max-height: 480px;
    /* Never let a single image stretch too tall */
    object-fit: cover;
    cursor: zoom-in;
    transition: filter 0.25s, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.p-media-grid img:hover {
    filter: brightness(1.12);
    transform: scale(1.02);
}

/* Single media image */
.p-media {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    margin-top: 14px;
    max-height: 480px;
    object-fit: cover;
    display: block;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: zoom-in;
}

.post:hover .p-media {
    filter: brightness(1.06);
}

/* YouTube embed */
.p-yt-embed {
    position: relative;
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: #000;
    aspect-ratio: 16 / 9;
}

.p-yt-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Link card */
.p-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}

.p-link-card:hover {
    border-color: rgba(248, 49, 47, 0.3);
    background: rgba(248, 49, 47, 0.04);
}

.p-link-card-icon {
    font-size: 1.4rem;
    color: var(--accent-red);
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.p-link-card-meta {
    flex: 1;
    min-width: 0;
}

.p-link-card-label {
    font-size: 0.68rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.p-link-card-url {
    font-size: 0.87rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.p-link-card-arrow {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ── Emoji reactions ─────────────────────────────────────────── */
.p-interaction-row {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: transparent;
    border: none;
    padding: 0;
    margin-right: 4px;
    flex-shrink: 0;
    position: relative;
}

.p-emoji-stack {
    display: flex;
    align-items: center;
}

.p-reaction-glyph {
    font-size: 1.1rem;
    margin-left: -8px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
    position: relative;
    z-index: 1;
}

.p-reaction-glyph:first-child {
    margin-left: 0;
}

.p-reaction-glyph:hover {
    transform: translateY(-5px) scale(1.35);
    z-index: 10;
}

.p-reaction-glyph.active {
    filter: drop-shadow(0 0 6px var(--accent-red));
}

.p-add-reaction-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px dashed rgba(255, 255, 255, 0.18);
    background: transparent;
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    transition: all 0.2s;
    cursor: pointer;
}

.p-add-reaction-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background: rgba(248, 49, 47, 0.08);
}

.p-add-reaction-btn.mini {
    width: 18px;
    height: 18px;
    font-size: 0.55rem;
    opacity: 0.5;
}

.p-add-reaction-btn.mini:hover {
    opacity: 1;
}

/* Emoji picker popup */
.emoji-picker-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    left: -4px;
    background: #18191f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    display: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    z-index: 1000;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    animation: fadeInDown 0.18s ease;
}

.emoji-picker-popup.active {
    display: grid;
}

.emoji-option {
    font-size: 1.3rem;
    padding: 6px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s, transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-option:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.25);
}

/* ── Post Actions Bar ─────────────────────────────────────────── */
.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 0;
    border-top: none;
    gap: 6px;
}

.action-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

/* Generic action button */
.action-btn {
    background: transparent;
    border: 1px solid transparent;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: var(--font-ui);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 20px;
    white-space: nowrap;
    cursor: pointer;
    letter-spacing: 0.2px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
}

.action-btn i {
    font-size: 0.95rem;
}

/* Comment / Lousa */
.action-btn.comment:hover {
    color: #93c5fd;
    background: rgba(147, 197, 253, 0.08);
    border-color: rgba(147, 197, 253, 0.15);
}

/* Static views counter */
.action-btn-static {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    font-family: var(--font-mono);
}

/* Icon-only buttons */
.action-btn.icon-only {
    width: 30px;
    height: 30px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.85rem;
}

.action-btn.icon-only:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.action-btn.icon-only.active {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.2);
}

/* Right side: views + bookmark + share (desktop) */
.action-right.desktop-flex {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* ── Voting group ────────────────────────────────────────────── */
.voting-group {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
}

.voting-group:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
}

/* Vertical divider between like/dislike */
.voting-group .vote-btn+.vote-btn {
    border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.vote-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    padding: 5px 10px;
    transition: background 0.18s, color 0.18s;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    line-height: 1;
}

.vote-btn i {
    font-size: 0.9rem;
}

.vote-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
}

.vote-btn.like-btn:hover {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.08);
}

.vote-btn.dislike-btn:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.08);
}

.vote-btn.like-btn.active {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
}

.vote-btn.dislike-btn.active {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

/* ── Reactions legacy badges (kept for compat) ───────────────── */
.p-reaction-badges {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.p-reaction-badge {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 3px 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.p-reaction-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.p-reaction-badge.active {
    background: rgba(248, 49, 47, 0.12);
    border-color: rgba(248, 49, 47, 0.3);
    color: var(--accent-red);
}

.p-reaction-badge b {
    font-size: 0.72rem;
    font-family: var(--font-mono);
}

/* ============================================================
   STANDARD POST VIEW (post.html — YouTube-Style)
   ============================================================ */
.yt-post-container {
    padding: 28px 28px 60px;
    width: 100%;
    animation: postSlideIn 0.35s ease;
}

.yt-post-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    align-items: start;
}

@media (max-width: 1300px) {
    .yt-post-grid {
        grid-template-columns: 1fr 320px;
        gap: 20px;
    }
}

@media (max-width: 1150px) {
    .yt-post-grid {
        grid-template-columns: 1fr;
    }
}

.yt-main-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.yt-related-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 20px;
    width: 100%;
}

.yt-header-bar {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    max-width: 1600px;
    margin-inline: auto;
    height: 36px;
}

.yt-back-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.95rem;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.yt-back-btn:hover {
    color: var(--accent-red);
}

/* Theater (video/image media) */
.yt-media-theater {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #000;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    aspect-ratio: 16/9;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.yt-media-theater iframe,
.yt-media-theater img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.yt-media-gallery {
    width: 100%;
    margin-bottom: 22px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.yt-media-gallery img {
    width: 100%;
    max-height: 700px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: block;
}

/* Mosaic system */
.yt-mosaic {
    display: grid;
    gap: 3px;
    margin-bottom: 22px;
    border-radius: 14px;
    overflow: hidden;
    width: 100%;
    height: 500px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.yt-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: filter 0.2s;
}

.yt-mosaic img:hover {
    filter: brightness(1.1);
}

.yt-mosaic-2 {
    grid-template-columns: 1fr 1fr;
}

.yt-mosaic-3 {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.yt-mosaic-3 img:first-child {
    grid-row: span 2;
}

.yt-mosaic-4 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

/* Post title */
.yt-post-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #f0f2f8;
    margin-bottom: 10px;
    line-height: 1.25;
    letter-spacing: -0.6px;
}

/* Meta row */
.yt-post-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.yt-author-group {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.yt-author-group img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

.yt-author-info {
    display: flex;
    flex-direction: column;
}

.yt-author-info .author-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #e8eaf0;
}

.yt-author-info .author-sub {
    font-size: 0.72rem;
    color: rgb(255 255 255 / 50%);
    font-family: var(--font-mono);
}

.yt-actions-group {
    display: flex;
    gap: 6px;
    align-items: center;
}

.yt-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-ui);
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
}

.yt-action-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.yt-action-btn.active {
    background: rgba(248, 49, 47, 0.12);
    color: #f87171;
    border-color: rgba(248, 49, 47, 0.25);
}

.yt-btn-follow-case.active {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.08);
}

.yt-btn-follow-case.active i {
    animation: bellShake 1s ease;
}

/* Credibility / vibes meter */
.yt-mystery-meter {
    margin-bottom: 22px;
    background: rgba(255, 255, 255, 0.02);
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.meter-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.meter-bar-bg {
    height: 4px;
    width: 100%;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 2px;
    overflow: hidden;
}

.meter-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-red), #ff6b35);
    transition: width 1s ease-out;
}

/* Description box */
.yt-description-box {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    padding: 22px;
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.82);
}

.yt-description-meta {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Related posts sidebar */
.yt-related-header {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.yt-related-card {
    display: flex;
    gap: 10px;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.2s;
    padding: 6px;
    border: 1px solid transparent;
}

.yt-related-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.yt-related-thumb {
    width: 130px;
    height: 75px;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: cover;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.yt-related-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    justify-content: flex-start;
}

.yt-related-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
}

.yt-related-meta {
    font-size: 0.74rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
}

/* ── Comments Section ─────────────────────────────────────────── */
.standard-comments-area {
    margin-top: 24px;
}

#spTheoryTextarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 14px 16px;
    font-family: var(--font-ui);
    resize: vertical;
    min-height: 76px;
    font-size: 0.92rem;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

#spTheoryTextarea:focus {
    border-color: rgba(248, 49, 47, 0.4);
    background: rgba(248, 49, 47, 0.03);
}

/* ── Comments (YouTube-style thread) ─────────────────────────── */
.sp-comment-thread {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
    background: transparent;
    border: none;
}

.sp-comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    cursor: pointer;
}

.sp-comment-thread.is-nested {
    margin-top: 8px;
    margin-bottom: 4px;
    position: relative;
}

.sp-comment-thread.is-nested .sp-comment-avatar {
    width: 24px;
    height: 24px;
    margin-top: 3px;
}

.sp-comment-thread.is-nested::before {
    content: '';
    position: absolute;
    top: -22px;
    bottom: calc(100% - 14px);
    left: -27px;
    width: 18px;
    border-left: 2px solid rgba(255, 255, 255, 0.07);
    border-bottom: 2px solid rgba(255, 255, 255, 0.07);
    border-bottom-left-radius: 10px;
    pointer-events: none;
}

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

.sp-comment-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px;
}

.sp-comment-author {
    font-size: 0.87rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
}

.sp-comment-author:hover {
    text-decoration: underline;
}

.sp-comment-tag {
    font-size: 0.68rem;
    background: rgba(248, 49, 47, 0.12);
    color: #f87171;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.sp-comment-text {
    font-size: 0.9rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 7px;
}

.sp-comment-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
}

.sp-action-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    transition: color 0.2s;
}

.sp-action-btn:hover {
    color: rgba(255, 255, 255, 0.7);
}

.sp-action-btn.active {
    color: var(--accent-red);
}

.sp-nested-thread {
    margin-left: 50px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.p-expand-btn-theory {
    color: rgba(248, 49, 47, 0.65);
    background: none;
    border: none;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    display: block;
}

.p-expand-btn-theory:hover {
    color: var(--accent-red);
    text-decoration: underline;
}

/* Mention link */
.mention-link {
    color: var(--accent-red);
    font-weight: 600;
}

.mention-link:hover {
    background: rgba(248, 49, 47, 0.12);
    border-radius: 3px;
    padding: 0 2px;
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 768px) {
    .post {
        padding: 14px 12px 12px;
        margin: 0 6px 10px;
        border-radius: 12px;
        gap: 10px;
    }

    .post-avatar {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .p-title {
        font-size: 0.93rem;
        letter-spacing: -0.2px;
    }

    .p-text {
        font-size: 0.83rem;
        line-height: 1.55;
    }

    .p-meta {
        gap: 3px;
        margin-bottom: 6px;
    }

    .p-user-row {
        gap: 5px;
    }

    .p-sub-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .p-time {
        margin-left: 0 !important;
        font-size: 0.65rem;
    }

    .p-author {
        font-size: 0.8rem;
    }

    .post-actions {
        padding-top: 8px;
        margin-top: 10px;
        gap: 4px;
    }

    .action-left {
        gap: 4px;
        width: 100%;
        flex-wrap: nowrap;
    }

    .yt-post-container {
        padding: 14px;
    }

    .yt-post-title {
        font-size: 1.2rem;
    }

    .yt-actions-group {
        overflow-x: auto;
        padding-bottom: 8px;
        width: 100%;
        gap: 5px;
    }

    .yt-actions-group::-webkit-scrollbar {
        display: none;
    }

    .yt-action-btn span {
        display: none !important;
    }

    .yt-action-btn {
        padding: 0;
        width: 38px;
        height: 38px;
        justify-content: center;
        border-radius: 50% !important;
        flex-shrink: 0;
    }

    .yt-description-box {
        padding: 14px;
        font-size: 0.92rem;
        border-radius: 10px;
    }

    /* Ultra-compact action buttons on mobile */
    @media (max-width: 480px) {
        .action-btn span {
            display: none !important;
        }

        .action-btn {
            padding: 0;
            width: 32px !important;
            height: 32px !important;
            min-width: 32px !important;
            justify-content: center;
            border-radius: 50% !important;
            flex: none !important;
        }

        .action-left {
            gap: 3px !important;
        }

        .vote-btn {
            padding: 4px 7px;
            font-size: 0.7rem;
            gap: 3px;
        }

        .p-reaction-glyph {
            font-size: 0.95rem;
            margin-left: -7px;
        }

        .p-add-reaction-btn {
            width: 15px;
            height: 15px;
            font-size: 0.48rem;
        }
    }
}

/* ============================================================
   POST FORMAT SELECTOR (COMPOSER)
   ============================================================ */
.post-format-selector {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    scrollbar-width: none;
    /* Firefox */
}

.post-format-selector::-webkit-scrollbar {
    display: none;
    /* Chrome */
}

.format-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: var(--font-ui);
}

.format-btn i {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s;
}

.format-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    transform: translateY(-1px);
}

.format-btn.active {
    background: linear-gradient(135deg, rgba(218, 55, 60, 0.15), rgba(218, 55, 60, 0.05));
    border-color: rgba(218, 55, 60, 0.3);
    color: var(--accent-red);
    box-shadow: 0 4px 12px rgba(218, 55, 60, 0.1);
}

.format-btn.active i {
    color: var(--accent-red);
}

.compose-dynamic-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

/* Dynamic Input Types */
.dynamic-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 4px 4px 4px 14px;
}

.dynamic-input-row i {
    color: var(--accent-red);
    font-size: 0.9rem;
}

.dynamic-input-row input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    outline: none;
    padding: 8px 0;
}

.dynamic-input-row input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Iceberg / Tier List Array Builders */
.array-builder-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.array-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.array-item-row input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px 12px;
    color: #fff;
    font-size: 0.85rem;
    font-family: var(--font-ui);
}

.array-item-row input:focus {
    border-color: var(--accent-red);
    outline: none;
}

.btn-add-array-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 4px;
    transition: 0.2s;
    text-align: center;
}

.btn-add-array-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn-remove-array-item {
    background: transparent;
    border: none;
    color: #f87171;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    opacity: 0.5;
    transition: 0.2s;
}

.btn-remove-array-item:hover {
    opacity: 1;
}

/* Preview btn */
.compose-preview-btn {
    padding: 10px 16px;
    font-size: 0.85rem;
    gap: 6px;
}

/* ============================================================
   FORMAT SELECTOR — PREMIUM TRIGGER BUTTON
   ============================================================ */
.post-format-selector {
    padding: 12px 16px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.format-selector-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-ui);
}

.format-selector-trigger:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.format-trigger-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.format-selector-trigger:hover .format-trigger-icon {
    transform: scale(1.08);
}

.format-trigger-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-align: left;
}

.format-trigger-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.format-trigger-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.format-trigger-arrow {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

/* ============================================================
   FORMAT MODAL
   ============================================================ */
.format-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    backdrop-filter: blur(4px);
    transition: opacity 0.2s ease;
    padding: 20px;
}

.format-modal-overlay.visible {
    opacity: 1;
}

.format-modal {
    background: #14161a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 24px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    animation: formatModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes formatModalIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(12px);
    }

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

.format-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

.format-modal-close {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: rgba(255, 255, 255, 0.5);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.format-modal-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.format-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: var(--font-ui);
    width: 100%;
    text-align: left;
    position: relative;
}

.format-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.format-card.active {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.14);
}

.format-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.format-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.format-card-info strong {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.format-card-info span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.format-card-check {
    color: #4ade80;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ============================================================
   COMPOSE — CHAR COUNTER & SPOILER
   ============================================================ */
.compose-char-counter {
    display: flex;
    justify-content: flex-end;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    font-family: var(--font-mono);
    padding: 4px 4px 0;
    transition: color 0.2s;
}

.compose-spoiler-row {
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    margin-top: 2px;
}

.spoiler-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    user-select: none;
}

.spoiler-toggle-label:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.09);
}

.spoiler-toggle-label.active {
    background: rgba(251, 146, 60, 0.08);
    border-color: rgba(251, 146, 60, 0.2);
}

.spoiler-toggle-label input[type="checkbox"] {
    display: none;
}

.spoiler-toggle-switch {
    width: 32px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    flex-shrink: 0;
    position: relative;
    transition: background 0.2s;
}

.spoiler-toggle-switch::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.spoiler-toggle-label.active .spoiler-toggle-switch {
    background: #fb923c;
}

.spoiler-toggle-label.active .spoiler-toggle-switch::after {
    transform: translateX(14px);
}

.spoiler-toggle-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.spoiler-toggle-label.active .spoiler-toggle-text {
    color: #fb923c;
}

/* ============================================================
   DYNAMIC META SECTIONS (improved)
   ============================================================ */
.dynamic-meta-section {
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dynamic-meta-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 7px;
}

.dynamic-meta-label i {
    color: var(--accent-red);
    font-size: 0.8rem;
}

/* ============================================================
   LOST STATUS SELECTOR (radio buttons)
   ============================================================ */
.lost-status-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lost-status-opt {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--font-ui);
    font-weight: 600;
    transition: all 0.18s;
    user-select: none;
}

.lost-status-opt input {
    display: none;
}

.lost-status-opt:hover {
    border-color: var(--opt-color, rgba(255, 255, 255, 0.2));
    color: var(--opt-color, rgba(255, 255, 255, 0.8));
    background: color-mix(in srgb, var(--opt-color, #fff) 10%, transparent);
}

.lost-status-opt.selected {
    border-color: var(--opt-color, #fff);
    color: var(--opt-color, #fff);
    background: color-mix(in srgb, var(--opt-color, #fff) 12%, transparent);
}

/* ============================================================
   POLL BUILDER (compose)
   ============================================================ */
.poll-builder-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.poll-builder-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.poll-builder-letter {
    width: 26px;
    height: 26px;
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.poll-builder-row input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 9px 13px;
    color: #fff;
    font-size: 0.85rem;
    font-family: var(--font-ui);
    outline: none;
    transition: border-color 0.2s;
}

.poll-builder-row input:focus {
    border-color: #8b5cf6;
}

/* ============================================================
   POLL (feed render)
   ============================================================ */
.post-poll-wrapper {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.poll-option {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.poll-option:hover {
    border-color: rgba(139, 92, 246, 0.35);
}

.poll-option.voted {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(139, 92, 246, 0.06);
}

.poll-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(139, 92, 246, 0.12);
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.poll-option-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    width: 100%;
    z-index: 1;
}

.poll-opt-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.poll-opt-pct {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: #8b5cf6;
    font-weight: 700;
}

.poll-footer {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 2px 0;
}

/* ============================================================
   RUMOR BADGE (feed)
   ============================================================ */
.rumor-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid;
    border-radius: 12px;
    margin-top: 10px;
}

/* ============================================================
   ARRAY ITEM NUM & TIER BADGE
   ============================================================ */
.array-item-num {
    color: rgba(255, 255, 255, 0.3);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.tier-badge-letter {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid;
    font-weight: 900;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
    .format-modal-grid {
        gap: 5px;
    }

    .format-card {
        padding: 10px 12px;
        gap: 10px;
    }

    .format-card-icon {
        width: 34px;
        height: 34px;
        font-size: 0.95rem;
    }

    .lost-status-selector {
        gap: 6px;
    }

    .lost-status-opt {
        font-size: 0.74rem;
        padding: 6px 10px;
    }
}

/* ============================================================
   MEDIA UPLOAD MODAL
   ============================================================ */
.media-modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 10px;
}

.media-upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.media-upload-zone:hover {
    border-color: var(--accent-red);
    background: rgba(218, 55, 60, 0.05);
}

.media-upload-zone i {
    font-size: 2.5rem;
    color: var(--text-secondary);
    transition: 0.3s;
}

.media-upload-zone:hover i {
    color: var(--accent-red);
    transform: translateY(-5px);
}

.media-upload-zone span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.media-upload-zone small {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.media-modal-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.media-modal-divider::before,
.media-modal-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.media-modal-divider:not(:empty)::before {
    margin-right: .5em;
}

.media-modal-divider:not(:empty)::after {
    margin-left: .5em;
}

.media-url-input-wrap {
    display: flex;
    gap: 10px;
}

.media-url-input-wrap input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 0.9rem;
}

.media-url-input-wrap input:focus {
    border-color: var(--accent-red);
    outline: none;
}

.media-url-input-wrap button {
    background: var(--bg-hover);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    padding: 0 20px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.media-url-input-wrap button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Spinner */
.media-loading {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px 0;
}

.media-loading.active {
    display: flex;
}

.media-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* ============================================================
   SPOILER WRAPPER (feed)
   ============================================================ */
.spoiler-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.spoiler-content {
    transition: filter 0.3s ease, opacity 0.3s ease;
    filter: blur(14px) grayscale(50%);
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
    padding: 12px;
}

.spoiler-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.spoiler-overlay i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.7);
}

.spoiler-overlay span {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.spoiler-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-ui);
}

.spoiler-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.spoiler-wrapper.revealed .spoiler-content {
    filter: none;
    opacity: 1;
    pointer-events: auto;
    user-select: auto;
}

.spoiler-wrapper.revealed .spoiler-overlay {
    opacity: 0;
    pointer-events: none;
}

/* ============================================================
   DESKTOP FEED REFINEMENTS (769px+)
   ============================================================ */
@media (min-width: 769px) {

    /* Feed list wrapper — clean border on left side */
    #feedArea {
        border-left: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Post: tighter, denser layout like X/Bluesky */
    .post {
        padding: 14px 20px 12px;
        gap: 12px;
    }

    /* Avatar — circular, 42px */
    .post-avatar {
        width: 42px;
        height: 42px;
        border-radius: 50%;
    }

    /* Author meta line tighter */
    .p-meta {
        gap: 2px;
        margin-bottom: 5px;
    }

    /* Author name: slightly smaller, tighter letter-spacing */
    .p-author {
        font-size: 0.85rem;
        font-weight: 700;
    }

    .p-handle {
        font-size: 0.75rem;
    }

    /* Title: refined size */
    .p-title {
        font-size: 0.95rem;
        font-weight: 700;
        margin-bottom: 4px;
    }

    /* Body text: slightly more contrast, 4 lines */
    .p-text {
        font-size: 0.875rem;
        -webkit-line-clamp: 4;
        color: rgba(255, 255, 255, 0.58);
        margin-bottom: 6px;
    }

    /* Images: cap height so they don't take over */
    .p-media-grid.grid-1 {
        max-height: 340px;
    }

    .p-media,
    .p-media-grid img,
    .p-media-grid .p-grid-item {
        max-height: 340px;
    }

    .p-media-grid.grid-2 {
        grid-template-rows: 220px;
    }

    .p-media-grid.grid-3,
    .p-media-grid.grid-4 {
        grid-template-rows: 160px 160px;
    }

    /* Action bar: smaller, more icon-like — like X */
    .post-actions {
        margin-top: 8px;
    }

    .action-btn {
        font-size: 0.75rem;
        padding: 4px 9px;
        gap: 4px;
    }

    .action-btn i {
        font-size: 0.88rem;
    }

    .action-btn.icon-only {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .voting-group {
        border-radius: 16px;
    }

    /* Tags: smaller chips */
    .p-topic {
        font-size: 0.6rem;
        padding: 2px 8px;
    }

    /* Time stamp tighter */
    .p-time {
        font-size: 0.72rem;
    }

    /* Reaction emojis: slightly smaller */
    .p-reaction-glyph {
        font-size: 1rem;
    }
}