/* 1. RESET & FONTS */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #0b0b0d;
    color: #ffffff;
    font-family: 'Inter', -apple-system, sans-serif;
    display: flex;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* Logo link styling */
.logo-link {
    text-decoration: none;
    color: inherit; /* Behoudt de witte/roze kleur die je al had */
    display: inline-block;
}

.logo-link:hover, 
.logo-link:visited, 
.logo-link:active {
    text-decoration: none;
    color: inherit;
}

/* 2. MOBILE HEADER & LOGO */
.mobile-header {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 60px;
    background: rgba(18, 18, 22, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #25252b;
    z-index: 3000;
    align-items: center;
    padding: 0 20px;
    justify-content: space-between;
}

.hamburger span {
    width: 25px; height: 3px;
    background: white;
    border-radius: 2px;
}

.logo-white { color: #ffffff !important; }
.logo, .mobile-logo { color: #ff007a; font-weight: 800; }
.mobile-logo { color: #ffffff; font-weight: bold; font-size: 20px; }

/* 3. SIDEBAR STYLING */
.sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #0b0b0d;
    border-right: 1px solid #1a1a1e;
    display: flex;
    flex-direction: column;
    padding: 20px;
    z-index: 2000;
    transition: transform 0.3s ease;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff; 
    margin-bottom: 40px;
    letter-spacing: -1px;
}

.nav-links li {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 12px;
    color: #b5b5b5;
    font-weight: 500;
    list-style: none;
    cursor: pointer;
    transition: 0.2s;
}

.nav-links li:hover, .nav-links li.active {
    background-color: #1a1a1e;
    color: white;
}

.nav-links.secondary {
    margin-top: auto;
    border-top: 1px solid #1a1a1e;
    padding-top: 20px;
}

/* 4. MAIN CONTENT AREA (INDEX) */
.main-content {
    flex: 1;
    overflow-y: auto;
    background-color: #0b0b0d;
    padding: 20px 40px;
}

.desktop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-filters { display: flex; gap: 20px; }
.filter-item { color: #b5b5b5; font-weight: 600; cursor: pointer; }
.filter-item.active { color: #ffffff; border-bottom: 2px solid #ff007a; padding-bottom: 5px; }

.header-auth { display: flex; gap: 15px; }
.create-account-btn { background: transparent; border: 1px solid #333; color: white; padding: 8px 16px; border-radius: 8px; cursor: pointer; }
.login-btn { background: white; color: black; border: none; padding: 8px 16px; border-radius: 8px; cursor: pointer; }

/* 5. PROMO SLIDER */
.promo-slider {
    width: 100%;
    height: 320px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    margin-bottom: 40px;
}

.slider-container { display: flex; height: 100%; transition: transform 0.5s ease; }
.slide { min-width: 100%; position: relative; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-content { position: absolute; bottom: 40px; left: 40px; z-index: 10; }
.slide-content h2 { font-size: 32px; font-weight: 800; margin-bottom: 15px; }
.slider-btn { background: #ff007a; color: white; border: none; padding: 12px 24px; border-radius: 12px; font-weight: 700; cursor: pointer; }

/* 6. STORY BAR */
.story-bar { display: flex; gap: 20px; margin-bottom: 40px; overflow-x: auto; padding-bottom: 10px; }
.story-circle { display: flex; flex-direction: column; align-items: center; min-width: 80px; gap: 8px; }
.circle-inner { width: 75px; height: 75px; border-radius: 50%; border: 2px solid #ff007a; padding: 3px; }
.circle-inner img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* 7. GRID & CARDS (INDEX) */
.character-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.card { background-color: #1a1a1e; border-radius: 24px; overflow: hidden; position: relative; text-decoration: none; transition: transform 0.3s; }
.card:hover { transform: translateY(-5px); }
.video-container { height: 380px; position: relative; }
.video-container video { width: 100%; height: 100%; object-fit: cover; }

.live-tag {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-tag::before { content: ""; width: 8px; height: 8px; background-color: #4ade80; border-radius: 50%; box-shadow: 0 0 8px #4ade80; }

.card-overlay { position: absolute; bottom: 0; width: 100%; padding: 16px; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); }
.chat-btn { background: #6366f1; color: white; border: none; width: 100%; padding: 10px; border-radius: 50px; font-weight: 700; cursor: pointer; margin-top: 10px; }

/* 8. DETAILPAGINA ELEMENTEN (SPLIT SCREEN FIX) */
.chat-page {
    flex: 1;
    display: flex;
    flex-direction: row; /* Desktop: Video links, Chat rechts */
    height: 100%;
    overflow: hidden;
    background-color: #0b0b0d;
}

.detail-video-header {
    flex: 0 0 45%; /* Behoudt 45% breedte voor de portrait video */
    height: 100%;
    position: relative;
    background: #000;
    border-right: 1px solid #1a1a1e;
}

.detail-video-header video { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; /* Zorgt dat de portrait video niet wordt afgesneden */
}

.video-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px; /* Iets compacter voor mobiel */
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    z-index: 10; /* Verhoogd om boven de video te blijven */
    pointer-events: none; /* Zorgt dat je door de tekst heen op de video kunt klikken indien nodig */
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #0b0b0d;
    height: 100%;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 20px;
}

.message { max-width: 85%; padding: 12px 16px; border-radius: 15px; font-size: 15px; line-height: 1.4; }
.message.ai { background: #1a1a1e; align-self: flex-start; border-bottom-left-radius: 2px; }
.message.user { background: #6366f1; align-self: flex-end; border-bottom-right-radius: 2px; }

.chat-input-area {
    flex-shrink: 0;
    display: flex;
    gap: 10px;
    background: #1a1a1e;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid #282828;
}

.chat-input-area input { flex: 1; background: transparent; border: none; color: white; outline: none; font-size: 16px; }
.chat-input-area button { background: #ff007a; color: white; border: none; padding: 10px 24px; border-radius: 12px; font-weight: 700; cursor: pointer; }

/* 9. RESPONSIVE LOGICA */
@media (max-width: 900px) {
    .mobile-header { display: flex; }
    .sidebar { position: fixed; transform: translateX(-100%); height: 100%; }
    .sidebar.open { transform: translateX(0); }
    
    .main-content { padding-top: 80px; padding-left: 20px; padding-right: 20px; }
    
    .chat-page {
        flex-direction: column;
        padding-top: 60px;
        height: 100vh; /* Forceer volledige hoogte */
        height: 100dvh;
    }

.detail-video-header {
        flex: 0 0 40%; /* Iets groter maken zodat de tekst ruimte heeft */
        width: 100%;
        position: relative; /* Cruciaal voor de absolute overlay */
        border-right: none;
        border-bottom: 1px solid #1a1a1e;
        overflow: hidden; /* Voorkomt dat video buiten de container komt */
    }

    .detail-video-header video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Zorg dat de chat-container de rest van de ruimte vult en niet scrolt als geheel */
    .chat-container {
        flex: 1;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        padding: 10px;
    }

    .chat-history {
        flex: 1;
        overflow-y: auto;
    }

    .promo-slider { height: 200px; }
    .slide-content h2 { font-size: 20px; }
    .desktop-header { display: none; }
}