/**
 * Main Feed Styles - Merged & Complete
 * Text areas use dark theme backgrounds
 */

/* === MAIN FEED CONTAINER === */
.feed-container {
    width: 100%;
}

/* === MAIN POST INPUT FORM === */
.main-post-input {
    background: linear-gradient(135deg, #1a2a3a 0%, #0d1a26 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.main-post-input h4 {
    margin: 0 0 12px 0;
    color: #A8D8FA;
    font-size: 1.1em;
}

/* === MAIN DESCRIPTION TEXTAREA === */
.main-inputbx {
    width: 100%;
    height: 80px;
    margin: 3px auto 1px auto;
    padding: 10px 12px;
    background-color: #25323f;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1em;
    color: #ffffff;
    text-align: left;
    border: 1px solid #365270;
    resize: vertical;
    font-family: inherit;
}

.main-inputbx::placeholder {
    color: #888;
}

.main-counter {
    color: #A8D8FA;
    font-size: 0.9em;
    margin-top: 4px;
    margin-bottom: 8px;
    font-weight: 600;
}

/* === MAIN DRAG & DROP ZONE === */
.main-drag-container {
    margin: 12px 0;
}

#main-drop-zone {
    border: 2px dashed #4a6a8a;
    border-radius: 10px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
}

#main-drop-zone.highlight,
#main-drop-zone:hover {
    border-color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

.main-drop-zone-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #7a9ab8;
    text-align: center;
}

.main-drop-zone-text .icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.main-drop-zone-text p {
    margin: 0;
    font-size: 0.9em;
}

#main-upload-previews {
    margin-top: 12px;
}

.main-preview-item {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
}

.main-preview-item.success {
    border-left: 4px solid #28a745;
}

.main-preview-item.error {
    border-left: 4px solid #dc3545;
}

.main-preview-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.main-preview-name {
    font-size: 0.85em;
    color: var(--fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70%;
}

.main-preview-type {
    font-size: 0.75em;
    color: #A8D8FA;
    text-transform: uppercase;
    background: rgba(168, 216, 250, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.main-progress-bar-container {
    position: relative;
    background: #2a3a4a;
    border-radius: 4px;
    height: 18px;
    overflow: hidden;
}

.main-progress-bar {
    background: linear-gradient(90deg, #22b07d, #28d490);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-progress-text {
    color: white;
    font-weight: bold;
    font-size: 0.75em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.main-upload-status {
    color: #7a9ab8;
    font-size: 0.8em;
    margin-top: 4px;
}

/* === v10: VIDEO THUMBNAIL IN UPLOAD PREVIEW === */
.main-video-thumb-wrap {
    margin: 6px 0 8px;
    border-radius: 6px;
    overflow: hidden;
    background: #1a2a3a;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-video-thumb {
    display: block;
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: 6px;
}

.main-video-thumb-loading,
.main-video-thumb-na {
    font-size: 0.8em;
    color: #7a9ab8;
    padding: 8px 12px;
    display: block;
}

/* === MAIN VIDEO LINK SELECTOR === */
.main-video-link-group {
    position: relative;
    width: 100%;
    z-index: 50;
    margin-top: 12px;
}

.main-video-link-selector {
    background: var(--surface-2);
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 0.95em;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-video-link-selector:hover {
    background: #2d3343;
}

.main-video-link-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    z-index: 150;
    display: none;
}

.main-video-link-dropdown.active {
    display: block;
}

.main-video-link-option {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--fg);
}

.main-video-link-option:hover {
    background: #2d3343;
}

.main-video-link-option.selected {
    background: var(--accent);
    color: white;
}

.main-video-input-container {
    margin-top: 8px;
    display: none;
}

.main-video-input-container.active {
    display: block;
}

.main-video-input-container input {
    width: 100%;
    padding: 10px 12px;
    background: #25323f;
    border: 1px solid #365270;
    border-radius: 6px;
    font-size: 0.95em;
    color: #ffffff;
}

.main-video-input-container small {
    color: #7a9ab8;
    display: block;
    margin-top: 4px;
    font-size: 0.8em;
}

/* === SUBTOPIC SELECTOR STYLES === */
.main-subtopic-selector-group {
    position: relative;
    margin-top: 20px;
    margin-bottom: 16px;
}

.main-subtopic-selector-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: var(--surface-2);
    color: var(--fg);
    padding: 12px 16px;
    border: 1px solid #1a262f;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.main-subtopic-selector-btn:hover {
    background: #2d3343;
}

.main-subtopic-selector-btn.error {
    border-color: #f44336;
    background: #4a2c2c;
}

.main-subtopic-selector-btn.open svg {
    transform: rotate(180deg);
}

.main-subtopic-selector-btn svg {
    transition: transform 0.2s ease;
}

.main-subtopic-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    z-index: 100;
    display: none;
    max-height: 250px;
    overflow-y: auto;
}

.main-subtopic-dropdown.active {
    display: block;
}

.main-subtopic-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.main-subtopic-option:last-child {
    border-bottom: none;
}

.main-subtopic-option:hover {
    background: #2d3343;
}

.main-subtopic-option.selected {
    background: #1a4a6e;
    color: #74b7fa;
    font-weight: 500;
}

.subtopic-check {
    color: #4caf50;
    font-weight: bold;
}

.main-subtopic-option-disabled,
.main-subtopic-option-info {
    padding: 12px 16px;
    color: #999;
    font-style: italic;
    text-align: center;
}

#mainSubtopicLabel {
    font-weight: 500;
}

/* === MAIN POST SUBMIT BUTTON === */
.main-form-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

.btn-main-post {
    flex: 1;
    background: linear-gradient(90deg, #22b07d, #1a8a62);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-main-post:hover {
    background: linear-gradient(90deg, #28c88f, #22a070);
    transform: translateY(-1px);
}

.btn-main-post:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* === MAIN POST CARDS === */
.main-post-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    overflow: visible !important;
}

/* === SHARED ALBUM BANNER STYLES === */
.main-shared-album-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 193, 7, 0.59) 100%);
    border-bottom: 2px solid rgba(0, 255, 0, 0.3);
    border-radius: 12px 12px 0 0;
}

