:root {
    --bg-color: #0b0f19;
    --bg-gradient: radial-gradient(circle at 50% 0%, #1e293b 0%, #0b0f19 70%);
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-hover: rgba(51, 65, 85, 0.85);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(56, 189, 248, 0.3);
    --accent: #38bdf8;
    --shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.4);
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-color);
    background-image: var(--bg-gradient);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* SIDEBAR STYLES */
.sidebar {
    width: var(--sidebar-width);
    background-color: rgba(11, 15, 25, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 100;
}

.sidebar.collapsed { width: var(--sidebar-collapsed-width); }

.sidebar-header {
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    justify-content: space-between;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    pointer-events: none;
    display: none;
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.toggle-btn:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

/* Macht die Hamburger-Men?-Icons auf allen Ger?ten sichtbar */
.toggle-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.nav-links {
    list-style: none;
    padding: 20px 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-muted);
    text-decoration: none;
    gap: 16px;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.nav-item:hover {
    background: rgba(56, 189, 248, 0.08);
    color: var(--text-main);
}

.nav-item.active {
    background: rgba(56, 189, 248, 0.12);
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}

.nav-icon {
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-text { transition: opacity 0.2s; }
.sidebar.collapsed .nav-text { opacity: 0; display: none; }

/* MAIN CONTENT STYLES */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

/* Macht die Desktop-Kopfzeile feststehend (Sticky) */
.content-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin: -40px -40px 30px -40px;
    padding: 30px 40px 20px 40px;
    border-bottom: 1px solid var(--border-color);
}

h1 {
    font-size: 2.4rem;
    margin: 0 0 8px 0;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

p.subtitle {
    color: var(--text-muted);
    margin: 0;
    font-size: 1.05rem;
    font-weight: 400;
}

.content-area {
    background-color: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    flex: 1;
}

/* MOBILE RESPONSIVE */
.mobile-header { display: none; }

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 65px; /* Startet erst unter der mobilen Kopfzeile */
        height: calc(100vh - 65px);
        transform: translateX(0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 100;
    }
    
    .sidebar.mobile-hidden { transform: translateX(-100%); }
    
    .main-content {
        padding: 20px;
        padding-top: 85px; /* Schiebt den Inhalt unter die fixe Leiste */
    }
    
    /* Feststehende Leiste oben auf dem Handy */
    .mobile-header {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 65px;
        background-color: rgba(11, 15, 25, 0.95);
        backdrop-filter: blur(10px);
        align-items: center;
        padding: 0 20px;
        border-bottom: 1px solid var(--border-color);
        z-index: 110; /* H?her als die Sidebar, damit der Men?-Button immer klickbar ist */
    }
    
    /* ?berschrift auf dem Handy normal im Fluss lassen (kein sticky auf Mobile n?tig) */
    .content-header {
        position: static !important;
        margin: 0 0 20px 0 !important;
        padding: 0 !important;
        background: transparent !important;
        backdrop-filter: none !important;
        border-bottom: none !important;
    }
}

}
