:root {
    --bg-main: #050505;       
    --bg-card: #121212;       
    --bg-input: #1e1e1e;
    --primary: #3b82f6;       
    --accent: #2563eb;        
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --gradient: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
    --navbar-bg: rgba(10, 10, 10, 0.8);
    --bottom-nav-bg: rgba(10, 10, 10, 0.95);
    --border-color: #222;
}

[data-theme="light"] {
    --bg-main: #eff2f5;       
    --bg-card: #ffffff;       
    --bg-input: #e2e6ea;
    --primary: #2563eb;       
    --accent: #1d4ed8;        
    --text-main: #212529;
    --text-muted: #6c757d;
    --gradient: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
    --navbar-bg: rgba(239, 242, 245, 0.85);
    --bottom-nav-bg: rgba(255, 255, 255, 0.95);
    --border-color: #ced4da;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    padding-top: 85px; 
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 75px;
    background: var(--navbar-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 12px; 
    z-index: 1000;
    transition: background 0.3s, border-color 0.3s;
}

.top-logo {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid transparent; 
    background-image: conic-gradient(
        from -45deg,      
        #4285F4 0% 25%,   
        #EA4335 25% 50%,  
        #FBBC05 50% 75%,  
        #34A853 75% 100%  
    );
    background-origin: border-box;
    background-clip: border-box;
    -webkit-background-clip: border-box;
    padding: 0;
    box-shadow: none;
}

.top-search-bar {
    flex: 1;
    background: var(--bg-input);
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.top-search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}
.top-search-bar svg { color: var(--text-muted); margin-right: 10px; width: 18px; height: 18px; flex-shrink: 0; }
.top-search-bar input { flex: 1; background: transparent; border: none; color: var(--text-main); font-family: 'Outfit', sans-serif; font-size: 0.95rem; outline: none; width: 100%; }
.top-search-bar input::placeholder { color: var(--text-muted); }
.search-text-btn { background: transparent; border: none; color: var(--primary); font-weight: 700; font-size: 0.95rem; cursor: pointer; padding-left: 10px; font-family: 'Outfit', sans-serif; }

.theme-toggle-btn { background: transparent; border: none; color: var(--text-main); cursor: pointer; padding: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform 0.2s, color 0.2s; }
.theme-toggle-btn:hover { color: var(--primary); transform: rotate(15deg); }

main { max-width: 100%; margin: 0 auto; padding: 10px 0 85px; flex: 1; width: 100%; }

.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; height: 65px;
    background: var(--bottom-nav-bg); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid var(--border-color); display: flex; justify-content: space-around; align-items: center;
    z-index: 1000; padding-bottom: env(safe-area-inset-bottom); transition: background 0.3s, border-color 0.3s;
}
.bottom-nav.hidden { display: none !important; }

.nav-item {
    background: transparent; border: none; color: var(--text-muted); display: flex; flex-direction: column;
    align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 600; font-family: 'Outfit', sans-serif;
    cursor: pointer; transition: all 0.3s ease; width: 20%; 
}
.nav-item svg { transition: transform 0.3s ease, stroke 0.3s; }
.nav-item:hover { color: var(--text-main); }
.nav-item.active { color: var(--primary); }
.nav-item.active svg { stroke: var(--primary); transform: translateY(-2px); }

.empty-state { padding: 60px 20px; text-align: center; color: var(--text-muted); }
.empty-state h2 { font-size: 1.5rem; margin-bottom: 10px; color: var(--text-main); }

/* --- NEW SOCIAL DEVELOPER VIEW CSS --- */
#developer-view { padding: 0 20px; }
.social-profile-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}
.social-banner {
    width: 100%;
    height: 120px;
    background: #333;
}
.social-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.social-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 20px;
    margin-top: -40px; /* Menjorok menimpa banner */
}
.social-avatar-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-card);
    padding: 4px;
    position: relative;
}
.social-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
.social-follow-btn {
    background: var(--text-main);
    color: var(--bg-main);
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: transform 0.2s;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}
.social-follow-btn:hover {
    transform: scale(1.05);
}
.social-info { padding: 10px 20px 20px; }
.social-name-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 2px;
}
.social-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
}
.verified-badge { display: inline-block; }
.social-handle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}
.social-bio {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-main);
    margin-bottom: 15px;
}
.social-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}
.stat-item { font-size: 0.95rem; }
.stat-num { font-weight: 800; color: var(--text-main); }
.stat-label { color: var(--text-muted); }
.social-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}
.social-tab {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
}
.social-tab.active {
    color: var(--text-main);
    border-bottom: 3px solid var(--primary);
}
.social-content { padding: 20px; }
.doc-card {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}
.doc-card:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.doc-card h4 { color: var(--text-main); margin-bottom: 5px; font-size: 1rem; }
.doc-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }
/* ------------------------------------------- */