.shared-album-label {
    font-size: 12px;
    color: #999;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.shared-album-link {
    color: #987af5;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
    word-break: break-word;
}

.shared-album-link:hover {
    color: #74b7fa;
    text-decoration: underline;
}

/* === REGION-TO-REGION SHARED POST BANNER === */
.main-shared-region-banner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 193, 7, 0.59) 100%);
    border-bottom: 2px solid rgba(255, 152, 0, 0.4);
    border-radius: 12px 12px 0 0;
}

.shared-region-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shared-region-icon {
    font-size: 16px;
}

.shared-region-label {
    font-size: 12px;
    color: #ff9800;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.shared-region-details {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.shared-region-author-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #74b7fa;
    transition: color 0.2s ease;
}

.shared-region-author-link:hover {
    color: #a8d4ff;
}

.shared-region-author-link:hover .shared-region-author-name {
    text-decoration: underline;
}

.shared-region-portrait {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 152, 0, 0.5);
}

.shared-region-author-name {
    font-weight: 600;
    font-size: 13px;
}

.shared-region-separator {
    color: #666;
    font-size: 10px;
}

.shared-region-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .8em;
    color: #b0b0b0;
}

.shared-region-location .location-icon {
    font-size: 12px;
}

.shared-region-date {
    font-size: 11px;
    color: #888;
    font-style: italic;
}

/* === POST TOP BANNER === */
.main-post-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: linear-gradient(90deg, rgba(39, 132, 255, 0.15), rgba(34, 176, 125, 0.1));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    overflow: visible !important;
}

