/**
 * AIMangaMaker Social Feed Styles
 * Twitter-like feed layout and components
 */

/* ========================================
   Feed Container & Layout
   ======================================== */

.feed-container {
    max-width: 1400px;
    margin: 80px auto 0; /* Add margin-top to clear header */
    padding: 20px;
}

.feed-layout {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1200px) {
    .feed-layout {
        grid-template-columns: 1fr 300px;
    }

    .feed-sidebar-left {
        display: none;
    }
}

@media (max-width: 768px) {
    .feed-layout {
        grid-template-columns: 1fr;
    }

    .feed-sidebar-right {
        display: none;
    }

    .feed-container {
        padding: 12px;
        margin-top: 0; /* Remove top margin on mobile (header is now footer) */
    }

    .create-post-card {
        display: none; /* Hide on mobile, use FAB instead */
    }
}

/* ========================================
   Feed Main Area
   ======================================== */

.feed-main {
    min-height: 100vh;
}

/* ========================================
   Create Post Card
   ======================================== */

.create-post-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.create-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.create-post-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.btn-create-post {
    flex: 1;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    text-align: left;
    cursor: pointer;
    color: #999;
    font-size: 15px;
    transition: all 0.2s;
}

.btn-create-post:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    color: #e5e5e5;
}

/* ========================================
   Feed Tabs
   ======================================== */

.feed-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 12px;
    gap: 6px;
}

.feed-tab {
    flex: 1;
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #999;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.feed-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #e5e5e5;
}

.feed-tab.active {
    background: var(--primary-color, #e50914);
    color: white;
}

/* ========================================
   Post Cards
   ======================================== */

.post-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.post-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Post Header */
.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
}

.post-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.post-meta {
    flex: 1;
}

.post-username {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color, #fff);
    text-decoration: none;
    display: block;
    margin-bottom: 2px;
}