.category-section { margin-bottom: 40px; padding-left: 20px; }
.header-flex { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-right: 20px; }
.section-header { display: flex; align-items: center; gap: 10px; }
.bar-accent { width: 4px; height: 24px; background: var(--primary); border-radius: 2px; box-shadow: 0 0 10px var(--primary); }
h2, h3 { font-size: 1.25rem; font-weight: 700; color: var(--text-main); }
.more-link { color: var(--primary); font-size: 0.9rem; text-decoration: none; font-weight: 500; cursor: pointer; transition: color 0.2s; }
.more-link:hover { color: var(--text-main); text-decoration: underline; }

.horizontal-scroll { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 10px; padding-right: 20px; scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; }
.horizontal-scroll::-webkit-scrollbar { display: none; }
.scroll-card { min-width: 140px; max-width: 140px; cursor: pointer; flex-shrink: 0; transition: transform 0.2s; }
.scroll-card:hover { transform: translateY(-5px); }
.scroll-card-img { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 3/4; margin-bottom: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.scroll-card-img img { width: 100%; height: 100%; object-fit: cover; }
.scroll-card-title { font-size: 0.85rem; font-weight: 500; color: var(--text-main); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-badge { position: absolute; top: 6px; right: 6px; background: var(--gradient); color: white; font-size: 0.65rem; font-weight: 700; padding: 3px 6px; border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }

.search-results-container { padding: 0 20px 30px; }
.anime-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 20px; }

#detail-view, #watch-view { padding: 0 20px; max-width: 1200px; margin: 0 auto; }
.hidden { display: none !important; }

.nav-back button { background: transparent; color: var(--text-muted); border: none; padding: 10px 0; display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 500; margin-bottom: 5px; font-size: 0.9rem; }
.nav-back button:hover { color: var(--text-main); }
.detail-breadcrumb { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 15px; }
.detail-title { font-size: 1.7rem; font-weight: 700; color: var(--text-main); line-height: 1.2; padding-right: 10px; }
.detail-subtitle { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.4; margin-top: 6px;}

.btn-fav-detail { background: transparent; border: none; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; justify-content: center; padding: 5px; transition: 0.2s; }
.btn-fav-detail.active svg { fill: #ef4444; stroke: #ef4444; }

.detail-main-layout { display: flex; gap: 20px; margin-bottom: 30px; align-items: flex-start; }
.detail-poster { width: 150px; flex-shrink: 0; border-radius: 6px; box-shadow: 0 5px 20px rgba(0,0,0,0.15); overflow: hidden; }
.detail-poster img { width: 100%; display: block; object-fit: cover; }
.detail-info-col { flex: 1; display: flex; flex-direction: column; gap: 12px; width: 100%; }

.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.badge { padding: 4px 10px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px; }
.badge.status { background: var(--gradient); color: white; text-transform: uppercase; }
.badge.score { background: var(--bg-card); color: #fbbf24; border: 1px solid var(--border-color); display: flex; align-items: center; gap: 4px; }
.badge.type { background: transparent; border: 1px solid var(--border-color); color: var(--text-muted); }

.detail-genres { display: flex; flex-wrap: wrap; gap: 8px; }
.genre-tag { background: var(--bg-input); border: 1px solid var(--border-color); color: var(--text-muted); padding: 5px 12px; border-radius: 50px; font-size: 0.8rem; }
.detail-season { border-left: 2px solid var(--text-muted); padding-left: 10px; color: var(--text-main); font-size: 0.85rem; margin: 4px 0; }

.detail-synopsis { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; max-height: 110px; overflow-y: auto; margin-bottom: 5px; padding-right: 5px; display: block; }
.detail-synopsis::-webkit-scrollbar { width: 4px; }
.detail-synopsis::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.detail-synopsis::-webkit-scrollbar-track { background: transparent; }

.detail-actions { display: flex; flex-direction: row; gap: 12px; margin-top: 10px; width: 100%; }
.btn-action { flex: 1; background: var(--gradient); color: white; border: none; padding: 12px 10px; border-radius: 6px; font-weight: 600; font-size: 0.95rem; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 6px; transition: opacity 0.2s; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); white-space: nowrap; }
.btn-action:hover { opacity: 0.9; }

.metadata-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); padding: 20px 0; margin-bottom: 30px; }
.meta-item { display: flex; flex-direction: column; gap: 6px; }
.meta-label { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; font-weight: 600; }
.meta-value { font-size: 1rem; font-weight: 700; color: var(--text-main); }
.meta-pill { background: transparent; border: 1px solid var(--border-color); border-radius: 50px; padding: 6px 14px; font-size: 0.85rem; display: inline-block; width: fit-content; color: var(--text-muted); }

