/* ========== FEED PAGE STYLES ========== */

.feed-container {
    max-width: 800px;
    margin: 100px auto 50px;
    padding: 0 20px;
    position: relative;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition-normal);
}

/* Navigation Tabs sind jetzt zentral in main.css definiert */

.create-post {
    background: var(--bg-primary);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    border: 1px solid var(--border-light);
    transition: var(--transition-normal);
}

.create-post textarea {
    width: 100%;
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
    padding: 16px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.create-post textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.post-privacy-options {
    margin: 14px 0 16px;
    padding: 12px;
    border: 1px solid var(--post-privacy-border);
    border-radius: 12px;
    background: var(--post-privacy-bg);
}

.post-privacy-toggle {
    margin: 12px 0 8px;
}

.post-privacy-toggle-btn {
    padding: 8px 12px;
    font-size: 13px;
}

.post-privacy-options.collapsed {
    display: none;
}

.post-privacy-options .form-group {
    margin: 0 0 10px 0;
}

.post-privacy-options .form-group:last-child {
    margin-bottom: 0;
}

.post-privacy-options label {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.35;
}

.post-privacy-options select {
    width: 100%;
    max-width: 260px;
    padding: 8px 10px;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.post-privacy-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    flex: 0 0 16px;
    accent-color: var(--post-privacy-checkbox-accent);
}

#postPrivacyModal .privacy-checkbox-label {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.35;
}

#postPrivacyModal input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    flex: 0 0 16px;
    accent-color: var(--post-privacy-checkbox-accent);
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

/* Photo Upload Styles */
.photo-upload-section {
    margin: 15px 0;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px dashed var(--border-medium);
    transition: all 0.3s ease;
}

.photo-upload-section:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.uploaded-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.uploaded-photo {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.uploaded-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.remove-photo-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    transition: all 0.2s ease;
}

.remove-photo-btn:hover {
    background: #c82333;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.upload-actions {
    display: flex;
    justify-content: flex-end;
}

/* Post with photos styling */
.post-with-photos {
    margin-top: 15px;
}

.post-photos {
    display: grid;
    gap: 8px;
    margin-top: 15px;
    max-width: 100%;
    justify-content: center;
}

.post-photos.album-post-photos {
    max-width: 620px;
    gap: 6px;
}

.post-photos.single-photo {
    grid-template-columns: 1fr;
    justify-items: center;
    max-width: 500px;
}

/* Einzel-Foto über upload_photo.php: wie Profilbild-Post — ganzes Bild sichtbar, Rahmen/Schatten wie avatar-post-img-large */
.post-photos.single-photo.feed-single-photo-upload {
    display: flex;
    justify-content: center;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.post-photos.single-photo.feed-single-photo-upload .post-photo {
    height: auto;
    padding-bottom: 0;
    width: auto;
    max-width: 100%;
    box-shadow: none;
    overflow: visible;
}

.post-photos.single-photo.feed-single-photo-upload .post-photo:hover {
    transform: none;
    box-shadow: none;
}

.post-photos.single-photo.feed-single-photo-upload .post-photo img {
    position: static;
    width: auto;
    height: auto;
    max-width: 400px;
    max-height: 400px;
    object-fit: contain;
    border-radius: 15px;
    border: 3px solid #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.post-photos.single-photo.feed-single-photo-upload .post-photo img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.post-photos.two-photos {
    grid-template-columns: 1fr 1fr;
    justify-items: center;
    max-width: 620px;
}

.post-photos.three-photos {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    justify-items: center;
    max-width: 620px;
}

.post-photos.four-photos {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    justify-items: center;
    max-width: 620px;
}

.post-photos.more-photos {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    justify-items: center;
    max-width: 620px;
}

.post-photo {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Quadratisches Verhältnis */
    margin: 0 auto;
}

.post-photo:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.post-photo img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.post-photo img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  border: 3px solid #667eea;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.post-photo.span-2 {
    grid-column: span 2;
}

.post-photo.span-2-rows {
    grid-row: span 2;
}

.post-photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
    border-radius: 12px;
    z-index: 1;
}

.post-photo-more-indicator {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.post-photo-more-indicator .post-photo-overlay {
    background: rgba(0, 0, 0, 0.35);
    font-size: 28px;
}

/* Mobile responsive for photo upload */
@media (max-width: 768px) {
    .post-privacy-options {
        padding: 10px;
    }

    .post-privacy-options label {
        font-size: 13px;
    }

    .post-privacy-options select {
        max-width: 100%;
    }

    .post-actions {
        display: flex;
        flex-direction: row;
        gap: 8px;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
    }
    
    .post-privacy {
        flex-shrink: 0;
        order: 1;
    }
    
    .post-privacy .guidelines-btn {
        padding: 6px 10px;
        font-size: 11px;
        min-height: 36px;
        white-space: nowrap;
        width: auto;
    }
    
    .post-privacy .guidelines-btn span {
        font-size: 11px;
    }
    
    .post-buttons {
        display: flex;
        flex-direction: row;
        gap: 8px;
        align-items: center;
        flex-shrink: 0;
        order: 2;
    }
    
    .post-buttons .btn {
        width: auto;
        padding: 8px 12px;
        font-size: 12px;
        min-height: 36px;
        white-space: nowrap;
        box-sizing: border-box;
        flex-shrink: 0;
    }
    
    /* Video hinzufügen Button - nur Icon */
    .post-buttons .btn#videoUploadBtn {
        padding: 8px;
        aspect-ratio: 1;
        min-width: 36px;
        width: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .post-buttons .btn#videoUploadBtn span {
        display: none;
    }
    
    /* Foto hinzufügen Button - nur Icon */
    .post-buttons .btn#photoUploadBtn {
        padding: 8px;
        aspect-ratio: 1;
        min-width: 36px;
        width: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .post-buttons .btn#photoUploadBtn span {
        display: none;
    }
    
    /* Posten Button */
    .post-buttons .btn.btn-primary {
        padding: 8px 12px;
        white-space: nowrap;
    }
    
    .post-buttons .btn span {
        font-size: 12px;
    }
    
    .uploaded-photo {
        width: 70px;
        height: 70px;
    }
    
    .post-photos {
        gap: 8px;
        max-width: 100%;
        justify-items: center;
    }
    
    .post-photos.two-photos,
    .post-photos.three-photos,
    .post-photos.four-photos,
    .post-photos.more-photos {
        max-width: 100%;
    }
    
    .post-photo {
        max-width: 100%;
        max-height: 300px;
    }
    
    .post-photo img {
        max-width: 100%;
        max-height: 300px;
    }
    
    .post-photos.two-photos,
    .post-photos.three-photos,
    .post-photos.four-photos,
    .post-photos.more-photos {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .uploaded-photo {
        width: 60px;
        height: 60px;
    }
    
    .remove-photo-btn {
        width: 20px;
        height: 20px;
        font-size: 14px;
    }
    
    .post-photos {
        gap: 6px;
    }
}

