/* Forum specific styling */
.forum-container {
    max-width: 800px;
    margin: 2rem auto 5rem auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

.forum-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.forum-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 0.5rem;
    color: #fff;
}

.forum-header p {
    color: rgba(255,255,255,0.4);
    font-size: 0.95rem;
}

/* Message Composer */
.composer-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.composer-card:focus-within {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.composer-textarea {
    width: 100%;
    min-height: 100px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.composer-textarea:focus {
    border-color: rgba(255, 255, 255, 0.2);
}

.composer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.composer-options {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.anon-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    user-select: none;
}

.anon-toggle input {
    cursor: pointer;
}

.submit-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 0.6rem 1.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.submit-btn:hover:not(:disabled) {
    background: #e8e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,255,255,0.1);
}

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

.cooldown-timer {
    font-size: 0.8rem;
    color: #ff6b6b;
    font-weight: 600;
}

/* Messages Feed */
.messages-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    position: relative;
    animation: fadeInMsg 0.4s ease-out forwards;
}

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

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.6rem;
}

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

.message-author {
    font-weight: 700;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.message-author.admin {
    color: #ffcc00;
    display: flex;
    align-items: center;
    gap: 4px;
}

.message-author.admin::after {
    content: 'ADMIN';
    font-size: 0.6rem;
    background: rgba(255, 204, 0, 0.15);
    color: #ffcc00;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.message-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 0.15rem;
}

.message-content {
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    white-space: pre-wrap;
    word-break: break-word;
}

.message-actions {
    display: flex;
    gap: 0.5rem;
}

.delete-msg-btn {
    background: transparent;
    border: none;
    color: rgba(255, 107, 107, 0.4);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: none; /* Initially hidden, shown via JS for Admin */
}

.delete-msg-btn:hover {
    color: rgba(255, 107, 107, 1);
    background: rgba(255, 107, 107, 0.1);
}

.empty-feed {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255,255,255,0.3);
    font-style: italic;
}

/* Vote Widget Styles */
.message-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.voting-group {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.15);
    padding: 3px 6px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.vote-btn {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 4px 8px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.vote-btn:hover:not(:disabled) {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.05);
}

.vote-btn:disabled {
    cursor: default;
    opacity: 0.7;
}

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

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

.vote-btn svg {
    pointer-events: none;
}

/* Sort Controls CSS */
.feed-header-wrapper {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1rem;
}

.sort-controls {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 8px;
}

.sort-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sort-tab:hover:not(.active) {
    color: rgba(255, 255, 255, 0.85);
}

.sort-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ========================================================
   💎 PREMIUM STYLING FOR BUG BOARD & MEDIA ATTACHMENTS
   ======================================================== */

/* Attachments Selection Bar */
.composer-attachments-bar {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.attach-media-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.attach-media-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-1px);
}

/* Attachment Previews Grid */
.attachments-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.75rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.preview-item .video-icon {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(255, 107, 107, 0.95);
    color: white;
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    z-index: 10;
}

.preview-item .remove-btn:hover {
    transform: scale(1.15);
    background: #ff5252;
}

/* Glowing Bug Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    margin-left: 0.75rem;
    vertical-align: middle;
}

.status-badge.unresolved {
    background: rgba(255, 75, 75, 0.12);
    color: #ff5252;
    border: 1px solid rgba(255, 75, 75, 0.25);
    box-shadow: 0 0 10px rgba(255, 75, 75, 0.15);
}

.status-badge.resolved {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.25);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.15);
}

.status-badge.admin-toggle {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.status-badge.admin-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.15);
}

/* Media Gallery Grids on Message Card */
.message-photos-grid {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.85rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
}

.message-photos-grid.count-1 { grid-template-columns: 1fr; }
.message-photos-grid.count-2 { grid-template-columns: 1fr 1fr; }
.message-photos-grid.count-3 { grid-template-columns: repeat(3, 1fr); }
.message-photos-grid.count-4 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.message-photos-grid.count-5 { grid-template-columns: repeat(6, 1fr); }
.message-photos-grid.count-5 .photo-thumbnail:nth-child(1),
.message-photos-grid.count-5 .photo-thumbnail:nth-child(2) { grid-column: span 3; }
.message-photos-grid.count-5 .photo-thumbnail:nth-child(3),
.message-photos-grid.count-5 .photo-thumbnail:nth-child(4),
.message-photos-grid.count-5 .photo-thumbnail:nth-child(5) { grid-column: span 2; }

.photo-thumbnail {
    position: relative;
    aspect-ratio: 16/10;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    cursor: zoom-in;
    border: 1px solid rgba(255,255,255,0.03);
}

.photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-thumbnail:hover img {
    transform: scale(1.04);
}

/* Videos List on Message Card */
.message-videos-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.85rem;
    margin-bottom: 0.5rem;
}

.video-container {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Elegant Admin Replies Section */
.admin-reply-box {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(255, 204, 0, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-left: 3px solid #ffcc00;
    border-radius: 4px 12px 12px 4px;
    position: relative;
    border-top: 1px solid rgba(255, 204, 0, 0.04);
    border-right: 1px solid rgba(255, 204, 0, 0.03);
    border-bottom: 1px solid rgba(255, 204, 0, 0.03);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.01);
}

.admin-reply-box.empty-admin-reply {
    background: transparent;
    border-left: 2px dashed rgba(255, 204, 0, 0.2);
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    border-top: 1px dashed rgba(255, 204, 0, 0.1);
    border-right: 1px dashed rgba(255, 204, 0, 0.1);
    border-bottom: 1px dashed rgba(255, 204, 0, 0.1);
}

.admin-reply-box .reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
}

.admin-reply-box .admin-name {
    font-size: 0.78rem;
    font-weight: 800;
    color: #ffcc00;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-reply-box .reply-content {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.45;
    font-style: italic;
    white-space: pre-wrap;
    word-break: break-word;
}

.edit-reply-btn,
.add-reply-btn {
    background: rgba(255, 204, 0, 0.08);
    border: 1px solid rgba(255, 204, 0, 0.2);
    color: #ffcc00;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 4px;
    padding: 3px 8px;
    transition: all 0.2s;
}

.edit-reply-btn:hover,
.add-reply-btn:hover {
    background: rgba(255, 204, 0, 0.18);
    border-color: rgba(255, 204, 0, 0.4);
    transform: translateY(-1px);
}

/* Inline Admin Reply Editor */
.reply-editor-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.admin-reply-textarea {
    width: 100%;
    min-height: 75px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 204, 0, 0.3);
    border-radius: 6px;
    padding: 0.6rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.admin-reply-textarea:focus {
    border-color: #ffcc00;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.2);
}

.editor-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.save-reply-btn {
    background: #ffcc00;
    color: #000;
    border: none;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.save-reply-btn:hover {
    background: #e6b800;
}

.cancel-reply-btn {
    background: rgba(255,255,255,0.06);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.cancel-reply-btn:hover {
    background: rgba(255,255,255,0.12);
}

/* Lightbox Modal (Blury Zoom Effect) */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 10, 0.85);
    backdrop-filter: blur(12px) saturate(1.8);
    -webkit-backdrop-filter: blur(12px) saturate(1.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 2px rgba(255,255,255,0.1);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox-overlay.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 2.2rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

.lightbox-close:hover {
    color: #fff;
    transform: scale(1.1);
}

