.like-btn,
.dislike-btn {
    width: auto !important;
    min-height: 34px;
    padding: 6px 14px;
    border: none;
    border-radius: 18px;
    background: transparent;
    color: white;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.like-btn:hover,
.dislike-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.like-btn.liked,
.dislike-btn.disliked {
    background: #007bff;
    color: white;
}

.view-count {
    color: #a8a9ab;
    font-size: 0.9rem;
}

.verified-name {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: white;
}

.post {
    width: 80%;
    margin: 0 auto 20px;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(73, 96, 125, 1);
    background: rgba(36, 49, 65, 1);
    color: white;
    text-align: left;
    box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-sizing: border-box;
}

.post:hover {
    box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.1);
}

.post strong {
    margin: 0;
    font-size: 1.05rem;
    color: white;
}

.post-img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 420px;
    display: block;
    margin: 10px auto 0;
    border-radius: 8px;
    object-fit: cover;
}

.post-text {
    margin-top: 10px;
    color: white;
    line-height: 1.55rem;
    word-break: break-word;
}

.post-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.author-info-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.author-info-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.post-footer--with-reactions {
    gap: 10px;
}

.post-meta-row {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.post-channel-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0, 123, 255, 0.18);
    color: #d8e3ff;
    font-size: 0.8rem;
}

#feed-header {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

#feed-header h2 {
    color: white;
}

#feed-header button {
    width: auto;
}

#feed-loader {
    text-align: center;
    padding: 20px;
    font-size: 1.1rem;
    color: #cfcfcf;
}

#feed-loader.hidden {
    display: none;
}

#posts-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.post-extra-reactions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    max-width: 100%;
}

.post-extra-reactions__list {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.post-reaction-chip,
.post-reaction-add-btn {
    width: auto !important;
    min-height: 32px;
    border: none;
    border-radius: 18px;
    background: transparent;
    color: white;
    cursor: pointer;
}

.post-reaction-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
}

.post-reaction-chip:hover,
.post-reaction-add-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.post-reaction-chip.is-active {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 18px;
    background: #007bff;
    color: white;
}

.post-reaction-add-btn {
    min-width: 32px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.08);
}

.post-reaction-menu {
    min-width: 220px;
    padding: 10px;
    gap: 10px;
}

.post-reaction-menu__title {
    padding: 4px 0 0 4px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
}

.post-reaction-menu__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.post-reaction-menu__actions button {
    width: auto;
    min-width: 42px;
    min-height: 42px;
    padding: 2px;
    border-radius: 12px;
    font-size: 22px;
    text-align: center;
}

#comment-modal {
    position: fixed;
    inset: 0;
    left: 50%;
    width: 100vw;
    z-index: 1000002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(6, 10, 18, 0.72);
    transform: translateX(-50%);
    box-sizing: border-box;
}

#comment-modal.hidden {
    display: none !important;
}

#comment-modal.is-opening .modal-content {
    animation: comment-modal-slide-up 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

#comment-modal.is-closing {
    pointer-events: none;
}

#comment-modal.is-closing .modal-content {
    animation: comment-modal-slide-down 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#comment-modal .modal-content {
    width: min(760px, calc(100vw - 24px));
    max-height: min(94vh, 980px);
    display: flex;
    flex-direction: column;
    padding: 16px;
    border-radius: 18px;
    background: #16192b;
    border: 1px solid rgba(73, 96, 125, 1);
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    left: auto;
    right: auto;
}

@keyframes comment-modal-slide-up {
    from {
        transform: translateY(90px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes comment-modal-slide-down {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(90px);
        opacity: 0;
    }
}

.modal-content {
    background: #16192b;
}

#comment-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

#comment-modal .modal-header h3 {
    margin: 0;
    color: white;
}

#comment-modal .modal-header .close-btn {
    width: auto;
    background: none;
    border: none;
    color: white;
    font-size: 34px;
    cursor: pointer;
}

#comments-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.comment-item.highlight {
    animation: comment-highlight 1.2s ease;
}

@keyframes comment-highlight {
    0% {
        transform: scale(1);
        background: rgba(0, 123, 255, 0);
    }
    30% {
        transform: scale(1.01);
        background: rgba(0, 123, 255, 0.12);
    }
    100% {
        transform: scale(1);
        background: rgba(0, 123, 255, 0);
    }
}

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

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