.navbar {
    z-index: 1;
    }

.post-privacy {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.posts-container {
    min-height: 400px;
}

.loading-posts {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--border-light);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-feed {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--border-light);
}

.empty-feed-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.post {
    background: var(--bg-primary);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    border: 1px solid var(--border-light);
}

.post:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* ========== PINNED POST STYLES ========== */
.pinned-post {
    background: #f0f7ff;
    border: 2px solid #667eea;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
}

.pinned-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.3);
}

/* Post Header Actions Container - rechts im Header */
.post-header-actions {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.post-pinned-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #667eea;
    color: white;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.post-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Dark Mode Styles */
[data-theme="dark"] .pinned-post {
    background: #1a2332;
    border-color: #8b9cff;
    box-shadow: 0 10px 40px rgba(139, 156, 255, 0.2);
}

[data-theme="dark"] .pinned-post:hover {
    box-shadow: 0 15px 50px rgba(139, 156, 255, 0.3);
}

[data-theme="dark"] .post-pinned-indicator {
    background: #8b9cff;
    color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(139, 156, 255, 0.3);
}

/* ========== COLLAPSED PINNED POST STYLES ========== */
.pinned-post.collapsed {
    overflow: visible;
    position: relative;
    transition: all 0.3s ease;
}

.pinned-post.collapsed .post-header {
    margin-bottom: 0;
}

.pinned-post.collapsed .post-content,
.pinned-post.collapsed .post-photos,
.pinned-post.collapsed .post-reactions,
.pinned-post.collapsed .post-comments {
    display: none;
}

/* Reduzierte Padding im eingeklappten Zustand */
.pinned-post.collapsed {
    padding: 20px 25px;
}

.pinned-post-collapse-btn {
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    margin-top: 8px;
}

.pinned-post-collapse-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-1px);
}

.pinned-post-collapse-btn:active {
    transform: translateY(0);
}

[data-theme="dark"] .pinned-post-collapse-btn {
    background: rgba(139, 156, 255, 0.1);
    border-color: rgba(139, 156, 255, 0.3);
    color: #8b9cff;
}

[data-theme="dark"] .pinned-post-collapse-btn:hover {
    background: rgba(139, 156, 255, 0.2);
    border-color: rgba(139, 156, 255, 0.5);
}