.post-username:hover {
    color: var(--primary-color, #e50914);
}

.post-timestamp {
    color: #999;
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s;
}

.post-timestamp:hover {
    color: var(--text-color, #e5e5e5);
    text-decoration: underline;
}

.post-actions-menu {
    margin-left: auto;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: var(--text-muted, #666);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--gray-100, #f5f5f5);
    color: var(--danger-color, #dc3545);
}

/* Post Content */
.post-content {
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: 16px;
    color: var(--text-color, #333);
    word-wrap: break-word;
}

.post-content .mention,
.post-content .hashtag {
    color: var(--primary-color, #e50914);
    text-decoration: none;
    font-weight: 500;
}

.post-content .mention:hover,
.post-content .hashtag:hover {
    text-decoration: underline;
}

/* Post Media */
.post-media {
    margin: 16px 0;
    border-radius: 12px;
    overflow: hidden;
}

.post-media.media-grid-single {
    max-height: 500px; 
} 
#post-detail-content > div > div.post-media.media-grid-single {
    max-height: none !important;
    overflow: hidden;
} 
.post-media.media-grid-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.post-media.media-grid-multiple {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform 0.2s;
}

.post-image:hover {
    transform: scale(1.02);
}
#post-detail-content > div > div.post-media.media-grid-single > img:hover {
    transform: none;
}

/* Repost Indicator */
.reposted-indicator {
    color: var(--text-muted, #666);
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.reposted-indicator i {
    color: var(--success-color, #28a745);
}

.original-post {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.2s;
}

.original-post:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.mini-post-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.mini-username {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color, #fff);
}

.mini-timestamp {
    color: #999;
    font-size: 12px;
    margin-left: auto;
}

.mini-post-content {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
    color: var(--text-color, #e5e5e5);
}

.mini-post-media img {
    width: 100%;
    border-radius: 8px;
}

/* Post Stats */
.post-stats {
    display: flex;
    gap: 16px;
    padding: 3px 0;
    color: var(--text-muted, #666);
    font-size: 14px;
}

.stat-comments {
    margin-left: auto;
}

/* Post Actions */
.post-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
}

.btn-action {
    flex: 1;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-muted, #666);
    transition: all 0.2s;
    font-weight: 500;
}

.btn-action:hover {
    background: var(--gray-100, #f5f5f5);
    color: var(--text-color, #333);
}

.btn-action.active {
    color: var(--primary-color, #e50914);
}

.btn-action i {
    font-size: 18px;
}

/* Loading & Error States */
.loading-posts,
.no-posts,
.feed-error {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted, #666);
}

.loading-posts i,
.no-posts i,
.feed-error i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.feed-load-more,
.feed-end-message {
    text-align: center;
    padding: 20px;
}

/* ========================================
   Sidebars
   ======================================== */

.feed-sidebar {
    position: sticky;
    top: 80px;
}

.sidebar-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.sidebar-card h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color, #fff);
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-stats-card .user-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 0;
}

.stat-item {
    text-align: center;
    padding: 8px 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    transition: background 0.2s;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color, #e50914);
}

.stat-label {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* Trending Hashtags */
.trending-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-item:hover {
    background: rgba(255, 255, 255, 0.03);
    margin: 0 -16px;
    padding: 8px 16px;
}

.trending-hashtag {
    display: block;
    color: var(--primary-color, #e50914);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    margin-bottom: 2px;
}

.trending-hashtag:hover {
    text-decoration: underline;
}

.trending-count {
    font-size: 12px;
    color: #999;
}

/* Suggested Users */
.suggested-user {
    display: flex;
    align-items: center;
    padding: 8px 0;
    gap: 10px;
    transition: background 0.2s;
}

.suggested-user:hover {
    background: rgba(255, 255, 255, 0.03);
    margin: 0 -16px;
    padding: 8px 16px;
}

.suggested-user .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.suggested-user-info {
    flex: 1;
    min-width: 0;
}

.suggested-user-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, #fff);
    text-decoration: none;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggested-user-name:hover {
    color: var(--primary-color, #e50914);
}

.suggested-user-username {
    font-size: 12px;
    color: #999;
}

.suggested-user .btn-follow {
    padding: 4px 12px;
    font-size: 12px;
    background: var(--primary-color, #e50914);
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.suggested-user .btn-follow:hover {
    background: var(--primary-hover, #b8070f);
    transform: scale(1.05);
}

.loading {
    text-align: center;
    padding: 16px;
    color: #999;
    font-size: 14px;
}

/* ========================================
   Create Post Modal
   ======================================== */

/* Base Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal[style*="display: block"],
.modal.show {
    display: flex !important;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg, #222);
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: var(--dark-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color, #fff);
}

.modal-close {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

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

.modal-body {
    padding: 16px;
    padding-bottom: 5px;
}

.post-creator-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-creator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.post-creator-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color, #fff);
}

.modal-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer .btn-block {
    width: 100%;
    justify-content: center;
}

.create-post-modal {
    max-width: 520px;
}

.form-group {
    margin-bottom: 16px;
    position: relative;
}

.form-group label {
    display: block;
    color: var(--text-color, #e5e5e5);
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
}

.textarea-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    padding-right: 50px;
    color: var(--text-color, #fff);
    font-size: 15px;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color, #e50914);
    background: rgba(255, 255, 255, 0.15);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.char-counter {
    position: absolute;
    right: 16px;
    bottom: 14px;
    font-size: 12px;
    color: #666;
    pointer-events: none;
    z-index: 1;
}

.char-counter #char-count {
    font-weight: 600;
    color: #888;
}

.file-upload-label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #999;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1;
    vertical-align: middle;
}

.file-upload-label:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e5e5;
}

.file-upload-label i {
    font-size: 20px;
    line-height: 1;
    display: block;
    width: 20px;
    height: 20px;
    text-align: center;
}

.emoji-picker-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #999;
    font-size: 20px;
    padding: 0;
    line-height: 1;
    z-index: 2;
}

.emoji-picker-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e5e5;
}

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

.emoji-picker-popup {
    position: fixed;
    background: var(--card-bg, #222);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 10001;
    max-width: 320px;
    max-height: 240px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.emoji-option {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.media-preview {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.media-preview:not(:empty) {
    display: grid;
}

.media-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    max-width: 100px;
}

.media-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-media {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.remove-media:hover {
    background: var(--danger-color, #dc3545);
}

/* ========================================
   Post Detail Modal
   ======================================== */

.post-detail-modal-content {
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #272727;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.post-detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background: transparent;
}

#post-detail-content {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#post-detail-content .post-card {
    margin-bottom: 0;
    border: none;
    padding: 0;
    background: transparent;
}

#post-detail-content .post-card:hover {
    background: transparent;
}

/* Comments Section */
.comments-section {
    padding: 12px 16px;
}

.comments-header {
    margin-bottom: 12px;
}

.comments-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color, #fff);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.loading-comments {
    text-align: center;
    padding: 16px;
    color: #999;
    font-size: 14px;
}

.no-comments {
    text-align: center;
    padding: 24px 16px;
    color: #999;
    font-size: 14px;
}

.error-message {
    text-align: center;
    padding: 16px;
    color: var(--danger-color, #dc3545);
    font-size: 14px;
}

/* Comment Wrapper */
.comment-wrapper {
    margin-bottom: 8px;
}

/* Comment Item - Facebook Style */
.comment-item {
    display: flex;
    gap: 8px;
    padding: 0;
    margin-bottom: 0;
    background: transparent;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    flex-shrink: 0;
    margin-top: 2px;
}

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

/* Comment Bubble - Only around name and text */
.comment-bubble {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 8px 12px;
    display: inline-block;
    max-width: 100%;
    word-wrap: break-word;
}

.comment-username {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color, #fff);
    text-decoration: none;
    display: block;
    margin-bottom: 2px;
}

.comment-username:hover {
    text-decoration: underline;
}

.comment-text {
    font-size: 14px;
    color: var(--text-color, #e5e5e5);
    line-height: 1.4;
    word-wrap: break-word;
}

/* Comment Meta - Actions and timestamp below bubble */
.comment-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 4px;
    margin-left: 12px;
    font-size: 12px;
}

.comment-timestamp {
    color: #999;
    font-size: 12px;
}

.btn-comment-like,
.btn-comment-reply,
.btn-comment-delete {
    background: transparent;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-comment-like:hover,
.btn-comment-reply:hover {
    color: var(--text-color, #e5e5e5);
    text-decoration: underline;
}

.btn-comment-like.active {
    color: var(--primary-color, #e50914);
}

.btn-comment-like.active:hover {
    color: #ff2a35;
}

.btn-comment-delete:hover {
    color: var(--danger-color, #dc3545);
    text-decoration: underline;
}

.btn-comment-like i {
    font-size: 12px;
}

/* Comment Input Section */
.comment-input-section {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
}

.comment-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    width: 100%;
}

.comment-input-wrapper .comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.comment-input-container {
    flex: 1;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px 50px 8px 14px;
    transition: all 0.2s;
    min-width: 0;
}

.comment-input-container:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

#comment-input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-color, #fff);
    font-size: 14px;
    resize: none;
    outline: none;
    max-height: 120px;
    min-height: 20px;
    overflow-y: auto;
    line-height: 1.4;
}

#comment-input::placeholder {
    color: #999;
}

.comment-input-actions {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 2px;
    align-items: center;
}

.btn-emoji-comment,
.btn-submit-comment {
    background: transparent;
    border: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.btn-emoji-comment:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color, #fff);
}

.btn-submit-comment {
    color: var(--primary-color, #e50914);
}

.btn-submit-comment:hover {
    background: rgba(229, 9, 20, 0.1);
}

.btn-submit-comment:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comment-login-prompt {
    text-align: center;
    padding: 8px;
}

.comment-login-prompt .btn {
    padding: 10px 24px;
}

/* Cursor styling for clickable post stats */
.stat-comments {
    cursor: pointer;
    transition: color 0.2s;
}

.stat-comments:hover {
    color: var(--primary-color, #e50914);
}

/* ========================================
   Nested Comments & Reply Functionality
   ======================================== */

/* View Replies Button */
.btn-view-replies {
    background: transparent;
    border: none;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    margin-top: 4px;
    margin-left: 52px;
    margin-bottom: 4px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-view-replies:hover {
    color: var(--text-color, #e5e5e5);
}

.btn-view-replies i {
    font-size: 10px;
}

/* Nested Comment Container */
.comment-replies {
    margin-left: 40px;
    margin-top: 4px;
    padding-left: 0;
    border-left: none;
}

.comment-reply {
    margin-bottom: 4px;
}

.comment-reply .comment-item {
    margin-bottom: 0;
}

/* Inline Reply Form */
.reply-form-inline {
    margin-top: 4px;
    margin-left: 40px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
}

.reply-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.reply-input-wrapper .comment-avatar {
    width: 28px;
    height: 28px;
}

.reply-input-container {
    flex: 1;
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 6px 40px 6px 12px;
    transition: all 0.2s;
    min-width: 0;
}

.reply-input-container:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.reply-input-container textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-color, #fff);
    font-size: 13px;
    resize: none;
    outline: none;
    max-height: 100px;
    overflow-y: auto;
    line-height: 1.4;
}

.reply-input-container textarea::placeholder {
    color: #999;
}

.reply-input-actions {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 2px;
    align-items: center;
}

.btn-emoji-reply,
.btn-submit-reply,
.btn-cancel-reply {
    background: transparent;
    border: none;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.btn-emoji-reply:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color, #fff);
}

.btn-submit-reply {
    color: var(--primary-color, #e50914);
}

.btn-submit-reply:hover {
    background: rgba(229, 9, 20, 0.1);
}

.btn-cancel-reply:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color, #fff);
}

.btn-submit-reply:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading state for replies */
.loading-replies {
    text-align: center;
    padding: 8px;
    color: #999;
    font-size: 12px;
    margin-left: 40px;
}

/* ========================================
   Animations
   ======================================== */

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeIn 0.3s ease;
}

/* ========================================
   Responsive Tweaks
   ======================================== */

@media (max-width: 576px) {
    .post-actions {
        flex-wrap: wrap;
    }

    .btn-action span {
        display: none;
    }

    .btn-action {
        flex: 0 0 auto;
        padding: 10px;
    }

    .post-stats {
        font-size: 12px;
        gap: 12px;
    }

    .modal-content {
        max-width: 95%;
        max-height: 95vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }

    .modal-header h3 {
        font-size: 1.2rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* ========================================
   Login Required Message
   ======================================== */

.login-required-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 40px 20px;
}

.login-prompt {
    text-align: center;
    max-width: 400px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.login-prompt i.fa-lock {
    font-size: 64px;
    color: #e50914;
    margin-bottom: 20px;
    opacity: 0.8;
}

.login-prompt h3 {
    font-size: 1.8rem;
    margin: 0 0 12px;
    color: #fff;
    font-weight: 600;
}

.login-prompt p {
    font-size: 1rem;
    color: #aaa;
    margin: 0 0 30px;
    line-height: 1.5;
}

.login-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.login-actions .btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.login-actions .btn-primary {
    background: #e50914;
    color: #fff;
    border: none;
}

.login-actions .btn-primary:hover {
    background: #f40612;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
}

.login-actions .btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.login-actions .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .login-prompt {
        padding: 30px 20px;
    }

    .login-prompt i.fa-lock {
        font-size: 48px;
    }

    .login-prompt h3 {
        font-size: 1.4rem;
    }

    .login-actions {
        flex-direction: column;
        width: 100%;
    }

    .login-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   Mobile Floating Action Button (FAB)
   ======================================== */

.mobile-fab-btn {
    display: none; /* Hidden on desktop */
    position: fixed;
    bottom: 48px; /* Slightly overlapping with footer nav (70px + 10px overlap) */
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #e50914 0%, #b00710 100%);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4),
                0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-fab-btn:hover {
    background: linear-gradient(135deg, #ff1a24 0%, #c00813 100%);
    box-shadow: 0 6px 16px rgba(229, 9, 20, 0.5),
                0 4px 8px rgba(0, 0, 0, 0.4);
    transform: translateX(-50%) scale(1.05);
}

.mobile-fab-btn:active {
    transform: translateX(-50%) scale(0.95);
}

.mobile-fab-btn i {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Show FAB only on mobile */
@media (max-width: 768px) {
    .mobile-fab-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}
