/* ===== VARIABLES & RESET ===== */
: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;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

[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;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
}

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

/* ===== BASE STYLES ===== */
html, body {
    height: 100%;
    overflow-x: hidden;
}

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

/* ===== FIXED NAVBAR ===== */
.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; 
    transition: all 0.3s;
}

.search-text-btn:hover {
    color: var(--accent);
    transform: scale(1.05);
}

.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 CONTAINER ===== */
main { 
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin: 0 auto; 
    padding: 10px 0 85px; 
}

/* ===== VIEW CONTAINERS ===== */
#home-view,
#anime-view,
#recent-view,
#favorite-view,
#developer-view,
#detail-view,
#watch-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
}

/* ===== BOTTOM NAVIGATION ===== */
.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, transform 0.3s ease;
}

.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); 
}

/* ===== CONTENT CONTAINERS ===== */
.search-results-container,
#category-results-container,
#recent-results-container,
#favorite-results-container {
    flex: 1;
    width: 100%;
    padding: 0 20px 30px;
}

/* ===== EMPTY STATE ===== */
.empty-state { 
    padding: 60px 20px; 
    text-align: center; 
    color: var(--text-muted); 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.empty-state h2 { 
    font-size: 1.5rem; 
    margin-bottom: 10px; 
    color: var(--text-main); 
}

.empty-state p {
    font-size: 0.9rem;
}

/* ===== DEVELOPER VIEW ===== */
#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: linear-gradient(135deg, var(--primary), var(--accent));
}

.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;
}

.social-avatar-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-card);
    padding: 4px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.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: all 0.2s;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.social-follow-btn:hover {
    transform: scale(1.05);
    background: var(--primary);
    color: white;
}

.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;
    transition: all 0.3s;
}

.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 SECTIONS ===== */
.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: all 0.2s; 
}

.more-link:hover { 
    color: var(--text-main); 
    text-decoration: underline; 
    transform: translateX(5px);
}

/* ===== HORIZONTAL SCROLL ===== */
.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: all 0.3s ease; 
}

.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; 
    transition: transform 0.3s;
}

.scroll-card:hover .scroll-card-img img {
    transform: scale(1.05);
}

.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); 
}

/* ===== ANIME GRID ===== */
.anime-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); 
    gap: 12px; 
    margin-top: 20px; 
}

/* ===== DETAIL & WATCH VIEW ===== */
#detail-view, #watch-view { 
    padding: 0 20px; 
    max-width: 1200px; 
    margin: 0 auto; 
    width: 100%;
}

.hidden { 
    display: none !important; 
}

/* ===== NAV BACK BUTTON ===== */
.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; 
    transition: all 0.3s;
}

.nav-back button:hover { 
    color: var(--text-main); 
    transform: translateX(-3px);
}

.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: all 0.2s; 
}

.btn-fav-detail:hover {
    transform: scale(1.1);
}

.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; 
    transition: all 0.3s;
}

.genre-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.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: all 0.3s; 
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); 
    white-space: nowrap; 
}

.btn-action:hover { 
    opacity: 0.9; 
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.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: all 0.3s; 
}

.ep-box:hover { 
    color: white; 
    border-color: var(--primary); 
    background: rgba(59, 130, 246, 0.1); 
    transform: translateY(-2px);
}

/* ===== VIDEO PLAYER - FIXED ===== */
.video-wrapper { 
    position: relative; 
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 20px;
}

#video-player { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    border: none; 
    background: #000;
}

.video-main-title { 
    font-size: 1.2rem;
    margin: 15px 10px 10px;
    color: var(--text-primary);
    font-weight: 600;
}

.server-label { 
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 10px 8px;
    font-weight: 500;
}

.server-list { 
    display: flex; 
    flex-wrap: wrap;
    gap: 10px; 
    margin-top: 15px; 
    margin-bottom: 20px; 
    padding: 0 10px;
}