/* Animation für Einklappen/Ausklappen */
.pinned-post {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Mobile Anpassungen für Pin-Actions - nur für sehr kleine Displays */
@media (max-width: 480px) {
    .pinned-post-collapse-btn span {
        display: none;
    }
    
    .post-pinned-indicator {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .pinned-post-collapse-btn {
        padding: 6px 10px;
    }
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

.post-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    margin-right: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

/* Post Avatar Bild Styling */
.post-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
}

.post-avatar-initials {
    position: relative;
    z-index: 1;
}

.post-meta {
    flex: 1;
}

.post-author {
    font-weight: bold;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.author-link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.author-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.post-author-age {
    color: #667eea;
    font-size: 14px;
    font-weight: normal;
    margin-left: 4px;
}

.post-pronouns {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 8px;
}

.post-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.post-meta-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-visibility-indicator {
    font-size: 12px;
    line-height: 1;
    opacity: 0.9;
}

.post-distance {
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-top: 2px;
    font-weight: 500;
}

.post-content {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 20px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Avatar Post Styling */
.avatar-post-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.avatar-post-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    font-weight: 500;
    white-space: pre-wrap;
}

.avatar-post-image {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.avatar-post-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.avatar-post-img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

/* Große Avatar-Bilder für Profilbild-Posts */
.avatar-post-img-large {
    max-width: 400px;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: 15px;
    object-fit: cover;
    border: 3px solid #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.avatar-post-img-large:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

/* Mobile Anpassungen für Avatar Posts */
@media (max-width: 768px) {
    .avatar-post-img {
        width: 100px;
        height: 100px;
    }
    
    .avatar-post-img-large {
        max-width: 300px;
        max-height: 300px;
    }

    .post-photos.single-photo.feed-single-photo-upload .post-photo img {
        max-width: 300px;
        max-height: 300px;
    }
}

/* Avatar Modal Styling */
.avatar-modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal-backdrop);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.avatar-modal-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 20px;
}

.avatar-modal-content img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 15px;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 4px solid white;
    /* Zoom-Support für Android WebView */
    touch-action: pan-x pan-y pinch-zoom;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    /* Ermöglicht natürliches Zoomen */
    cursor: zoom-in;
}

.avatar-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: var(--z-modal);
    transition: all 0.3s ease;
}

.avatar-modal-close:hover {
    color: #667eea;
    transform: scale(1.1);
}

/* Mobile Anpassungen für Avatar Modal */
@media (max-width: 768px) {
    .avatar-modal-content img {
        max-width: 95%;
        max-height: 80%;
    }
    
    .avatar-modal-close {
        top: 15px;
        right: 20px;
        font-size: 35px;
    }
}

/* Photo Gallery Modal */
.photo-gallery-modal {
    display: none;
    position: fixed;
    z-index: 10002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.photo-gallery-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-gallery-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #f1f1f1;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10003;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.photo-gallery-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.photo-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #f1f1f1;
    border: none;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10003;
}

.photo-gallery-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.photo-gallery-prev {
    left: 30px;
}

.photo-gallery-next {
    right: 30px;
}

.photo-gallery-image-container {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-gallery-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    /* Zoom-Support für Android WebView */
    touch-action: pan-x pan-y pinch-zoom;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    /* Ermöglicht natürliches Zoomen */
    cursor: zoom-in;
}

.photo-gallery-info {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #f1f1f1;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 10003;
}

/* Mobile responsive for photo gallery */
@media (max-width: 768px) {
    .photo-gallery-nav {
        width: 50px;
        height: 50px;
        font-size: 20px;
        padding: 10px 15px;
    }
    
    .photo-gallery-prev {
        left: 15px;
    }
    
    .photo-gallery-next {
        right: 15px;
    }
    
    .photo-gallery-close {
        top: 15px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    
    .photo-gallery-info {
        bottom: 20px;
        font-size: 14px;
        padding: 8px 16px;
    }
}

.post-reactions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.reaction-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 2px solid var(--border-light);
    border-radius: 20px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.reaction-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.reaction-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Post Actions Menu */
.post-actions-menu {
    position: relative;
}

.post-menu-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.post-menu-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.post-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: var(--z-dropdown);
    min-width: 150px;
    overflow: hidden;
}

.post-menu button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: background-color 0.2s ease;
}

.post-menu button:hover {
    background: var(--bg-secondary);
}

.post-menu button:first-child {
    border-radius: 12px 12px 0 0;
}

.post-menu button:last-child {
    border-radius: 0 0 12px 12px;
}

/* Modal Styles (for Report Modal only) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-backdrop);
    padding: 20px;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-primary);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.modal-body {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Comment Styles */
.comment {
    padding: 15px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin-bottom: 15px;
    background: var(--bg-secondary);
}

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

.comment-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-header strong {
    color: var(--text-primary);
    font-size: 14px;
}

.comment-time {
    font-size: 12px;
    color: var(--text-muted);
}

.delete-comment-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.delete-comment-btn:hover {
    opacity: 1;
    background-color: rgba(255, 107, 107, 0.1);
    transform: scale(1.1);
}

.report-comment-btn {
    background: none;
    border: none;
    color: #ffa500;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.report-comment-btn:hover {
    opacity: 1;
    background-color: rgba(255, 165, 0, 0.1);
    transform: scale(1.1);
}

.edit-comment-btn {
    background: none;
    border: none;
    color: #4a90e2;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.edit-comment-btn:hover {
    opacity: 1;
    background-color: rgba(74, 144, 226, 0.1);
    transform: scale(1.1);
}