.main-post-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-category-icon {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.main-category-icon a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.main-category-icon img {
    width: 60px;
    height: 60px;
}

.main-author-portrait {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.main-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.main-author-name {
    font-weight: 600;
    font-size: 0.95em;
    color: var(--fg);
}

.main-author-location {
    font-size: 0.8em;
    color: var(--muted);
}

.main-post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: visible !important;
}

.datetime {
    margin: 3px 0px 0px 6px;
}

.main-post-date {
    font-size: 0.8em;
    line-height: 1.2em;
    color: var(--muted);
}

/* === SHARE BUTTON & DROPDOWN === */
.main-share-wrapper {
    position: relative;
    display: inline-block;
    overflow: visible !important;
}

.btn-main-share {
    background: transparent;
    border: 1px solid var(--border);
    color: #A8D8FA;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-main-share:hover {
    background: rgba(168, 216, 250, 0.1);
    border-color: #A8D8FA;
}

.btn-main-share svg {
    width: 14px;
    height: 14px;
}

.main-share-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 320px;
    max-width: calc(100vw - 40px);
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.08);
    z-index: 99999;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.main-share-dropdown.active {
    display: block;
    animation: shareDropdownSlideIn 0.2s ease-out;
}

@keyframes shareDropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) translateZ(0);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

.main-share-dropdown.position-left {
    right: auto;
    left: 0;
}

.main-share-dropdown.position-above {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 8px;
}

.main-share-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    background: #fff;
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 2;
}

.btn-share-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.btn-share-close:hover {
    color: #333;
    background: #f0f0f0;
}

.main-share-options {
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    overscroll-behavior: contain;
}

.main-share-option {
    display: flex;
    align-items: flex-start;
    padding: 10px 12px;
    margin: 4px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}

.main-share-option:hover {
    background: #f5f5f5;
}

.main-share-option input[type="radio"] {
    margin-right: 12px;
    margin-top: 3px;
    accent-color: #4a90d9;
    flex-shrink: 0;
    cursor: pointer;
}

.share-option-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.share-option-icon {
    font-size: 18px;
    line-height: 1.2;
    flex-shrink: 0;
}

.share-option-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.share-option-title {
    font-weight: 500;
    color: #333;
    font-size: 13px;
    line-height: 1.3;
    word-wrap: break-word;
}

.share-option-desc {
    font-size: 11px;
    color: #666;
    line-height: 1.3;
}

.share-to-region {
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f9ff 100%);
    border: 1px solid #b8daff;
    margin: 4px 0;
}

.share-to-region:hover {
    background: linear-gradient(135deg, #d6ebfa 0%, #e5f5ff 100%);
}

.share-albums-section {
    border-top: 1px solid #eee;
    padding-top: 8px;
    margin-top: 8px;
}

.share-albums-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-albums-icon {
    font-size: 14px;
}

.main-share-note-wrap {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.main-share-note-wrap label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.main-share-note {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    resize: vertical;
    min-height: 50px;
    max-height: 80px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
    background: #fff;
    color: #333;
}

.main-share-note:focus {
    outline: none;
    border-color: #4a90d9;
}

.share-note-counter {
    display: block;
    text-align: right;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.main-share-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #eee;
    background: #fff;
    border-radius: 0 0 12px 12px;
    position: sticky;
    bottom: 0;
}

.btn-share-cancel,
.btn-share-submit {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
}

.btn-share-cancel {
    background: #f5f5f5;
    color: #666;
}

.btn-share-cancel:hover {
    background: #e0e0e0;
}

.btn-share-submit {
    background: #4a90d9;
    color: #fff;
}

.btn-share-submit:hover:not(:disabled) {
    background: #3a7bc8;
}

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

.share-no-albums {
    text-align: center;
    padding: 20px 16px;
}

.share-no-albums p {
    color: #666;
    margin-bottom: 12px;
    font-size: 13px;
}

.btn-browse-albums {
    display: inline-block;
    padding: 8px 16px;
    background: #4a90d9;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    transition: background 0.15s ease;
}

.btn-browse-albums:hover {
    background: #3a7bc8;
}

.share-role-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
}

.share-role-badge.owner {
    background: #4caf50;
    color: #fff;
}

.share-role-badge.admin {
    background: #ff9800;
    color: #fff;
}

/* === POST CONTENT === */
.main-post-content {
    padding: 14px;
}

.main-post-description {
    margin: 0 0 12px 0;
    font-size: 1em;
    line-height: 1.5;
    color: var(--fg);
}

.main-post-media {
    margin-top: 12px;
}

.main-post-media img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    max-height: 400px;
}

.main-post-media audio {
    width: 100%;
    margin-top: 8px;
}

.main-post-media video {
    width: 100%;
    border-radius: 8px;
    max-height: 400px;
}