.ep-header-wrapper { margin-bottom: 15px; }
.ep-header-title { font-size: 1.25rem; font-weight: 700; color: var(--text-main); margin-bottom: 8px;}
.ep-range-badge { background: var(--gradient); color: white; display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 0.85rem; font-weight: 700; }

.episode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(65px, 1fr)); gap: 10px; }
.ep-box { background: transparent; color: var(--text-muted); border: 1px solid var(--border-color); border-radius: 4px; padding: 10px 5px; text-align: center; cursor: pointer; font-weight: 500; font-size: 0.9rem; transition: 0.2s; }
.ep-box:hover { color: white; border-color: var(--primary); background: rgba(59, 130, 246, 0.1); }

@media (max-width: 500px) {
    .detail-main-layout { flex-direction: row; gap: 15px; }
    .detail-poster { width: 120px; }
    .detail-title { font-size: 1.4rem; }
    .detail-actions { flex-direction: row; gap: 8px; }
    .btn-action { padding: 10px 5px; font-size: 0.85rem; }
}

.video-wrapper { position: relative; padding-bottom: 56.25%; background: black; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); margin-bottom: 15px; }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-main-title { margin-bottom: 15px; font-size: 1.1rem; }
.server-label { color: var(--text-muted); margin-bottom: 8px; font-size: 0.85rem; }
.server-list { display: flex; gap: 8px; flex-wrap: wrap; }
.server-tag { background: var(--bg-input); padding: 6px 12px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; border: 1px solid var(--border-color); color: var(--text-main); }
.server-tag.active { background: var(--gradient); color: white; border: none; }

.spinner { border: 3px solid rgba(59,130,246,0.2); border-left-color: var(--primary); border-radius: 50%; width: 40px; height: 40px; animation: spin 0.8s linear infinite; margin: 100px auto 20px; }
#loading p { text-align: center; color: var(--text-muted); font-size: 0.9rem; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.hero-section-container { margin-bottom: 30px; }
.hero-slider { position: relative; width: 100%; padding-top: 56.25%; overflow: hidden; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); background: var(--bg-card); }
.hero-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; }
.hero-slide { min-width: 100%; height: 100%; position: relative; flex-shrink: 0; }
.hero-bg { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; position: absolute; z-index: 1; }
.hero-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, var(--bg-main) 5%, rgba(0,0,0,0.6) 50%, transparent 100%); z-index: 2; }
.hero-content { position: absolute; bottom: 20px; left: 20px; right: 20px; z-index: 3; max-width: 600px; }
.hero-badge { display: inline-block; background: var(--gradient); color: white; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 4px; margin-bottom: 10px; box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3); }
.hero-title { font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin-bottom: 8px; color: white; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-meta { display: flex; gap: 15px; color: #ddd; font-size: 0.85rem; margin-bottom: 12px; font-weight: 500; }
.hero-meta span { display: flex; align-items: center; gap: 5px; }
.hero-btn { background: #ffffff; color: #050505; border: none; padding: 8px 20px; border-radius: 50px; font-weight: 700; font-size: 0.9rem; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all 0.3s; }
.hero-btn:hover { background: var(--gradient); color: white; transform: translateY(-3px); box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4); }

@media (max-width: 768px) { .hero-slider { padding-top: 56.25%; } .hero-title { font-size: 1.4rem; } }
@media (max-width: 500px) {
    .hero-slider { padding-top: 60%; border-radius: 0; margin-left: -20px; margin-right: -20px; width: calc(100% + 40px); }
    .hero-content { bottom: 15px; left: 40px; right: 40px; }
    .hero-title { font-size: 1.1rem; }
    .hero-btn { width: fit-content; padding: 6px 16px; font-size: 0.85rem; }
}

.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; margin-bottom: 20px; }
.genre-btn {
    background: var(--bg-input); border: 1px solid var(--border-color); color: var(--text-muted); padding: 10px 5px; border-radius: 8px;
    font-family: 'Outfit', sans-serif; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.3s; text-align: center;
}
.genre-btn:hover, .genre-btn.active {
    background: var(--gradient); color: white; border-color: transparent; box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}