.comment-edited-indicator {
    font-size: 11px;
    color: var(--text-muted, #999);
    font-style: italic;
    margin-left: 6px;
    opacity: 0.8;
}

.comment-content {
    color: var(--text-secondary);
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Comment reactions */
.comment-reactions {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-reaction-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-reaction-btn:hover {
    background: var(--bg-secondary);
    color: #e74c3c;
}

.comment-reaction-btn.active {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
}

.comment-heart-count {
    font-size: 12px;
    font-weight: 500;
}

.no-comments {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
    font-style: italic;
}

.comment-input-container {
    border-top: 1px solid var(--border-light);
    padding-top: 20px;
}

.comment-input-container textarea {
    width: 100%;
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 10px;
    transition: border-color 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.comment-input-container textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.comment-counter {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Post Comments Section */
.post-comments {
    border-top: 1px solid var(--border-light);
    padding-top: 20px;
    margin-top: 15px;
    background: var(--bg-secondary);
    border-radius: 0 0 20px 20px;
    padding: 20px;
    display: block;
}

/* Preview Comments Styles */
.preview-comments {
    margin: 0 0 15px 0;
    padding: 0;
    padding-bottom: 15px;
}

.preview-comment {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 3px solid var(--primary-color);
}

.preview-comment:last-child {
    margin-bottom: 0;
}

.show-more-comments {
    text-align: center;
    padding: 10px;
    margin: 10px 20px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #667eea;
    font-weight: 500;
}

.show-more-comments:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.post-comments .comments-list {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.post-comments .comment {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    margin-bottom: 10px;
}

.post-comments .comment-input-container {
    border-top: 1px solid var(--border-light);
    padding-top: 15px;
    margin-top: 15px;
}

.post-comments .comment-input-container textarea {
    background: var(--bg-primary);
    border: 2px solid var(--border-light);
}

.post-comments .comment-input-container textarea:focus {
    border-color: var(--primary-color);
}

.post-comments .submit-comment-btn {
    margin-top: 10px;
    padding: 8px 16px;
    font-size: 14px;
}

/* Report Modal Styles - OPTIMIERT */
.report-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-backdrop);
    padding: 20px;
    backdrop-filter: blur(8px);
}

.report-modal-content {
    background: var(--bg-primary);
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(-5vh);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.report-modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.report-modal-header .warning-icon {
    font-size: 24px;
    color: #ffc107;
    flex-shrink: 0;
}

.report-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.report-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transform: scale(1.1);
}

.report-modal-body {
    padding: 30px;
}

.report-question {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 500;
    line-height: 1.5;
}

.form-select {
    width: 100%;
    padding: 15px 16px;
    border: 2px solid var(--border-medium);
    border-radius: 12px;
    font-size: 15px;
    margin-bottom: 20px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-select:hover {
    border-color: #667eea;
}

#reportDescription {
    width: 100%;
    min-height: 120px;
    padding: 15px 16px;
    border: 2px solid var(--border-medium);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    resize: vertical;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    line-height: 1.5;
}

#reportDescription:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

#reportDescription:hover {
    border-color: #667eea;
}

.report-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 10px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.post-counter {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
    margin-bottom: 10px;
}

.post-counter.warning {
    color: var(--warning-color);
}

.post-counter.danger {
    color: var(--danger-color);
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.success-message {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .feed-container {
        margin: 80px auto 30px;
        padding: 0 15px;
    }

    .post {
        padding: 20px;
        margin-bottom: 15px;
    }

    /* post-actions wird bereits oben in der spezifischeren Media Query definiert */
    /* Diese Regeln werden durch die spezifischeren Regeln überschrieben */

    .loading-posts {
        padding: 40px 15px;
    }

    .empty-feed {
        padding: 40px 15px;
    }

    .empty-feed-icon {
        font-size: 50px;
    }

    /* Modal responsive */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        transform: translateY(-3vh);
    }

    .modal-header {
        padding: 15px 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .post-menu {
        min-width: 120px;
    }

    .post-menu button {
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .feed-container {
        margin: 70px auto 20px;
        padding: 0 10px;
    }

    .create-post textarea {
        min-height: 80px;
        padding: 12px;
    }

    .post-header {
        flex-wrap: wrap;
    }

    .post-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin-right: 10px;
    }

    .post-author {
        font-size: 14px;
    }

    .post-content {
        font-size: 15px;
    }

    .post-reactions {
        gap: 10px;
    }

    .reaction-btn {
        padding: 6px 10px;
        font-size: 13px;
    }

    .modal {
        padding: 5px;
    }
    
    .modal-content {
        width: 98%;
        transform: translateY(-2vh);
    }

    .modal-header {
        padding: 12px 15px;
    }

    .modal-body {
        padding: 15px;
    }

    .comment {
        padding: 12px;
    }

    .comment-input-container textarea {
        min-height: 60px;
        padding: 10px;
    }
}

/* Responsive Design für Report Modal */
@media (max-width: 768px) {
    .report-modal {
        padding: 15px;
    }
    
    .report-modal-content {
        width: 95%;
        transform: translateY(-3vh);
    }

    .report-modal-header {
        padding: 20px 25px 15px;
    }

    .report-modal-header h3 {
        font-size: 18px;
    }

    .report-modal-body {
        padding: 25px;
    }

    .report-question {
        font-size: 15px;
    }

    .form-select,
    #reportDescription {
        font-size: 14px;
        padding: 12px 14px;
    }

    .report-modal-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-secondary,
    .btn-danger {
        width: 100%;
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .report-modal {
        padding: 10px;
    }
    
    .report-modal-content {
        width: 98%;
        transform: translateY(-2vh);
    }

    .report-modal-header {
        padding: 15px 20px 10px;
    }

    .report-modal-header h3 {
        font-size: 16px;
    }

    .report-modal-body {
        padding: 20px;
    }

    .report-question {
        font-size: 14px;
    }

    .form-select,
    #reportDescription {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* Feed Filter Styles */
.feed-filter {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.filter-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.filter-toggle-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-toggle-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.feed-persistent-filter-banner.is-hidden {
    display: none;
}

.feed-persistent-filter-banner {
    margin: 0 15px 12px 15px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.45);
    background: rgba(102, 126, 234, 0.08);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* Admin/Moderator: Beitrag nur wegen Rolle sichtbar (Freunde/Altersgrenze) */
.post-moderator-only-banner {
    margin: 0 0 10px 0;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 193, 7, 0.55);
    background: rgba(255, 193, 7, 0.12);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.feed-filters-persist-section.is-hidden {
    display: none;
}

.feed-filters-persist-section {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
}

.feed-filters-persist-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0;
}

.feed-filters-persist-label input[type="checkbox"] {
    margin-top: 3px;
    accent-color: #667eea;
    flex-shrink: 0;
}

.feed-filters-persist-hint {
    margin: 8px 0 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-left: 28px;
}

.feed-filters-persist-hint.is-hidden {
    display: none;
}

.filter-panel {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    animation: slideDown 0.3s ease;
}

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

.filter-section {
    margin-bottom: 20px;
}

.filter-section h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.filter-option:hover {
    background: var(--border-light);
    border-color: var(--primary-color);
}

.filter-option input[type="radio"] {
    margin: 0;
    accent-color: #667eea;
}

.filter-option input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 500;
}

.filter-option:has(input[type="radio"]:checked) {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.age-range-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    width: 100%;
}

.age-range-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.age-range-item label {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.age-range-item select {
    padding: 6px 8px;
    border: 1px solid var(--border-medium);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.age-range-item select:disabled {
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: not-allowed;
}

.age-range-item select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-medium);
}

.filter-actions .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Active filter indicator */
.filter-active {
    position: relative;
}

.filter-active::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

/* Responsive design */
@media (max-width: 768px) {
    .feed-filter {
        padding: 15px;
    }
    
    .filter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .filter-options {
        gap: 8px;
    }
    
    .filter-option {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-actions .btn {
        width: 100%;
    }
}

/* ========== POST EDIT MODAL STYLES ========== */
.post-edit-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.post-edit-modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.post-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-light);
    background-color: var(--bg-secondary);
    border-radius: 12px 12px 0 0;
}

.post-edit-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.post-edit-close {
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.post-edit-close:hover {
    color: var(--text-primary);
}

.post-edit-body {
    padding: 25px;
}

.post-edit-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group textarea {
    width: 100%;
    min-height: 120px;
    max-height: 320px;
    overflow-y: auto;
    padding: 15px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.edit-char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.edit-char-counter.warning {
    color: #f39c12;
}

.edit-char-counter.danger {
    color: #e74c3c;
}

.post-edit-photos {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.edit-photos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 2px dashed var(--border-light);
    border-radius: 8px;
    background-color: var(--bg-secondary);
}

.edit-photo {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-light);
}

.edit-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-edit-photo-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.remove-edit-photo-btn:hover {
    background-color: #e74c3c;
}

.edit-photo-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.post-edit-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.post-edited-indicator {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-style: italic;
}

/* Responsive Design für Post Edit Modal */
@media (max-width: 768px) {
    .post-edit-modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }

    .post-edit-header {
        padding: 15px 20px;
    }

    .post-edit-body {
        padding: 20px;
    }

    .post-edit-actions {
        flex-direction: column;
    }

    .edit-photos-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* Dark mode adjustments für Post Edit Modal */
[data-theme="dark"] .post-edit-modal-content {
    background-color: var(--bg-primary);
    border-color: var(--border-light);
}

[data-theme="dark"] .post-edit-header {
    background-color: var(--bg-secondary);
}

/* Dark mode adjustments für Privatsphäre-Modal */
[data-theme="dark"] #postPrivacyModal .post-edit-modal-content {
    background-color: var(--bg-primary);
    border-color: var(--border-light);
}

[data-theme="dark"] #postPrivacyModal .post-edit-header {
    background-color: var(--bg-secondary);
    border-bottom-color: var(--border-light);
}

[data-theme="dark"] #postPrivacyModal .post-edit-body,
[data-theme="dark"] #postPrivacyModal .post-edit-form,
[data-theme="dark"] #postPrivacyModal .form-group label {
    color: var(--text-primary);
}

[data-theme="dark"] #postPrivacyModal select {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

[data-theme="dark"] #postPrivacyModal select option {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* ========== EDIT HISTORY MODAL STYLES ========== */
.edit-history-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.edit-history-modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.edit-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-light);
    background-color: var(--bg-secondary);
    border-radius: 12px 12px 0 0;
}