.main-post-media.embed iframe {
    width: 100%;
    height: 280px;
    border-radius: 8px;
    border: 2px solid rgba(168, 216, 250, 0.3);
}

/* === POST BOTTOM BANNER === */
.main-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-main-report {
    background: transparent;
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #e74c3c;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-main-report:hover {
    background: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
}

.btn-main-report svg {
    width: 12px;
    height: 12px;
}

/* === MAIN RATING === */
.main-rating-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.main-rating-dots {
    display: flex;
    gap: 4px;
}

.main-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #3a4a5a;
    display: inline-block;
    transition: background 0.2s;
}

.main-dot.filled {
    background: linear-gradient(90deg, #22b07d, #28d490);
}

.main-rating-info {
    font-size: 0.8em;
    color: var(--muted);
}

.main-rating-info small {
    margin-right: 6px;
}

.main-rate-action {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-main-rate {
    background: transparent;
    border: 1px solid #22b07d;
    color: #22b07d;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-main-rate:hover {
    background: rgba(34, 176, 125, 0.1);
}

.main-rate-slider {
    display: none;
    align-items: center;
    gap: 8px;
}

.main-rate-slider input[type="range"] {
    width: 100px;
    accent-color: #22b07d;
}

.btn-submit-main-rate {
    background: linear-gradient(90deg, #21f5fc, #216efc);
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8em;
    cursor: pointer;
}

.btn-submit-main-rate:hover {
    background: #1a8a62;
}

/* === REPLY SECTION === */
.main-reply-section {
    display: none;
    padding: 16px;
    background: #033c44;
    border-radius: 0 0 12px 12px;
}

.main-reply-section.active {
    display: block;
}

.btn-main-reply-toggle {
    background: transparent;
    border: 0;
    color: #A8D8FA;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.95em;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    transition: all 0.2s;
    width: 100%;
    margin: 10px 14px;
}

.btn-main-reply-toggle:hover {
    background: rgba(168, 216, 250, 0.1);
    color: #4a90d9;
}

.main-reply-count {
    font-size: 0.95em;
    line-height: 1;
    opacity: 0.9;
    order: 1;
    font-weight: 600;
}

.main-reply-icon {
    width: 20%;
    max-width: 40px;
    height: auto;
    display: inline-block;
    object-fit: contain;
    background: transparent !important;
    border: none;
    order: 2;
}

.main-reply-input-wrap {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.main-reply-user-portrait {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    order: 1;
}

.main-reply-input-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    order: 2;
}

.main-reply-textarea {
    width: 100%;
    height: 80px;
    margin: 0;
    padding: 10px 12px;
    background-color: #25323f;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1em;
    color: #ffffff;
    text-align: left;
    border: 1px solid #365270;
    resize: vertical;
    font-family: inherit;
}

.main-reply-textarea:focus {
    outline: none;
    border-color: #4a90d9;
}

.main-reply-textarea::placeholder {
    color: #888;
}

.main-reply-input-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    margin-top: 8px;
    gap: 8px;
}

.main-reply-char-count {
    font-size: 0.9em;
    color: #A8D8FA;
    font-weight: 600;
    text-align: left;
}

.btn-main-reply-submit,
.btn-main-submit-reply {
    width: 100%;
    background: linear-gradient(90deg, #22b07d, #1a8a62);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-main-reply-submit:hover,
.btn-main-submit-reply:hover {
    background: linear-gradient(90deg, #28c88f, #22a070);
    transform: translateY(-1px);
}

.btn-main-reply-submit:disabled,
.btn-main-submit-reply:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.main-reply-login-prompt {
    text-align: center;
    padding: 16px;
    color: #d00505;
}

.main-reply-login-prompt a {
    color: #4a90d9;
    text-decoration: none;
}

.main-reply-login-prompt a:hover {
    text-decoration: underline;
}

.main-replies-list {
    margin-top: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.main-no-replies {
    text-align: center;
    color: #b0b0b0;
    padding: 16px;
    font-style: italic;
}

.main-reply-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #386f70;
}

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

.main-reply-portrait {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

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

.main-reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.main-reply-author {
    font-weight: 600;
    color: #ffffff;
    font-size: 14px;
}

.main-reply-date {
    font-size: 12px;
    color: #a8a8a8;
}

.main-reply-text {
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 8px;
    word-wrap: break-word;
}

.main-reply-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 8px;
}

.btn-main-reply-like,
.btn-main-reply-dislike,
.btn-main-reply-to-reply {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-main-reply-like:hover {
    background: #f0f0f0;
    color: #4a90d9;
}

.btn-main-reply-dislike:hover {
    background: #f0f0f0;
    color: #4a90d9;
}

.btn-main-reply-to-reply:hover {
    color: #A8D8FA;
    background: rgba(168, 216, 250, 0.1);
}

.btn-main-reply-like.active {
    color: #4caf50;
}

.btn-main-reply-dislike.active {
    color: #f44336;
}

.btn-main-reply-like svg,
.btn-main-reply-dislike svg,
.btn-main-reply-to-reply svg {
    width: 16px;
    height: 16px;
}

.main-like-count,
.main-dislike-count {
    font-weight: 500;
}

/* === MAIN NOTIFICATIONS === */
.main-notification-info {
    background: #2784ff;
    color: #fff;
}

.main-notification.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* === EMPTY STATE === */
.main-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

.main-empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* === RESPONSIVE - MOBILE === */
@media (max-width: 720px) {
    .main-post-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .main-post-meta {
        width: 100%;
        justify-content: space-between;
    }

    .main-post-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .main-rating-wrap {
        flex-wrap: wrap;
    }

    .main-post-media.embed iframe {
        height: 200px;
    }

    .main-reply-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .main-replies-list {
        max-height: 300px;
    }

    .main-reply-user-portrait {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .main-share-dropdown {
        width: calc(100vw - 32px);
        right: -8px;
        max-height: 60vh;
    }

    .main-share-options {
        max-height: 150px;
    }

    .main-share-dropdown-header {
        padding: 10px 14px;
    }

    .main-share-actions {
        padding: 10px 14px;
    }

    .main-share-note-wrap {
        padding: 10px 14px;
    }
}

@media (max-width: 600px) {
    .main-shared-region-banner {
        padding: 10px 12px;
    }

    .shared-region-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .shared-region-separator {
        display: none;
    }

    .shared-region-location,
    .shared-region-date {
        padding-left: 32px;
    }
}

@media (max-width: 480px) {
    .main-share-dropdown {
        width: calc(100vw - 32px);
        right: -8px;
        max-height: 60vh;
    }

    .main-share-options {
        max-height: 150px;
    }

    .main-share-dropdown-header {
        padding: 10px 14px;
    }

    .main-share-actions {
        padding: 10px 14px;
    }

    .main-share-note-wrap {
        padding: 10px 14px;
    }
}


/* ============================================
   UNIFIED REPORT MODAL — Dark Mode
   Covers: Main Post, Ad, and Event report modals
   ============================================ */

/* --- Animations --- */
@keyframes reportModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes reportModalSlideIn {
    from { transform: scale(0.95) translateY(-20px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* --- Event Menu Button (3-dot trigger in event cards) --- */
.event-menu-col {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-right: 8px;
    flex-shrink: 0;
}

.btn-event-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 28px;
    min-height: 32px;
}

.btn-event-menu:hover {
    background: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.3);
}

.event-menu-dot {
    display: block;
    width: 4px;
    height: 4px;
    background: var(--muted, #888);
    border-radius: 50%;
    transition: background 0.2s;
}

.btn-event-menu:hover .event-menu-dot {
    background: #e74c3c;
}

/* === MODAL OVERLAY === */
.main-report-modal,
.ad-report-modal,
.event-report-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: reportModalFadeIn 0.3s ease;
}

.main-report-modal[aria-hidden="true"],
.ad-report-modal[aria-hidden="true"],
.event-report-modal[aria-hidden="true"] {
    display: none !important;
}

.main-report-modal[aria-hidden="false"],
.ad-report-modal[aria-hidden="false"],
.event-report-modal[aria-hidden="false"] {
    display: flex !important;
}

/* --- Backdrop --- */
.main-report-modal-overlay,
.ad-report-modal-overlay,
.event-report-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

/* === MODAL CONTENT BOX === */
.main-report-modal-content,
.ad-report-modal-content,
.event-report-modal-content {
    position: relative;
    z-index: 1;
    background: var(--surface-2, #1e2a3a);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 12px;
    width: 90%;
    max-width: 460px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    animation: reportModalSlideIn 0.3s ease;
}

/* === HEADER === */
.main-report-modal-header,
.ad-report-modal-header,
.event-report-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.12), transparent);
}

.main-report-modal-header h2,
.ad-report-modal-header h2,
.event-report-modal-header h2 {
    margin: 0;
    font-size: 1.15em;
    color: #e74c3c;
    font-weight: 600;
}

/* --- Close Button --- */
.main-report-close,
.ad-report-close,
.event-report-close {
    background: transparent;
    border: none;
    color: var(--muted, #888);
    font-size: 1.6em;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.main-report-close:hover,
.ad-report-close:hover,
.event-report-close:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

/* === FORM === */
.main-report-form,
.ad-report-form,
.event-report-form {
    padding: 20px;
}

.main-report-section,
.ad-report-section,
.event-report-section {
    margin-bottom: 16px;
}

.main-report-section:last-of-type,
.ad-report-section:last-of-type,
.event-report-section:last-of-type {
    margin-bottom: 20px;
}

/* --- Section Label --- */
.main-report-label,
.ad-report-label,
.event-report-label {
    display: block;
    font-size: 0.95em;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 10px;
}

/* === RADIO BUTTON REASONS === */
.main-report-reasons,
.ad-report-reasons,
.event-report-reasons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 350px;
    overflow-y: auto;
    padding: 2px;
}

.main-report-reason,
.ad-report-reason,
.event-report-reason {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #e0e0e0;
}

.main-report-reason:hover,
.ad-report-reason:hover,
.event-report-reason:hover {
    background: rgba(231, 76, 60, 0.06);
    border-color: rgba(231, 76, 60, 0.3);
}

.main-report-reason input[type="radio"],
.ad-report-reason input[type="radio"],
.event-report-reason input[type="radio"] {
    accent-color: #e74c3c;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

/* Selected reason highlight */
.main-report-reason:has(input[type="radio"]:checked),
.ad-report-reason:has(input[type="radio"]:checked),
.event-report-reason:has(input[type="radio"]:checked) {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.5);
}

.main-report-reason input[type="radio"]:checked + .reason-text,
.ad-report-reason input[type="radio"]:checked + .reason-text,
.event-report-reason input[type="radio"]:checked + .reason-text {
    color: #e74c3c;
    font-weight: 500;
}

/* --- Reason Text --- */
.main-report-reason .reason-text,
.ad-report-reason .reason-text,
.event-report-reason .reason-text {
    font-size: 0.95em;
    color: #e0e0e0;
    transition: color 0.2s ease;
    line-height: 1.4;
}

/* === DESCRIPTION / COMMENT SECTION === */
#descriptionSection {
    background: rgba(255, 152, 0, 0.08);
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #ff9800;
}

#descriptionSection.visible {
    display: block !important;
}

/* === TEXTAREA === */
.main-report-textarea,
.ad-report-textarea,
.event-report-textarea {
    width: 100%;
    height: 100px;
    padding: 10px 12px;
    background-color: #2a3847;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    color: #e0e0e0;
    resize: vertical;
    font-family: inherit;
    transition: all 0.2s ease;
}

.main-report-textarea::placeholder,
.ad-report-textarea::placeholder,
.event-report-textarea::placeholder {
    color: #888;
}

.main-report-textarea:focus,
.ad-report-textarea:focus,
.event-report-textarea:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15);
    background-color: #2a3847;
    color: #e0e0e0;
}

/* --- Character Count --- */
.main-report-char-count,
.ad-report-char-count,
.event-report-char-count {
    text-align: right;
    font-size: 0.8em;
    color: #999;
    margin-top: 4px;
}

.main-report-char-count span,
.ad-report-char-count span,
.event-report-char-count span {
    color: #999;
}

/* === ACTION BUTTONS === */
.main-report-actions,
.ad-report-actions,
.event-report-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.15);
    border-radius: 0 0 12px 12px;
}

/* --- Cancel --- */
.main-report-btn-cancel,
.ad-report-btn-cancel,
.event-report-btn-cancel {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border, rgba(255, 255, 255, 0.15));
    color: #e0e0e0;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.2s;
}