.server-tag { 
    background: var(--bg-input);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    transition: all 0.3s;
}

.server-tag:hover { 
    background: var(--gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}

.server-tag.active { 
    background: var(--gradient);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* ===== LOADING SPINNER ===== */
.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 SLIDER ===== */
.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); 
}

/* ===== GENRE GRID ===== */
.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);
    transform: translateY(-2px);
}

/* ===== MOBILE RESPONSIVE ===== */
@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; 
    }
    
    .hero-slider { 
        border-radius: 0; 
        margin-left: -20px; 
        margin-right: -20px; 
        width: calc(100% + 40px); 
    }
    
    .hero-content { 
        bottom: 15px; 
        left: 20px; 
        right: 20px; 
    }
    
    .hero-title { 
        font-size: 1.1rem; 
    }
    
    .hero-btn { 
        width: fit-content; 
        padding: 6px 16px; 
        font-size: 0.85rem; 
    }
    
    .server-tag {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .video-main-title {
        font-size: 1rem;
    }
}

/* ===== TABLET RESPONSIVE ===== */
@media (min-width: 501px) and (max-width: 768px) { 
    .hero-slider { 
        padding-top: 56.25%; 
    } 
    
    .hero-title { 
        font-size: 1.4rem; 
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* ===== DESKTOP RESPONSIVE ===== */
@media (min-width: 1024px) {
    body {
        padding-top: 95px;
        max-width: 1400px;
        margin: 0 auto !important;
    }
    
    /* Navbar Desktop */
    .navbar {
        max-width: 1400px;
        left: 50%;
        transform: translateX(-50%);
        height: 85px;
        padding: 0 40px;
        border-radius: 0 0 20px 20px;
        background: var(--navbar-bg);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
    }
    
    .top-logo {
        width: 56px;
        height: 56px;
    }
    
    .top-search-bar {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .top-search-bar input {
        font-size: 1rem;
    }
    
    .search-text-btn {
        font-size: 1rem;
        padding: 8px 16px;
        border-radius: 30px;
        transition: all 0.3s;
    }
    
    .search-text-btn:hover {
        background: var(--primary);
        color: white;
    }
    
    /* Bottom Navigation Desktop */
    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        bottom: 20px;
        border-radius: 40px;
        height: 70px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
        border: 1px solid var(--border-color);
        background: var(--bottom-nav-bg);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
    }
    
    .bottom-nav.hidden {
        display: none !important;
    }
    
    .nav-item {
        font-size: 0.85rem;
    }
    
    .nav-item:hover svg {
        transform: translateY(-3px);
    }
    
    /* Main Content Desktop */
    main {
        padding: 20px 40px 100px;
    }
    
    /* Hero Slider Desktop */
    .hero-slider {
        border-radius: 24px;
        margin-top: 20px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }
    
    .hero-content {
        bottom: 40px;
        left: 40px;
    }
    
    .hero-badge {
        font-size: 0.9rem;
        padding: 6px 14px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .hero-meta {
        font-size: 1rem;
        gap: 25px;
    }
    
    .hero-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    /* Horizontal Scroll Desktop */
    .horizontal-scroll {
        gap: 24px;
    }
    
    .scroll-card {
        min-width: 180px;
        max-width: 180px;
    }
    
    .scroll-card-img {
        border-radius: 12px;
    }
    
    .scroll-card-title {
        font-size: 1rem;
    }
    
    /* Category Section Desktop */
    .category-section {
        padding-left: 0;
        margin-bottom: 50px;
    }
    
    .header-flex {
        padding-right: 0;
    }
    
    h2, h3 {
        font-size: 1.5rem;
    }
    
    .bar-accent {
        width: 6px;
        height: 30px;
    }
    
    .more-link {
        font-size: 1rem;
    }
    
    .more-link:hover {
        transform: translateX(5px);
    }
    
    /* Grid Layout Desktop */
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 25px;
    }
    
    /* Detail View Desktop */
    #detail-view {
        padding: 0;
    }
    
    .detail-main-layout {
        gap: 40px;
        margin-bottom: 40px;
    }
    
    .detail-poster {
        width: 250px;
        border-radius: 12px;
    }
    
    .detail-title {
        font-size: 2.5rem;
    }
    
    .detail-subtitle {
        font-size: 1rem;
    }
    
    .detail-synopsis {
        font-size: 1rem;
        max-height: 150px;
    }
    
    .badge {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
    
    .detail-actions {
        gap: 20px;
    }
    
    .btn-action {
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .btn-action:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    }
    
    .metadata-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
        padding: 30px 0;
    }
    
    .ep-header-title {
        font-size: 1.5rem;
    }
    
    .episode-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 15px;
    }
    
    .ep-box {
        padding: 15px 10px;
        font-size: 1rem;
        border-radius: 8px;
    }
    
    .ep-box:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
    }
    
    /* Watch View Desktop */
    #watch-view {
        padding: 0;
    }
    
    .video-wrapper {
        border-radius: 20px;
        margin-bottom: 25px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }
    
    .video-main-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .server-list {
        gap: 12px;
    }
    
    .server-tag {
        padding: 10px 20px;
        font-size: 0.95rem;
        border-radius: 8px;
        transition: all 0.3s;
    }
    
    .server-tag:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
    }
    
    /* Developer View Desktop */
    .social-profile-container {
        max-width: 800px;
        border-radius: 24px;
    }
    
    .social-banner {
        height: 180px;
    }
    
    .social-avatar-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .social-follow-btn {
        padding: 10px 30px;
        font-size: 1rem;
    }
    
    .social-name {
        font-size: 1.8rem;
    }
    
    .social-bio {
        font-size: 1rem;
        max-width: 600px;
    }
    
    .social-stats {
        gap: 30px;
    }
    
    .stat-item {
        font-size: 1rem;
    }
    
    .doc-card h4 {
        font-size: 1.1rem;
    }
    
    .doc-card p {
        font-size: 1rem;
    }
    
    /* Genre Grid Desktop */
    .genre-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .genre-btn {
        padding: 12px 8px;
        font-size: 0.95rem;
        border-radius: 12px;
    }
    
    .genre-btn:hover {
        transform: translateY(-3px);
    }
    
    /* Loading Spinner Desktop */
    .spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }
    
    #loading p {
        font-size: 1rem;
    }
}