.edit-history-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.edit-history-close {
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.edit-history-close:hover {
    color: var(--text-primary);
}

.edit-history-body {
    padding: 25px;
}

.edit-history-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.edit-history-entry {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.edit-history-entry.latest {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.edit-history-header-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

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

.edit-number {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.edit-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.latest-badge {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.editor-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-name {
    font-weight: 600;
    color: var(--text-primary);
}

.role-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.role-badge.admin {
    background: #dc3545;
    color: white;
}

.role-badge.moderator {
    background: #fd7e14;
    color: white;
}

.role-badge.user {
    background: var(--text-muted);
    color: white;
}

.edit-reason {
    background: rgba(102, 126, 234, 0.1);
    border-left: 3px solid var(--primary-color);
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 0 6px 6px 0;
    color: var(--text-primary);
    font-style: italic;
}

.edit-changes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.change-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 15px;
}

.change-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.change-diff {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.old-content {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    border-left: 3px solid #dc3545;
}

.new-content {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    border-left: 3px solid #28a745;
}

.no-changes {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.no-edit-history {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 40px;
    font-size: 1.1rem;
}

/* Responsive Design für Edit History Modal */
@media (max-width: 768px) {
    .edit-history-modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }

    .edit-history-header {
        padding: 15px 20px;
    }

    .edit-history-body {
        padding: 20px;
    }

    .edit-history-header-entry {
        flex-direction: column;
        align-items: flex-start;
    }

    .edit-history-entry {
        padding: 15px;
    }
}

/* Dark mode adjustments für Edit History Modal */
[data-theme="dark"] .edit-history-modal-content {
    background-color: var(--bg-primary);
    border-color: var(--border-light);
}

[data-theme="dark"] .edit-history-header {
    background-color: var(--bg-secondary);
}

/* ========== PIN CONFIRMATION MODAL ========== */
.pin-confirm-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.pin-confirm-modal.show {
    display: flex;
}

.pin-confirm-modal-content {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-light);
    animation: slideUp 0.3s ease;
}

.pin-confirm-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.pin-confirm-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--text-primary);
}

.pin-confirm-message {
    color: var(--text-secondary);
    margin: 0 0 28px 0;
    line-height: 1.6;
    font-size: 15px;
}

.pin-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-confirm-cancel,
.btn-confirm-yes {
    padding: 12px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
    flex: 1;
}

.btn-confirm-cancel {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 2px solid var(--border-medium);
}

.btn-confirm-cancel:hover {
    background: var(--border-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-confirm-yes {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-confirm-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .pin-confirm-modal-content {
        width: 95%;
        padding: 24px;
        max-width: 340px;
    }
    
    .pin-confirm-icon {
        font-size: 48px;
    }
    
    .pin-confirm-title {
        font-size: 18px;
    }
    
    .pin-confirm-message {
        font-size: 14px;
    }
    
    .pin-confirm-buttons {
        flex-direction: column;
    }
    
    .btn-confirm-cancel,
    .btn-confirm-yes {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .pin-confirm-modal-content {
        padding: 20px;
    }
}

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

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

/* Post Reactions Modal */
.post-reactions-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.post-reactions-modal-content {
    background: var(--bg-primary);
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-light);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.post-reactions-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
}

.post-reactions-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.post-reactions-modal-close {
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.post-reactions-modal-close:hover {
    color: var(--text-primary);
}

.post-reactions-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.reaction-type-section {
    margin-bottom: 32px;
}

.reaction-type-section:last-child {
    margin-bottom: 0;
}

.reaction-type-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--text-primary);
}

.reaction-users-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reaction-user-item {
    display: flex;
    align-items: center;
}

.reaction-user-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: opacity 0.2s ease;
    width: 100%;
    padding: 8px;
    border-radius: 8px;
}

.reaction-user-link:hover {
    background: var(--bg-secondary);
    opacity: 0.8;
}

.reaction-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.reaction-user-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.reaction-user-name {
    font-size: 15px;
    font-weight: 500;
    flex: 1;
}

.no-reactions-message {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    margin: 0;
}

.error-message {
    color: #e74c3c;
    text-align: center;
    padding: 20px;
}

.post-reactions-summary {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.reactions-summary-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
}

.reactions-summary-btn:hover {
    background: var(--border-light);
    border-color: var(--border-medium);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .post-reactions-modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .post-reactions-modal-header {
        padding: 20px;
    }
    
    .post-reactions-modal-header h3 {
        font-size: 18px;
    }
    
    .post-reactions-modal-body {
        padding: 20px;
    }
    
    .reaction-type-title {
        font-size: 15px;
    }
    
    .reaction-user-avatar,
    .reaction-user-initials {
        width: 36px;
        height: 36px;
    }
    
    .reaction-user-name {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .post-reactions-modal-content {
        width: 100%;
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
    }
    
    .post-reactions-modal-header {
        padding: 16px;
    }
    
    .post-reactions-modal-body {
        padding: 16px;
    }
}

/* ================================
   Hashtag Feature Styles
   ================================ */

/* Trending Hashtags Section - jetzt innerhalb des Filter-Panels */
/* Die Styles werden von .filter-section übernommen, keine zusätzlichen Styles nötig */

.trending-hashtags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trending-hashtag-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.trending-hashtag-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    opacity: 0.9;
}

.trending-hashtag-item .hashtag-symbol {
    font-weight: 600;
}

.trending-hashtag-item .hashtag-name {
    flex: 1;
}

.trending-hashtag-item .hashtag-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Anklickbare Hashtags in Posts und Kommentaren */
.hashtag {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.hashtag:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Anklickbare Links in Posts und Kommentaren */
.post-link {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.2s ease;
    word-break: break-all;
}

.post-link:hover {
    color: #5a67d8;
    opacity: 0.8;
}

/* Hashtag Filter Badge */
.hashtag-filter-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: white;
    padding: 10px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.hashtag-filter-value {
    font-weight: 600;
}

.hashtag-filter-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.hashtag-filter-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .trending-hashtag-item {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    .hashtag-filter-badge {
        font-size: 0.9rem;
        padding: 8px 14px;
    }
}

/* ========== VIDEO UPLOAD STYLES ========== */

.video-upload-section {
    margin: 15px 0;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px dashed var(--border-medium);
    transition: all 0.3s ease;
}

.video-upload-section:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.uploaded-videos {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.uploaded-video-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    background: #000;
}

.uploaded-video-item:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.uploaded-video-item video {
    width: 100%;
    max-height: 200px;
    display: block;
    border-radius: 8px;
}

/* ========== VIDEO PLAYER STYLES ========== */

.post-video-container {
    margin: 10px 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.post-video-container:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.custom-video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Fullscreen Overlay - Pop-up für Video */
.video-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.video-fullscreen-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.video-fullscreen-container video {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
}

.post-video-player {
    width: 100%;
    max-height: 500px;
    display: block;
    outline: none;
    background: #000;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Fullscreen-Modus: Video füllt den gesamten verfügbaren Platz */
.video-fullscreen-mode .post-video-player {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    object-fit: contain;
}

/* Custom Video Controls */
.custom-video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 100%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 0 0 12px 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.custom-video-wrapper:hover .custom-video-controls,
.custom-video-wrapper:focus-within .custom-video-controls,
.custom-video-controls[style*="opacity: 1"] {
    opacity: 1 !important;
}

.video-control-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    color: #333;
    flex-shrink: 0;
}

.video-control-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.video-control-btn:active {
    transform: scale(0.95);
}

.video-progress-container {
    flex: 1;
    position: relative;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    overflow: visible;
    display: flex;
    align-items: center;
}

/* Visueller Thumb-Indikator (immer sichtbar) */
.video-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 18px;
    height: 18px;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    z-index: 5;
    transition: transform 0.1s linear, box-shadow 0.2s ease;
}

.video-progress-container:hover .video-progress-thumb {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
}

.video-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #667eea;
    border-radius: 4px;
    transition: width 0.1s linear;
    width: 0%;
    pointer-events: none;
}

.video-progress-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    z-index: 10;
    background: transparent;
    padding: 0;
    touch-action: none;
}

.video-progress-slider::-webkit-slider-runnable-track {
    background: transparent;
    height: 8px;
}

.video-progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    position: relative;
    z-index: 11;
    margin-top: -5px;
    opacity: 1;
}