.main-report-btn-cancel:hover,
.ad-report-btn-cancel:hover,
.event-report-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
}

.main-report-btn-cancel:active,
.ad-report-btn-cancel:active,
.event-report-btn-cancel:active {
    transform: translateY(1px);
}

/* --- Submit --- */
.main-report-btn-submit,
.ad-report-btn-submit,
.event-report-btn-submit {
    flex: 1;
    background: transparent;
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #e74c3c;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.main-report-btn-submit:hover:not(:disabled),
.ad-report-btn-submit:hover:not(:disabled),
.event-report-btn-submit:hover:not(:disabled) {
    background: rgba(231, 76, 60, 0.1);
    border-color: #e74c3c;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
}

.main-report-btn-submit:active:not(:disabled),
.ad-report-btn-submit:active:not(:disabled),
.event-report-btn-submit:active:not(:disabled) {
    transform: translateY(1px);
}

.main-report-btn-submit:disabled,
.ad-report-btn-submit:disabled,
.event-report-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === REPORTED STATE OVERLAYS === */
.main-post-card.reported {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.main-post-card.reported::after {
    content: '✓ Reported';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(231, 76, 60, 0.85);
    color: white;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    z-index: 10;
}

.ad-container.reported {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.ad-container.reported::after {
    content: 'Reported';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(231, 76, 60, 0.85);
    color: white;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    z-index: 10;
}

.event-card.reported {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.event-card.reported::after {
    content: 'Reported';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(231, 76, 60, 0.85);
    color: white;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    z-index: 10;
}

/* === SCROLLBAR (dark) === */
.main-report-modal-content::-webkit-scrollbar,
.main-report-reasons::-webkit-scrollbar,
.ad-report-modal-content::-webkit-scrollbar,
.ad-report-reasons::-webkit-scrollbar,
.event-report-modal-content::-webkit-scrollbar,
.event-report-reasons::-webkit-scrollbar {
    width: 8px;
}

.main-report-modal-content::-webkit-scrollbar-track,
.main-report-reasons::-webkit-scrollbar-track,
.ad-report-modal-content::-webkit-scrollbar-track,
.ad-report-reasons::-webkit-scrollbar-track,
.event-report-modal-content::-webkit-scrollbar-track,
.event-report-reasons::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.main-report-modal-content::-webkit-scrollbar-thumb,
.main-report-reasons::-webkit-scrollbar-thumb,
.ad-report-modal-content::-webkit-scrollbar-thumb,
.ad-report-reasons::-webkit-scrollbar-thumb,
.event-report-modal-content::-webkit-scrollbar-thumb,
.event-report-reasons::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.main-report-modal-content::-webkit-scrollbar-thumb:hover,
.main-report-reasons::-webkit-scrollbar-thumb:hover,
.ad-report-modal-content::-webkit-scrollbar-thumb:hover,
.ad-report-reasons::-webkit-scrollbar-thumb:hover,
.event-report-modal-content::-webkit-scrollbar-thumb:hover,
.event-report-reasons::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .main-report-modal-content,
    .ad-report-modal-content,
    .event-report-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .main-report-modal-header,
    .ad-report-modal-header,
    .event-report-modal-header {
        padding: 14px 16px;
    }

    .main-report-modal-header h2,
    .ad-report-modal-header h2,
    .event-report-modal-header h2 {
        font-size: 1.05em;
    }

    .main-report-form,
    .ad-report-form,
    .event-report-form {
        padding: 14px;
    }

    .main-report-actions,
    .ad-report-actions,
    .event-report-actions {
        flex-direction: column;
        padding: 14px 16px;
    }

    .main-report-btn-cancel,
    .main-report-btn-submit,
    .ad-report-btn-cancel,
    .ad-report-btn-submit,
    .event-report-btn-cancel,
    .event-report-btn-submit {
        width: 100%;
    }

    .main-report-reasons,
    .ad-report-reasons,
    .event-report-reasons {
        max-height: 300px;
    }
}
