.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0);
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
}
.modal {
    background: #1c1c1c;
    border-radius: 12px;
    width: 500px;
    max-width: 90%;
    padding: 16px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    margin-bottom: 12px;
}
.cancel-btn, .options-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.spoiler-alert {
    background: #2a2a2a;
    color: #aaa;
    padding: 8px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}
.composer-modal {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.avatar-modal {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #444;
}
.composer-input {
    flex: 1;
    background: transparent;
    border: none;
    resize: none;
    font-size: 15px;
    color: #fff;
    outline: none;
}
.footer-modal {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.anyone {
    font-size: 13px;
    color: #aaa;
}
.post-btn {
    background: #555;
    color: #888;
    border: none;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 14px;
    cursor: not-allowed;
}
.post-btn.active {
    background: #1da1f2;
    color: white;
    cursor: pointer;
}

/* Image Modal Styles */
.image-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.image-modal {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-modal img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.image-modal-close:hover {
    background: rgba(255,255,255,0.3);
}

/* Make images clickable */
.thread__image img,
.image-preview-container img {
    cursor: pointer;
    transition: opacity 0.2s;
}

.thread__image img:hover,
.image-preview-container img:hover {
    opacity: 0.9;
}