/* Modern Forum Design - ChatGPT Style */

/* Forum Layout */
.forum-layout {
    display: flex;
    gap: 0;
    max-width: 1600px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
    background: transparent;
}

/* Sidebar */
.forum-sidebar {
    width: 280px;
    background: #f9f9f9;
    border: 1px solid #f1f1f1;
    border-radius: 16px;
    position: sticky;
    top: 0;
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.sidebar-header {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.sidebar-header.mobile-only {
    display: none;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.categories-nav {
    padding: 0.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Scrollbar styling for categories-nav */
.categories-nav::-webkit-scrollbar {
    width: 6px;
}

.categories-nav::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 3px;
}

.categories-nav::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.categories-nav::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    transition: all 0.15s ease;
    font-size: 0.9375rem;
    position: relative;
}

.category-item svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.category-item span:first-of-type {
    flex: 1;
}

.category-item .post-count {
    font-size: 0.8125rem;
    color: #9ca3af;
    font-weight: 500;
}

.category-item:hover {
    background: #f3f4f6;
    color: #111827;
}

.category-item.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 500;
}

.category-item.active svg {
    opacity: 1;
}

.category-item.active .post-count {
    color: #2563eb;
}

/* Main Content */
.forum-main {
    flex: 1;
    max-width: 1100px;
}

.forum-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.forum-description {
    padding: 0 0 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 2px solid #f1f1f1;
}

.forum-intro {
    margin: 0 0 1.25rem 0;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #334155;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.forum-disclaimer {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: 500;
}

.forum-title h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    color: #111827;
}

.category-description {
    margin: 0.5rem 0 0;
    color: #6b7280;
    font-size: 0.9375rem;
}

.btn-new-post {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #2563eb;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-new-post:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1.25rem;
}

.section-title svg {
    color: #6b7280;
}

/* Hot Topics Section */
.hot-topics-section {
    margin-bottom: 2rem;
}

.hot-posts-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hot-post-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.hot-post-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.hot-post-link {
    display: block;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
}