.video-progress-container:hover .video-progress-slider::-webkit-slider-thumb,
.video-progress-slider:focus::-webkit-slider-thumb,
.video-progress-slider:active::-webkit-slider-thumb {
    transform: scale(1.3);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.8);
    opacity: 1;
}

.video-progress-slider::-moz-range-track {
    background: transparent;
    height: 8px;
    border: none;
}

.video-progress-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 11;
    opacity: 1;
}

.video-progress-container:hover .video-progress-slider::-moz-range-thumb,
.video-progress-slider:focus::-moz-range-thumb,
.video-progress-slider:active::-moz-range-thumb {
    transform: scale(1.3);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.8);
}

.video-time-display {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 80px;
}

.video-time-separator {
    color: rgba(255, 255, 255, 0.7);
}

.video-volume-container {
    position: relative;
    width: 80px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    overflow: visible;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
}

.video-volume-container:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Visueller Thumb-Indikator für Volume (immer sichtbar) */
.video-volume-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    z-index: 5;
    transition: transform 0.1s linear, box-shadow 0.2s ease;
}

.video-volume-container:hover .video-volume-thumb {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
}

.video-volume-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    z-index: 10;
    background: transparent;
    padding: 0;
    touch-action: none;
}

.video-volume-slider::-webkit-slider-runnable-track {
    background: transparent;
    height: 8px;
}

