@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Inter:wght@400;500;700&display=swap');

/* --- 1. Base Reset & Structure --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; width: 100%; overflow: hidden; background-color: #050505; color: white; }
body { font-family: 'Inter', sans-serif; }

/* --- 2. Background --- */
#bg-layers { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg-layer { position: absolute; inset: 0; transition: opacity 1.2s ease; opacity: 0; }
.bg-layer.active { opacity: 0.45; }
.bg-layer img { width: 100%; height: 100%; object-fit: cover; filter: blur(60px) saturate(1.4); transform: scale(1.1); }

/* --- 3. Header & Navigation (Width Matched to Content) --- */
.header-container {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 500;
    padding: 1.5rem 0; /* Padding on top/bottom, 0 on sides to allow inner width control */
    display: flex;
    justify-content: center;
}

.header-content {
    width: 100%;
    max-width: 1200px; /* Matches .episode-card width */
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left { display: flex; align-items: center; gap: 0.75rem; }
.site-icon { color: #f59e0b; width: 28px; height: 28px; }
.site-name { font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 1.4rem; letter-spacing: -0.02em; }

.header-nav { display: flex; gap: 2rem; }
.nav-link { font-family: 'Fredoka', sans-serif; text-decoration: none; color: rgba(255,255,255,0.6); transition: 0.3s; font-weight: 500; }
.nav-link.active { color: #f59e0b; font-weight: 700; }
.nav-link:hover { color: white; }

.mobile-menu-btn { display: none; background: none; border: none; color: white; cursor: pointer; }

/* --- 4. Carousel & Card --- */
#desktop-carousel-view { height: 100vh; width: 100vw; position: relative; overflow: hidden; z-index: 10; }
#carousel-container { display: flex; height: 100%; transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); }
.carousel-item { min-width: 100vw; width: 100vw; height: 100vh; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }

.episode-card {
    width: 100%; max-width: 1200px; /* Matched by header-content */
    display: flex; align-items: center; justify-content: space-between;
    position: relative; padding: 0 2rem;
}

.info-column { flex: 0 0 500px; z-index: 20; text-align: left; }
.desktop-description { display: block !important; opacity: 0.8; line-height: 1.6; margin-bottom: 2rem; }

/* --- 5. Blob & Playground --- */
.decor-wrapper {
    position: relative; width: 600px; height: 600px;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none; margin: 0 auto;
}
.mask-shadow-wrapper {
    width: 100%; height: 100%; position: relative;
    -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-type: alpha;
    filter: drop-shadow(0 25px 50px rgba(0,0,0,0.4)); pointer-events: auto;
}
.host-clipped-image { width: 100%; height: 100%; background-size: cover; background-position: center; }

/* --- 6. Floating Hosts & Hover Pause --- */
.floating-host {
    position: absolute; z-index: 100; cursor: pointer;
    pointer-events: auto !important;
    width: 120px !important; height: 120px !important;
}

.host-avatar-container {
    width: 120px !important; height: 120px !important;
    flex-shrink: 0 !important; position: relative;
    animation: floating-orbit 8s ease-in-out infinite;
}

/* FIX: Stop animation on hover so bubble stays put */
.floating-host:hover .host-avatar-container {
    animation-play-state: paused !important;
}

.host-img { width: 100%; height: 100%; object-fit: contain; position: absolute; transition: opacity 0s; }
.host-img.hover { opacity: 0; }
.floating-host:hover .host-img.normal { opacity: 0; }
.floating-host:hover .host-img.hover { opacity: 1; }

@keyframes floating-orbit {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(8px, -12px) rotate(2deg); }
    66% { transform: translate(-8px, 8px) rotate(-2deg); }
}

/* --- 7. Speech Bubbles --- */
.host-quote-bubble {
    position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%) translateY(10px);
    background: white; color: black; padding: 8px 14px; border-radius: 12px;
    font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 13px;
    white-space: nowrap; opacity: 0; visibility: hidden; transition: 0.2s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); z-index: 110;
}
.host-quote-bubble::after {
    content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: white;
}
.floating-host:hover .host-quote-bubble { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* --- 8. Mobile Responsiveness --- */
@media (max-width: 1023px) {
    .header-content { padding: 0 1.5rem; }
    .header-nav { 
        display: none; /* Hidden by default */
        position: absolute; top: 100%; left: 0; right: 0;
        background: #0a0a0a; flex-direction: column; padding: 2rem;
        gap: 1.5rem; text-align: center; border-bottom: 1px solid #222;
    }
    .header-nav.mobile-active { display: flex; }
    .mobile-menu-btn { display: block; }

    .carousel-item { align-items: flex-start; padding-top: 100px; }
    .episode-card { flex-direction: column !important; align-items: center; }

    .decor-wrapper {
        order: 1; width: 100vw; height: 35vh;
        margin-bottom: 10px;
        overflow: hidden; /* FIX: Prevents icons from bleeding into next slide */
    }

    .info-column { order: 2; width: 100%; text-align: center; }
    .desktop-description { display: none !important; }
    .mask-shadow-wrapper { width: 260px; height: 260px; }
    .floating-host, .host-avatar-container { width: 75px !important; height: 75px !important; }

    /* Constrain the sector spread on mobile */
    .host-quote-bubble { font-size: 11px; padding: 6px 10px; }
}

/* --- 9. Navigation Buttons --- */
.nav-btn {
    position: fixed; top: 50%; transform: translateY(-50%); z-index: 400;
    width: 50px; height: 50px; background: rgba(255,255,255,0.05);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: white; border: 1px solid rgba(255,255,255,0.1);
}
#prev-btn { left: 20px; }
#next-btn { right: 20px; }