/* ===== EXTRA LARGE DESKTOP ===== */
@media (min-width: 1400px) {
    body {
        max-width: 1600px;
    }
    
    .navbar {
        max-width: 1600px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-slider {
        padding-top: 50%;
    }
    
    .scroll-card {
        min-width: 200px;
        max-width: 200px;
    }
    
    .anime-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .detail-poster {
        width: 300px;
    }
}

/* ===== HOVER EFFECTS FOR DESKTOP ===== */
@media (hover: hover) and (pointer: fine) {
    .nav-item:hover {
        color: var(--primary);
    }
    
    .nav-item:hover svg {
        stroke: var(--primary);
        transform: translateY(-2px);
    }
    
    .scroll-card:hover {
        transform: translateY(-8px);
    }
    
    .ep-box:hover {
        color: white;
        border-color: var(--primary);
        background: rgba(59, 130, 246, 0.1);
    }
    
    .genre-btn:hover {
        background: var(--gradient);
        color: white;
        border-color: transparent;
    }
}

/* ===== SAFE AREA FIXES ===== */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
    
    @media (min-width: 1024px) {
        .bottom-nav {
            bottom: max(20px, env(safe-area-inset-bottom));
        }
    }
}

/* ===== UTILITY CLASSES ===== */
.mt-large {
    margin-top: 20px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ===== FOCUS STATES ===== */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== SELECTION STYLING ===== */
::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}