.video-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    position: relative;
    z-index: 11;
    margin-top: -4px;
    opacity: 1;
}

.video-volume-container:hover .video-volume-slider::-webkit-slider-thumb,
.video-volume-slider:focus::-webkit-slider-thumb,
.video-volume-slider:active::-webkit-slider-thumb {
    transform: scale(1.3);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.8);
    opacity: 1;
}

.video-volume-slider::-moz-range-track {
    background: transparent;
    height: 8px;
    border: none;
}

.video-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #fff;
    border: 2px solid #667eea;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 11;
    opacity: 1;
}

.video-volume-container:hover .video-volume-slider::-moz-range-thumb,
.video-volume-slider:focus::-moz-range-thumb,
.video-volume-slider:active::-moz-range-thumb {
    transform: scale(1.3);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.8);
}

/* Hide native controls completely */
.post-video-player::-webkit-media-controls {
    display: none !important;
}

.post-video-player::-webkit-media-controls-panel {
    display: none !important;
}

/* Mobile responsive for video upload */
@media (max-width: 768px) {
    .post-video-player {
        max-height: 300px;
    }
    
    .uploaded-video-item video {
        max-height: 150px;
    }
    
    /* Mobile Video Controls - Flexbox mit Wrap */
    .custom-video-controls {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px 12px;
        gap: 6px;
        align-content: flex-start;
    }
    
    /* Zeile 1: Zeitanzeige (zentriert, volle Breite) */
    .video-time-display {
        order: 1;
        width: 100%;
        flex-basis: 100%;
        justify-content: center;
        margin-bottom: 2px;
        min-width: auto;
        font-size: 12px;
        padding: 0;
    }
    
    /* Zeile 2: Progress-Balken (volle Breite) */
    .video-progress-container {
        order: 2;
        width: 100%;
        flex-basis: 100%;
        margin-bottom: 4px;
    }
    
    /* Zeile 3: Buttons in einer horizontalen Reihe */
    .custom-video-controls > .video-play-pause-btn {
        order: 3;
        flex-shrink: 0;
    }
    
    .custom-video-controls > .video-volume-btn {
        order: 4;
        flex-shrink: 0;
    }
    
    .custom-video-controls > .video-volume-container {
        order: 5;
        flex-shrink: 0;
    }
    
    .custom-video-controls > .video-fullscreen-btn {
        order: 6;
        flex-shrink: 0;
        margin-left: auto;
    }
    
    /* Zeile 3: Buttons in einer Reihe */
    .video-control-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* Volume-Button größer auf Mobile */
    .custom-video-controls > .video-volume-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    /* Volume-Container größer auf Mobile */
    .video-volume-container {
        width: 100px;
        height: 10px;
    }
    
    /* Volume-Thumb größer auf Mobile */
    .video-volume-thumb {
        width: 18px;
        height: 18px;
    }
    
    /* Volume-Slider-Thumb größer auf Mobile */
    .video-volume-slider::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
        margin-top: -4px;
    }
    
    .video-volume-slider::-moz-range-thumb {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .post-video-player {
        max-height: 250px;
    }
    
    .uploaded-video-item video {
        max-height: 120px;
    }
    
    .video-upload-section {
        padding: 10px;
    }
    
    /* Noch kompaktere Video-Controls auf sehr kleinen Bildschirmen */
    .custom-video-controls {
        padding: 8px 10px;
        gap: 4px;
    }
    
    .video-time-display {
        font-size: 11px;
        margin-bottom: 1px;
    }
    
    .video-progress-container {
        margin-bottom: 3px;
    }
    
    .video-control-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    /* Volume-Button größer auch auf sehr kleinen Bildschirmen */
    .custom-video-controls > .video-volume-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    /* Volume-Container größer auch auf sehr kleinen Bildschirmen */
    .video-volume-container {
        width: 90px;
        height: 10px;
    }
    
    /* Volume-Thumb größer auch auf sehr kleinen Bildschirmen */
    .video-volume-thumb {
        width: 18px;
        height: 18px;
    }
    
    /* Volume-Slider-Thumb größer auch auf sehr kleinen Bildschirmen */
    .video-volume-slider::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
        margin-top: -4px;
    }
    
    .video-volume-slider::-moz-range-thumb {
        width: 18px;
        height: 18px;
    }
}

