/* 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(18, 19, 28, 0.92), rgba(12, 13, 20, 0.95)), 
                url('../Bilder & Videos/Hauptseite.jpg') no-repeat center center fixed;
    background-size: cover;
}

/* Navbar */
.navbar {
    background-color: #12131c;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(168, 85, 247, 0.3);
}

.nav-left { display: flex; align-items: center; gap: 20px; }
.menu-btn { width: 28px; height: 18px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; z-index: 1001; }
.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(7.5px) rotate(45deg); }
.menu-btn.open .bar:nth-child(2) { opacity: 0; }
.menu-btn.open .bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.logo { height: 36px; width: auto; cursor: pointer; }
.nav-center { flex-grow: 1; max-width: 450px; margin: 0 20px; }
.search-input { width: 100%; padding: 9px 18px; border-radius: 20px; border: 1px solid rgba(168, 85, 247, 0.4); outline: none; background-color: #1a1b29; color: white; }
.nav-right { display: flex; align-items: center; gap: 15px; }
.icon-link, .profile-icon { display: flex; align-items: center; cursor: pointer; }

/* Sidebar */
.sidebar {
    position: fixed;
    top: 60px;
    left: -250px;
    width: 250px;
    height: calc(100vh - 60px);
    background-color: #12131c;
    transition: left 0.3s ease;
    z-index: 999;
    border-right: 1px solid rgba(168, 85, 247, 0.3);
}
.sidebar.active { left: 0; }
.sidebar ul { list-style: none; padding: 20px; }
.sidebar ul li { margin-bottom: 15px; }
.sidebar ul li a { color: white; text-decoration: none; font-size: 18px; display: block; padding: 8px 12px; border-radius: 6px; }
.sidebar ul li a:hover, .sidebar ul li a.active { background-color: #1e1f2e; color: #a855f7; }

/* Hauptbereich */
.page-content {
    flex: 1;
    padding-top: 85px;
    padding-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.main-title {
    font-size: 2.2rem;
    background: linear-gradient(90deg, #a855f7, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

/* Chat Box Layout */
.chat-container {
    width: 90%;
    max-width: 750px;
    height: 520px;
    background: rgba(22, 24, 38, 0.95);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

/* Header */
.chat-header {
    background: #181a28;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.chat-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #e9d5ff;
}

.beta-badge {
    background: #a855f7;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 1px;
}

.chat-notice {
    font-size: 0.8rem;
    color: #888;
}

/* Chat Verlauf */
.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(14, 15, 25, 0.8);
}

.message {
    max-width: 75%;
    display: flex;
    flex-direction: column;
}

.system-message {
    align-self: center;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #d8b4fe;
    text-align: center;
    margin: 5px 0;
}

.my-message {
    align-self: flex-end;
    background: #8b5cf6;
    color: white;
    padding: 10px 14px;
    border-radius: 14px 14px 0px 14px;
}

.other-message {
    align-self: flex-start;
    background: #272a3f;
    color: #e2e8f0;
    padding: 10px 14px;
    border-radius: 14px 14px 14px 0px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.sender-name {
    font-size: 0.75rem;
    font-weight: bold;
    color: #a855f7;
    margin-bottom: 3px;
}

.message-text {
    font-size: 0.95rem;
    word-wrap: break-word;
}

.message-time {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
    margin-top: 4px;
}

/* Chat Input Bar */
.chat-input-area {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #181a28;
    border-top: 1px solid rgba(168, 85, 247, 0.25);
    gap: 10px;
}

.user-tag {
    font-size: 0.85rem;
    color: #aaa;
    white-space: nowrap;
}

.user-tag span {
    color: #a855f7;
    font-weight: bold;
}

.chat-input-area input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid rgba(168, 85, 247, 0.3);
    background: #11121d;
    color: white;
    outline: none;
    font-size: 0.95rem;
}

.chat-input-area input:focus {
    border-color: #a855f7;
}

.chat-input-area button {
    background: #a855f7;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s ease;
}

.chat-input-area button:hover {
    background: #9333ea;
}

footer {
    width: 100%;
    text-align: center;
    padding: 15px;
    font-size: 12px;
    color: #aaa;
    background-color: #12131c;
    margin-top: auto;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
}

/* ==========================================
   RESPONSIVE DESIGN (@media Queries)
   ========================================== */

/* Tablet & kleinere Bildschirme (unter 768px) */
@media (max-width: 768px) {
    .main-title {
        font-size: 1.8rem;
        text-align: center;
    }

    .chat-container {
        width: 95%;
        height: 480px;
    }

    .chat-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px 15px;
    }

    .chat-notice {
        font-size: 0.75rem;
    }

    .message {
        max-width: 85%;
    }
}

/* Smartphones (unter 480px) */
@media (max-width: 480px) {
    .navbar {
        padding: 0 10px;
    }

    .nav-center {
        margin: 0 8px;
    }

    .search-input {
        font-size: 12px;
        padding: 6px 12px;
    }

    .main-title {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    .chat-container {
        width: 98%;
        height: 75vh;
        border-radius: 8px;
    }

    .chat-messages {
        padding: 10px;
        gap: 8px;
    }

    .message {
        max-width: 90%;
    }

    .message-text {
        font-size: 0.88rem;
    }

    .chat-input-area {
        padding: 8px;
        gap: 6px;
    }

    .user-tag {
        font-size: 0.75rem;
    }

    .chat-input-area input {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .chat-input-area button {
        width: 36px;
        height: 36px;
    }
}