/* --- 1. FONTS --- */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/Inter-VariableFont_opsz,wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/Inter-Italic-VariableFont_opsz,wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: italic; font-display: swap;
}

/* --- 2. BASE STYLES --- */
body { 
    font-family: 'Inter', sans-serif;
    font-feature-settings: "cv11", "ss01";
    background-color: #f8f9fa; 
    color: #1a1a1a;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- 3. LAYOUT STRUCTURE (YouTube Style) --- */
.top-bar { 
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 64px;
    padding: 0 1.5rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #fff;
    z-index: 1200;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.sidebar { 
    width: 260px; 
    height: calc(100vh - 64px); 
    position: fixed; 
    left: 0; top: 64px; 
    background-color: #fff; 
    padding: 1rem 0; 
    z-index: 1100; 
    display: flex; 
    flex-direction: column; 
    overflow-y: auto;
    border-right: 1px solid rgba(0,0,0,0.05);
}

/* Sidebar Scrollbar Styling (Diskret wie bei YouTube) */
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: transparent; border-radius: 4px; }
.sidebar:hover::-webkit-scrollbar-thumb { background: #d1d1d1; }

.main-content { 
    margin-left: 260px; 
    min-height: 100vh;
    padding-top: 64px; 
    display: flex;
    flex-direction: column;
}

.main-wrapper { 
    padding: 2rem 1rem; 
    width: 100%;
    box-sizing: border-box;
}

/* --- 4. SEARCH BAR (YouTube Style) --- */
.search-form { flex: 1; max-width: 600px; margin: 0 2rem; }
.search-input-wrapper {
    background: #f8f8f8;
    border: 1px solid #ccc;
    border-radius: 40px;
    display: flex;
    align-items: center;
    padding: 0 4px 0 15px;
    height: 40px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.search-input-wrapper:focus-within { 
    border-color: #065fd4; 
    background: #fff; 
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}
.search-form input { 
    border: none; 
    background: transparent; 
    font-size: 0.95rem; 
    width: 100%; /* Wichtig für Flexbox */
}
.search-form input:focus { outline: none; box-shadow: none; }

/* --- 5. NAVIGATION ITEMS --- */
.sidebar-item {
    display: flex;
    align-items: center;
    padding: 0.7rem 1.5rem;
    color: #0f0f0f;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: background 0.2s, transform 0.1s;
}
.sidebar-item:hover { background: #f2f2f2; color: #0f0f0f; }
.sidebar-item.active { 
    background: #f2f2f2; 
    font-weight: 600; 
    color: #0f0f0f; 
}
.sidebar-item i { width: 24px; margin-right: 1.2rem; font-size: 1.1rem; text-align: center; }

/* --- 6. MASONRY GRID (JS-COMPATIBLE) --- */
.masonry-container { width: 100% !important; margin: 0 auto; }
.masonry-item { width: 100%; margin-bottom: 24px; }

@media (min-width: 768px) { .masonry-item { width: calc(50% - 12px); } }
@media (min-width: 1200px) { .masonry-item { width: calc(33.333% - 16px); } }
@media (min-width: 1600px) { .masonry-item { width: calc(25% - 18px); } }

/* --- 7. CARD DESIGN SYSTEM --- */
.card-custom { 
    border-radius: 16px; 
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease; 
    background-color: #fff;
    border: none !important;
    overflow: hidden;
    position: relative;
}
.card-custom:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.12) !important; 
}
.card-custom img { 
    transition: transform 0.5s ease; 
    width: 100%; 
    height: auto; 
    display: block; 
}
.card-custom:hover img { transform: scale(1.03); }

/* --- 8. RESPONSIVE --- */
@media (max-width: 991px) {
    .sidebar { 
        transform: translateX(-100%); 
        transition: transform 0.3s ease; 
        box-shadow: 10px 0 15px rgba(0,0,0,0.05);
    }
    .main-content { margin-left: 0; }
    .top-bar { padding: 0 1rem; }
    .main-wrapper { padding: 1.5rem; }
}

@media (max-width: 576px) {
    .search-form { display: none; } /* Versteckt Suche auf Mobile wie bei YT App */
    .top-bar { justify-content: space-between; }
    .main-wrapper { padding: 1rem; }
}

/* Hilfsklasse für dein JS-Dropdown */
.custom-nested-dropdown .dropdown-menu {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

.sidebar-divider {
    height: 1px;
    background: rgba(0,0,0,0.05);
    margin: 0.75rem 1.5rem;
}