/* Video Upload Modal */
.video-upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.video-upload-modal-content {
    background: var(--bg-primary);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    border: 1px solid var(--border-light);
}

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

.video-upload-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
    border-radius: 12px 12px 0 0;
}

.video-upload-modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.video-upload-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.video-upload-modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.video-upload-modal-body {
    padding: 20px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.video-upload-dropzone {
    border: 2px dashed var(--border-medium);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-secondary);
}

.video-upload-dropzone:hover {
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.video-upload-dropzone.dragover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.video-upload-dropzone-content {
    pointer-events: none;
}

.video-upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.video-upload-text {
    font-size: 16px;
    color: var(--text-primary);
    margin: 0 0 10px 0;
    font-weight: 500;
}

.video-upload-hint {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 20px 0;
}

.video-upload-progress {
    margin-top: 20px;
}

.video-upload-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--border-light);
}

.video-upload-progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.3s;
    border-radius: 4px;
}

.video-upload-progress-info {
    text-align: center;
}

.video-upload-progress-text {
    font-size: 14px;
    color: var(--text-primary);
    margin: 0 0 5px 0;
    font-weight: 500;
}

.video-upload-progress-details {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.video-upload-progress-actions {
    margin-top: 15px;
    text-align: center;
}

.video-upload-progress-actions .btn {
    min-width: 120px;
}

.video-upload-error {
    margin-top: 15px;
    padding: 12px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 6px;
    color: var(--danger-color);
    font-size: 14px;
}

/* Video Upload Preview */
.video-upload-preview {
    margin-top: 20px;
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-light);
}

.video-upload-preview-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.video-upload-preview-content h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.video-upload-preview-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.video-upload-preview-info p {
    margin: 0;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.video-upload-preview-info strong {
    color: var(--text-secondary);
    margin-right: 8px;
    font-weight: 600;
}

.video-upload-preview-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

.video-upload-preview-actions .btn {
    min-width: 120px;
}

/* Video-Element in Preview */
.video-upload-preview-content video {
    width: 100%;
    max-height: 300px;
    border-radius: 8px;
    background: #000;
    border: 1px solid var(--border-light);
}

/* Dark Mode Anpassungen für Video Upload Modal */
[data-theme="dark"] .video-upload-modal-content {
    background: var(--bg-primary);
    border-color: var(--border-medium);
}

[data-theme="dark"] .video-upload-modal-header {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

[data-theme="dark"] .video-upload-dropzone {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

[data-theme="dark"] .video-upload-dropzone:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
}

[data-theme="dark"] .video-upload-dropzone.dragover {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--primary-color);
}

[data-theme="dark"] .video-upload-preview {
    background: var(--bg-primary);
    border-color: var(--border-medium);
}

[data-theme="dark"] .video-upload-preview-info {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

@media (max-width: 768px) {
    .video-upload-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .video-upload-dropzone {
        padding: 30px 15px;
    }
    
    .video-upload-icon {
        font-size: 36px;
    }
}

/* ========== Feed-Composer Tabs (Post / Umfrage) ========== */
.feed-composer-tabs {
    display: flex;
    gap: 0;
    margin: 0 0 18px;
    padding: 4px;
    border-radius: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
}

.feed-composer-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    background: transparent;
    color: var(--text-secondary);
    transition: background 0.2s ease, color 0.2s ease;
}

.feed-composer-tab:hover {
    color: var(--text-primary);
}

.feed-composer-tab.is-active {
    background: var(--bg-primary);
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.feed-composer-panel.is-hidden {
    display: none !important;
}

.feed-composer-media-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.feed-composer-media-buttons.is-hidden {
    display: none !important;
}

/* ========== Feed-Umfragen ========== */
.feed-poll-composer {
    margin: 12px 0 16px;
    padding: 14px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-secondary);
}

.feed-poll-composer.is-hidden {
    display: none;
}

.feed-poll-composer label {
    display: block;
    margin: 10px 0 6px;
    font-weight: 600;
    color: var(--text-primary);
}

.feed-poll-question-input {
    width: 100%;
    min-height: 56px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 2px solid var(--border-light);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    resize: vertical;
}

.feed-poll-hint {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin: 6px 0 10px;
}

.feed-poll-options .feed-poll-option-row {
    margin-bottom: 8px;
}

.feed-poll-option-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 2px solid var(--border-light);
    font-size: 15px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.feed-poll-duration-select {
    width: 100%;
    max-width: 280px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 2px solid var(--border-light);
    font-size: 15px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.feed-poll-composer-actions {
    margin: 10px 0 14px;
}

.post-poll {
    margin: 12px 0 14px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.post-poll-expired {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.post-poll-question {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    line-height: 1.35;
}

.post-poll-intro {
    margin-bottom: 10px;
}

.post-poll-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.post-poll-options-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-poll-option {
    text-align: left;
    padding: 10px 12px;
    border-radius: 10px;
    border: 2px solid var(--border-light);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.post-poll-option:hover:not(.is-disabled) {
    border-color: var(--primary-color);
}

.post-poll-option.is-selected {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.08);
}

.post-poll-option.is-disabled {
    cursor: default;
    opacity: 0.9;
}

.post-poll-option.show-results {
    cursor: default;
}

.post-poll-option-text {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
}

.post-poll-count {
    float: right;
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 8px;
}

.post-poll-bar-track {
    height: 6px;
    border-radius: 4px;
    background: var(--border-light);
    overflow: hidden;
    margin-top: 6px;
}

.post-poll-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary-color), #764ba2);
}

.post-edit-poll-section .feed-poll-options {
    margin-bottom: 10px;
}

.feed-poll-edit-expires {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 10px;
}