.hot-post-header {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.hot-post-title {
    flex: 1;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-post-preview {
    margin: 0.75rem 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-post-card .hot-post-preview {
    display: none;
}

.post-category-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 6px;
    font-weight: 500;
    white-space: nowrap;
}

.hot-post-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.meta-author {
    margin-left: auto;
    font-size: 0.8125rem;
}

/* Latest Posts Section */
.latest-posts-section {
    margin-bottom: 2rem;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 1rem;
}

.post-item {
    position: relative;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.post-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.post-item-link {
    display: block;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
}

.post-item-header {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.post-item-title {
    flex: 1;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-item-preview {
    margin: 0.75rem 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-item-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
    color: #6b7280;
}

.post-author {
    font-weight: 500;
    color: #6b7280;
}

.post-category {
    padding: 0.125rem 0.5rem;
    background: #f3f4f6;
    border-radius: 4px;
    font-weight: 500;
}

.post-item-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
    padding-right: 0.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    font-size: 0.875rem;
    white-space: nowrap;
}

.stat-item svg {
    flex-shrink: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem 0;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.pagination-current {
    color: #6b7280;
    font-size: 0.9375rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.empty-state svg {
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    color: #111827;
}

.empty-state p {
    color: #6b7280;
    margin: 0 0 1.5rem;
}

/* Form Styles */
.forum-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
    height: 90vh;
    overflow-y: auto;
}

.forum-header {
    margin-bottom: 2rem;
}

.forum-header h1 {
    margin: 0 0 0.5rem;
    color: #111827;
    font-size: 2rem;
}

.forum-subtitle {
    color: #6b7280;
    margin: 0;
    font-size: 0.9375rem;
}

.post-form-container {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
}

.post-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #374151;
    font-size: 0.9375rem;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-help {
    font-size: 0.8125rem;
    color: #9ca3af;
}

.form-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.flash-messages-local {
    margin-bottom: 1.5rem;
}

/* Category Autocomplete */
.category-autocomplete {
    position: relative;
}

.category-search-input {
    width: 100%;
}

.category-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    margin-top: 0.25rem;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 50;
    display: none;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 0.9375rem;
}

.suggestion-item:hover {
    background: #f3f4f6;
}

.suggestion-item svg {
    flex-shrink: 0;
    color: #6b7280;
}

.suggestion-count {
    margin-left: auto;
    font-size: 0.8125rem;
    color: #9ca3af;
}

.suggestion-create {
    color: #2563eb;
    border-top: 1px solid #e5e7eb;
    font-weight: 500;
}

.suggestion-create:hover {
    background: #eff6ff;
}

.selected-category {
    margin-top: 0.75rem;
}

.selected-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.selected-badge.new {
    background: #f0fdf4;
    color: #16a34a;
}

.selected-badge svg {
    flex-shrink: 0;
}

/* Action Buttons (Delete, Edit, Reply) */
.post-action-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Delete Buttons */
.btn-delete {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: white;
    border: 1px solid #ef4444;
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: #fef2f2;
    border-color: #dc2626;
    color: #dc2626;
}

.btn-delete svg {
    flex-shrink: 0;
}

.btn-delete-small {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    background: white;
    border: 1px solid #f87171;
    border-radius: 4px;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-delete-small:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

.btn-delete-small svg {
    flex-shrink: 0;
}

/* Edit Buttons */
.btn-edit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: white;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    color: #3b82f6;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-edit:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

.btn-edit svg {
    flex-shrink: 0;
}

.btn-edit-small {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    background: white;
    border: 1px solid #93c5fd;
    border-radius: 4px;
    color: #3b82f6;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-edit-small:hover {
    background: #eff6ff;
    border-color: #3b82f6;
}

.btn-edit-small svg {
    flex-shrink: 0;
}

/* Reply Buttons */
.btn-reply {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-reply:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #374151;
}

.btn-reply svg {
    flex-shrink: 0;
}

/* HAUPTKOMMENTARE - Weißes, modernes, elegantes Design */
.comment {
    background: #f9f9f9;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ANTWORTEN - Sanfte Farbe, modern, schlicht */
.comment.depth-1,
.comment.depth-2,
.comment.depth-3,
.comment.depth-4,
.comment.depth-5 {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 2px solid #cbd5e1;
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    box-shadow: none;
}

/* Indentation */
.comment.depth-1 {
    margin-left: 2.5rem;
}

.comment.depth-2 {
    margin-left: 5rem;
}

.comment.depth-3 {
    margin-left: 7.5rem;
}

.comment.depth-4 {
    margin-left: 10rem;
}

.comment.depth-5 {
    margin-left: 12.5rem;
}

/* Max depth indicator */
.comment.max-depth {
    margin-left: 12.5rem;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.comment-author {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.9375rem;
}

.comment-author.is-op {
    color: #2563eb;
}

.op-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.comment-date {
    color: #9ca3af;
    font-size: 0.8125rem;
    margin-left: auto;
}

.comment-content {
    color: #1f2937;
    line-height: 1.7;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.comment-content .mention {
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
}

.comment-content .mention:hover {
    text-decoration: underline;
}

.reply-form-container {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    display: none;
}

.reply-form-container.active {
    display: block;
}

.reply-form textarea {
    width: 100%;
    padding: 0.625rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.reply-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.reply-form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-cancel {
    padding: 0.5rem 0.875rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Edit Form Styles */
.edit-form-container {
    margin-top: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: none;
}

.edit-form-container.active {
    display: block;
}

.edit-form input[type="text"],
.edit-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-family: inherit;
}

.edit-form input[type="text"]:focus,
.edit-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.edit-form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .forum-layout {
        flex-direction: column;
    }

    .forum-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .categories-nav {
        max-height: none;
        overflow-y: visible;
    }

    .forum-main {
        padding: 1.5rem 1rem;
    }

    .forum-header-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .hot-posts-grid {
        grid-template-columns: 1fr;
    }

    .post-item-link {
        flex-direction: column;
        gap: 1rem;
    }

    .post-item-stats {
        flex-direction: row;
    }
}

/* Mobile App Layout (< 1200px) */
.bottom-nav {
    display: none;
}

@media (max-width: 1200px) {
    body {
        padding-bottom: 60px; /* Space for bottom nav */
    }

    /* Reset Layout */
    .forum-layout-with-right {
        display: block;
        height: auto;
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }

    .forum-main {
        position: fixed;
        top: 70px; /* Height of top navbar */
        bottom: 60px; /* Height of bottom navbar */
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        overflow: hidden;
        padding: 0 1rem;
        z-index: 1; /* Ensure it's above background but below navs */
    }

    .forum-content-scroll {
        padding-right: 0 !important;
        padding-bottom: 100px;
    }

    .forum-header-bar {
        margin-bottom: 0.5rem;
        padding: 0.5rem 0 0;
    }

    .forum-description {
        padding: 0 0 1.5rem 0;
        margin-bottom: 1.5rem;
    }

    .forum-intro {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .forum-disclaimer {
        font-size: 0.6875rem;
        letter-spacing: 0.03em;
    }

    .forum-title h1 {
        font-size: 1.5rem;
    }

    /* Hide Desktop Elements */
    .forum-sidebar,
    .user-posts-sidebar,
    .btn-new-post {
        display: none !important;
    }

    /* Bottom Navigation */
    .bottom-nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: white;
        border-top: 1px solid #e5e7eb;
        z-index: 100;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        flex: 1;
        height: 100%;
        color: #6b7280;
        text-decoration: none;
        background: transparent;
        border: none;
        cursor: pointer;
        font-size: 10px;
        font-weight: 500;
    }

    .nav-item.active {
        color: #2563eb;
    }

    .nav-item svg {
        width: 24px;
        height: 24px;
    }

    /* Create Button Special Styling */
    .nav-item.create-post {
        color: #2563eb;
    }

    .nav-item.create-post:hover {
        color: #1d4ed8;
    }

    /* Add padding for bottom-nav */
    .forum-main {
        padding-bottom: 70px;
    }

    /* View Modes */
    
    /* Categories View */
    .view-categories .forum-sidebar {
        display: flex !important;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 130px);
        z-index: 10;
        border: none;
        border-radius: 0;
        background: white;
        padding: 0;
    }

    .view-categories .sidebar-header {
        padding: 1rem 1.25rem 0.75rem;
    }

    .view-categories .categories-nav {
        overflow-y: auto !important;
        max-height: 100%;
        padding: 0.5rem 0.5rem 0.5rem 1.25rem;
    }

    .view-categories .forum-main {
        display: none !important;
    }

    /* My Posts / Favorites View (Reusing User Sidebar) */
    .view-my-posts .user-posts-sidebar,
    .view-favorites .user-posts-sidebar {
        display: flex !important;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 130px);
        z-index: 10;
        border: none;
        border-radius: 0;
        background: white;
    }

    .view-my-posts .sidebar-section,
    .view-favorites .sidebar-section {
        background: white;
        width: 100%;
        padding: 0;
        border: none;
        height: 100%;
    }

    /* Show mobile header only in mobile view */
    .sidebar-header.mobile-only {
        display: none;
    }

    .view-my-posts .sidebar-header.mobile-only,
    .view-favorites .sidebar-header.mobile-only {
        display: block;
        padding: 1rem 1.25rem 0.75rem;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 0.75rem;
    }

    .view-my-posts .sidebar-header.mobile-only h2,
    .view-favorites .sidebar-header.mobile-only h2 {
        margin: 0;
        font-size: 0.875rem;
        font-weight: 600;
        color: #6b7280;
        text-transform: uppercase;
    }

    .view-my-posts .forum-main,
    .view-favorites .forum-main {
        display: none !important;
    }

    /* Hide tabs in view mode - show only content */
    .view-my-posts .sidebar-tabs,
    .view-favorites .sidebar-tabs {
        display: none !important;
    }

    .view-my-posts #posts-tab,
    .view-favorites #favorites-tab {
        display: flex !important;
    }

    .view-my-posts #favorites-tab,
    .view-favorites #posts-tab {
        display: none !important;
    }

    .view-my-posts .user-posts-list,
    .view-favorites .user-posts-list {
        width: 100%;
        padding-left: 1.25rem;
        padding-right: 0;
    }

    .view-my-posts .empty-tab-state,
    .view-favorites .empty-tab-state {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    /* Optimierungen für Beitrags-Darstellung */
    .hot-post-header, 
    .post-item-header {
        display: block;
    }

    .hot-post-title,
    .post-item-title {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .post-category-badge {
        display: inline-block;
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
        margin-right: 0.25rem;
        margin-bottom: 0.25rem;
    }

    .hot-post-meta, 
    .post-item-meta {
        font-size: 0.75rem;
        display: grid;
        grid-template-areas:
            "comments likes ."
            "date date author";
        grid-template-columns: auto auto 1fr;
        column-gap: 0.65rem;
        row-gap: 0.35rem;
        align-items: center;
        width: 100%;
    }

    .meta-item:nth-child(1) { grid-area: comments; }
    .meta-item:nth-child(2) { grid-area: likes; }
    .meta-item:nth-child(3) { grid-area: date; }
    .meta-author { grid-area: author; justify-self: end; }

    .meta-item svg {
        width: 12px;
        height: 12px;
    }

    /* Beitrag erstellen/bearbeiten - mehr Breite nutzen */
    .forum-container {
        max-width: 100%;
        padding: 1rem 0.5rem 80px;
        height: auto;
    }

    .post-form-container {
        padding: 1.25rem;
        margin: 0;
    }

    .post-form {
        gap: 1.25rem;
    }

    .form-group input[type="text"],
    .form-group textarea,
    .form-group select {
        width: 100%;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .form-actions .btn {
        width: 100%;
        text-align: center;
    }
}
