/* Reset & Basis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body.bg-image-body {
    color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), 
                url('../Bilder & Videos/Hauptseite.jpg') no-repeat center center fixed;
    background-size: cover;
}

/* Navbar */
.navbar {
    background-color: #222222;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-btn {
    width: 30px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.menu-btn .bar {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-btn.open .bar:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.menu-btn.open .bar:nth-child(2) { opacity: 0; }
.menu-btn.open .bar:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

.logo { height: 40px; width: auto; cursor: pointer; }
.nav-center { flex-grow: 1; max-width: 400px; margin: 0 20px; }
.search-input { width: 100%; padding: 8px 15px; border-radius: 20px; border: none; outline: none; background-color: #333; color: white; }
.icon-link, .profile-icon { display: flex; align-items: center; cursor: pointer; }


/* Hauptbereich */
.page-content {
    flex: 1;
    padding-top: 80px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.main-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* Top-Controls */
.top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 800px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-container {
    display: flex;
    gap: 15px;
}

.filter-btn {
    padding: 8px 20px;
    background-color: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
}

.filter-btn.active, .filter-btn:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.action-buttons-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.create-btn {
    padding: 8px 16px;
    background-color: #1e293b;
    color: #94a3b8;
    border: 1px dashed #475569;
    border-radius: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: not-allowed;
}

/* News Container & Kasten */
.news-container {
    width: 90%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.empty-news {
    text-align: center;
    font-size: 1.2rem;
    color: #bbb;
    margin-top: 30px;
}

.news-box {
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Kanal Header */
.channel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.channel-name {
    font-weight: bold;
    font-size: 1.05rem;
    color: #fff;
    cursor: pointer;
}

.verified-badge {
    color: #3b82f6;
    font-size: 0.9rem;
}

.sub-count {
    font-size: 0.8rem;
    color: #aaa;
}

.subscribe-btn {
    background: #333;
    color: #aaa;
    border: 1px solid #444;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Meta Infos (Thema + Datum/Uhrzeit) */
.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-tag {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Farbschema Themen */
.tag-nachricht { background-color: #000000; color: white; border: 1px solid #444; }
.tag-teaser { background-color: #8b5cf6; color: white; }
.tag-unfaelle { background-color: #ef4444; color: white; }
.tag-fussball { background-color: #10b981; color: white; }
.tag-technik { background-color: #3b82f6; color: white; }
.tag-erde { background-color: #8b4513; color: white; }
.tag-politik { background-color: #ffffff; color: black; }

.news-date {
    font-size: 0.85rem;
    color: #ccc;
    font-weight: 500;
}

.news-text-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #eee;
    white-space: pre-line;
}

/* Interaktions-Buttons */
.news-actions {
    display: flex;
    gap: 12px;
    margin-top: 5px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer; /* Geändert von not-allowed zu pointer! */
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge {
    background: #475569;
    color: #f1f5f9;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
}

footer {
    width: 100%;
    text-align: center;
    padding: 15px;
    font-size: 12px;
    color: #ccc;
    background-color: rgba(0, 0, 0, 0.9);
}

/* ==========================================
   INTERAKTIONEN & YOUTUBE-STYLE KOMMENTARE
   ========================================== */

.action-count {
    background: #333;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 4px;
}

.like-btn.liked {
    color: #ff4d4d;
    border-color: #ff4d4d;
}

.comments-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #333;
}

.comments-header {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #fff;
}

.add-comment-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.comment-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid #555;
    color: #fff;
    padding: 8px 0;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.comment-input:focus {
    border-bottom-color: #fff;
}

.comment-actions-bar {
    display: flex;
    justify-content: flex-end;
}

.comment-submit-btn {
    background-color: #3ea6ff;
    color: #0f0f0f;
    border: none;
    padding: 8px 16px;
    border-radius: 18px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.comment-submit-btn:hover {
    background-color: #65b8ff;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #555;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.comment-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.comment-author {
    font-size: 13px;
    font-weight: bold;
    color: #f1f1f1;
}

.comment-time {
    font-size: 11px;
    color: #aaa;
    font-weight: normal;
    margin-left: 6px;
}

.comment-text {
    font-size: 14px;
    color: #d9d9d9;
    line-height: 1.4;
    white-space: pre-wrap;
}

.no-comments {
    color: #888;
    font-size: 13px;
    font-style: italic;
}

/* Beitrags-Erstellungs-Formular */
.create-post-container {
    background: rgba(20, 20, 35, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    width: 90%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.create-post-container select, 
.create-post-container textarea {
    background: #1a1b29;
    color: white;
    border: 1px solid #4338ca;
    padding: 10px;
    border-radius: 8px;
    outline: none;
    font-size: 0.95rem;
}

.create-post-container textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 10px;
}

/* Responsive Media Queries für Handy */
@media (max-width: 768px) {
    .main-title {
        font-size: 1.8rem;
    }
    .top-controls, .events-container, .news-container, .create-post-container {
        width: 95% !important;
        padding: 12px;
    }
    .news-actions, .event-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .action-btn {
        justify-content: center;
    }
}

/* ==========================================
   RESPONSIVE MEDIA QUERIES FÜR HANDYS
   ========================================== */
@media (max-width: 600px) {
    .news-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .action-btn {
        flex: 1 1 calc(50% - 8px);
        justify-content: center;
        font-size: 12px;
        padding: 8px;
    }

    .comment-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .comment-text {
        font-size: 13px;
    }

    .comment-submit-btn {
        width: 100%;
        border-radius: 6px;
        padding: 10px;
    }
}

/* Eigene Media-Query nur für die Navbar auf Handys */
@media (max-width: 768px) {
    .navbar {
        padding: 0 8px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Suchleiste wird hier explizit auf dem Handy eingeblendet und angepasst */
    .nav-center {
        display: flex !important;
        flex: 1;
        max-width: 150px;
        margin: 0 5px;
    }

    .volume-slider {
        width: 40px;
    }
}

/* Responsives Design für News & Kommentare auf Handys */
@media (max-width: 768px) {
    .news-box {
        padding: 12px !important;
        margin: 10px 5px !important;
    }
    
    .comment-item {
        font-size: 13px !important;
    }

    .reply-item {
        margin-left: 10px !important; /* Auf Handys weniger Einrückung, damit es nicht gequetscht wird */
        padding: 6px !important;
    }

    /* Inputs und Buttons auf volle Breite oder handfreundlich anpassen */
    .comment-input, .edit-box input, .reply-box input, .edit-reply-box input {
        width: 100% !important;
        margin-bottom: 6px;
    }

    .comment-actions-bar, .comment-actions, .reply-item .comment-actions {
        flex-wrap: wrap;
        gap: 6px !important;
    }

    button.c-submit-edit-btn, button.c-submit-reply-btn, button.c-submit-edit-reply-btn {
        width: 100% !important;
    }
}
