/* --- 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;
}

.pagination .page-link {
    margin: 0 3px;
    transition: all 0.2s ease;
    color: #333;
    font-weight: 500;
}
.pagination .page-link:hover {
    background-color: #ffc107; 
    color: #000;
    transform: translateY(-2px);
}
.pagination .page-item.active .page-link {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
}
.pagination .page-item.disabled .page-link {
    background-color: #f8f9fa;
    opacity: 0.6;
}

/* --- 9. TEXT-ONLY QUOTE CARDS (PREMIUM DESIGN V2) --- */

.quote-text-card {
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 320px; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1; /* Wichtig für das Hintergrund-Icon */
}

/* Die Haupt-Typografie für die Zitate */
.quote-body {
    font-size: 1.4rem;
    line-height: 1.5;
    margin-bottom: 2rem;
    z-index: 2;
    position: relative;
}
.quote-body.long-text {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Der Autor */
.quote-author {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    z-index: 2;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto; 
}

/* Der Footer (Views, User) */
.quote-meta-footer {
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
    position: relative;
}

/* =========================================
   THEME 1: THE EDITORIAL (White)
   ========================================= */
.theme-light {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.06) !important;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03) !important;
}
.theme-light .quote-mark-icon {
    color: #f3f4f6;
    font-size: 6rem;
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: -1; /* Schiebt das Icon in den Hintergrund */
    line-height: 1;
}
.theme-light .quote-body {
    font-family: 'Georgia', serif;
    color: #1f2937;
    margin-top: 1.5rem; 
}
.theme-light .quote-author::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 2px;
    background-color: #3b82f6; 
}
.theme-light .quote-author { color: #4b5563; }
.theme-light .quote-meta-footer { border-top: 1px solid #f3f4f6; color: #9ca3af; }

/* =========================================
   THEME 2: THE MIDNIGHT (Dark)
   ========================================= */
.theme-dark {
    background: radial-gradient(circle at top right, #374151, #111827);
    text-align: center;
    color: white;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2) !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
}
.theme-dark .quote-mark-icon {
    color: rgba(255,255,255,0.03);
    font-size: 14rem;
    position: absolute;
    bottom: -3rem;
    right: -2rem;
    z-index: -1;
    line-height: 1;
}
.theme-dark .quote-body {
    font-family: 'Georgia', serif;
    font-style: italic;
    color: #f9fafb; /* DIESE ZEILE HAT DEIN TEXT WEISS GEMACHT */
    display: flex;
    flex-grow: 1;
    align-items: center; 
    justify-content: center;
}
.theme-dark .quote-author {
    color: #d1d5db;
    justify-content: center;
}
.theme-dark .quote-meta-footer { border-top: 1px solid rgba(255,255,255,0.1); color: #9ca3af; }

/* =========================================
   THEME 3: NEO-BRUTALISM (Yellow Pop)
   ========================================= */
.theme-yellow {
    background: #ffca28;
    text-align: left;
    color: #111827;
    box-shadow: 6px 6px 0px rgba(17, 24, 39, 1) !important; 
    border: 2px solid #111827 !important;
}
.theme-yellow:hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px rgba(17, 24, 39, 1) !important;
}
.theme-yellow .quote-badge {
    display: inline-flex;
    align-items: center;
    background: #111827;
    color: #ffca28;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    align-self: flex-start;
    z-index: 2;
}
.theme-yellow .quote-body {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #111827;
}
.theme-yellow .quote-author { color: #111827; }
.theme-yellow .quote-meta-footer { border-top: 2px solid rgba(17,24,39,0.1); color: #111827; font-weight: 600; }