.comment-name {
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.comment-message {
    margin-top: 6px;
    color: white;
    line-height: 1.5rem;
    word-break: break-word;
}

.reply-preview {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 0;
    border: none;
    background: transparent;
    color: #c3c3c3;
    font-size: 0.96rem;
    cursor: pointer;
    text-align: left;
}

.comment-image {
    width: 100%;
    max-width: 360px;
    max-height: 320px;
    object-fit: cover;
    display: block;
    margin-top: 10px;
    border-radius: 10px;
}

.comment-sticker,
.comment-sticker-video {
    width: min(220px, 100%);
    max-width: 220px;
    display: block;
    margin-top: 10px;
    background: transparent;
    cursor: pointer;
}

.comment-file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: #bdddff;
    text-decoration: none;
}

.comment-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.reply-comment-btn {
    width: auto !important;
    padding: 0;
    border: none;
    background: none;
    color: #bdddff;
    cursor: pointer;
    font-size: 1rem;
}

.comment-reactions-block {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.comment-reactions-list {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.comment-reaction-pill,
.comment-reaction-add-btn,
.comment-reaction-picker__btn {
    width: auto !important;
    min-height: 32px;
    padding: 4px 10px;
    border-radius: 18px;
    border: 1px solid rgba(73, 96, 125, 1);
    background: rgba(31, 38, 53, 1);
    color: white;
    cursor: pointer;
}

.comment-reaction-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.comment-reaction-pill.is-active {
    background: rgba(0, 123, 255, 0.22);
    border-color: rgba(0, 123, 255, 0.65);
}

.comment-reaction-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}

.comment-reaction-picker.hidden {
    display: none;
}

.reply-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #1f2635;
    color: white;
}

.reply-bar.hidden {
    display: none;
}

.comment-file-preview {
    margin-bottom: 10px;
}

.comment-file-preview.hidden {
    display: none;
}

.comment-file-preview__inner {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(73, 96, 125, 1);
}

.comment-file-preview__inner img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    display: block;
}

.comment-file-preview__remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    cursor: pointer;
}

.comment-compose-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

#comment-modal .comment-chat-footer {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    background: transparent;
}

#comment-modal .chat-footer-low.comment-compose-row {
    gap: 8px;
    width: 100%;
}

#comment-modal .comment-compose-row .msg-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    max-height: 140px;
    padding: 12px 14px;
    border-radius: 12px;
    resize: none;
}

#comment-modal .comment-compose-row .attach,
#comment-modal .comment-compose-row .send {
    flex: 0 0 auto;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 4px;
    border: none;
    border-radius: 12px;
}

#comment-modal .comment-compose-row .attach img,
#comment-modal .comment-compose-row .send img {
    width: 30px;
    height: 30px;
}

.comment-attach-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #313957;
    border: 1px solid rgba(73, 96, 125, 1);
    flex-shrink: 0;
}

.comment-attach-btn img {
    width: 24px;
    height: 24px;
}

#new-comment {
    flex: 1;
    min-height: 44px;
    height: 44px;
    max-height: 180px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(73, 96, 125, 1);
    background: #313957;
    color: white;
    resize: none;
    box-sizing: border-box;
}

.send-btn {
    margin-top: 10px;
    border-radius: 12px;
    background: #2e3251;
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
}

@media (max-width: 1000px) and (orientation: portrait) {
    .post {
        width: 94%;
        margin: 0 auto 12px;
        padding: 10px;
        border-radius: 15px;
    }

    .post strong {
        font-size: 1rem;
    }

    .post-img {
        max-height: 1200px;
    }

    .post-text {
        font-size: 1rem;
        line-height: 1.45rem;
    }

    .post-footer {
        gap: 6px;
    }

    .like-btn,
    .dislike-btn {
        font-size: 0.78rem;
        padding: 8px 10px;
    }

    .view-count {
        font-size: 0.78rem;
    }

    #comment-modal {
        width: 100dvw;
        padding: 10px;
        align-items: center;
        justify-content: center;
    }

    #comment-modal .modal-content {
        width: calc(100vw - 20px);
        max-height: 88vh;
        max-width: calc(100vw - 20px);
        border-radius: 20px;
        border: 1px solid rgba(73, 96, 125, 1);
        padding: 12px;
        margin: 0 auto;
        align-self: center;
        box-sizing: border-box;
    }

    #comment-modal .modal-header .close-btn {
        font-size: 40px;
    }

    #comment-modal .modal-header h3 {
        font-size: 1.5rem;
    }

    .comment-avatar {
        width: 40px;
        height: 40px;
    }

    .comment-message,
    .reply-preview,
    .reply-comment-btn {
        font-size: 0.98rem;
    }

    .comment-image {
        max-width: 100%;
        max-height: 320px;
    }

    .comment-sticker,
    .comment-sticker-video {
        width: min(160px, 100%);
        max-width: 160px;
    }

    .post-reaction-chip,
    .post-reaction-add-btn {
        background: transparent !important;
        border: none !important;
    }

    .post-reaction-chip.is-active {
        background: #007bff !important;
    }
}
