/* ============================================================
   BLYP — Main Stylesheet
   assets/css/style.css
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Tamil:wght@400;600;700&family=Noto+Sans+Bengali:wght@400;600;700&family=Noto+Sans+Telugu:wght@400;600;700&family=Noto+Sans+Devanagari:wght@400;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

/* ── RESET & BASE ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg:           #0e0e0e;
    --sidebar-bg:   #141414;
    --card-bg:      #1a1a1a;
    --orange:       #ff5c00;
    --orange-light: #ff7a2e;
    --text:         #f0f0f0;
    --muted:        #888;
    --border:       #2a2a2a;
    --font-main:    'Poppins', sans-serif;
}

html, body { height: 100%; overflow-x: hidden; }

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    display: flex;
}

a { text-decoration: none; color: inherit; }

/* ── SIDEBAR ── */
.sidebar {
    width: 210px;
    min-width: 210px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    border-right: 1px solid var(--border);
    overflow-y: auto;
    overflow-x: hidden;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 22px 20px 24px;
    flex-shrink: 0;
}

.logo-icon {
    width: 38px; height: 38px;
    background: var(--orange);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    color: #fff;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: var(--orange);
    letter-spacing: -0.5px;
}

.logo-badge {
    width: 8px; height: 8px;
    background: #a855f7;
    border-radius: 50%;
    margin-bottom: 14px;
    margin-left: -4px;
}

/* Nav */
nav { flex: 1; padding: 4px 0; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    cursor: pointer;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 0;
}

.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }

.nav-item.active {
    background: var(--orange);
    color: #fff;
    border-radius: 8px;
    margin: 2px 10px;
    padding: 11px 12px;
}

.nav-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }

/* Language Section */
.lang-section {
    padding: 16px 14px 10px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.lang-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 10px;
}

.lang-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13.5px;
    margin-bottom: 3px;
    transition: background 0.2s;
    font-family: var(--font-main);
}

.lang-item:hover { background: rgba(255,255,255,0.05); }
.lang-item.active { color: var(--orange); font-weight: 600; }
.lang-check { color: var(--orange); font-size: 13px; }

/* Premium Box */
.premium-box {
    margin: 12px 12px 16px;
    background: linear-gradient(135deg, #1c1c1c, #252525);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    flex-shrink: 0;
}

.premium-logo { color: var(--orange); font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.premium-text { font-size: 11px; color: var(--muted); margin-bottom: 10px; line-height: 1.5; }

.btn-premium {
    width: 100%;
    background: linear-gradient(90deg, var(--orange), #e91e8c);
    border: none;
    border-radius: 8px;
    padding: 9px;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: var(--font-main);
}

.btn-premium:hover { opacity: 0.88; }

/* ── MAIN ── */
.main {
    margin-left: 210px;
    flex: 1;
    min-height: 100vh;
}

/* ── TOPBAR ── */
.topbar {
    position: sticky; top: 0;
    z-index: 50;
    background: rgba(14,14,14,0.9);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 28px;
    border-bottom: 1px solid var(--border);
}

.search-wrap {
    flex: 1;
    max-width: 440px;
    position: relative;
}

.search-wrap input {
    width: 100%;
    background: #1e1e1e;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 10px 18px 10px 42px;
    color: var(--text);
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.2s;
    font-family: var(--font-main);
}

.search-wrap input:focus { border-color: var(--orange); }
.search-wrap input::placeholder { color: var(--muted); }

.search-icon {
    position: absolute;
    left: 15px; top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 15px;
    pointer-events: none;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* Language Dropdown in Topbar */
.lang-dropdown-wrap { position: relative; }

.lang-picker-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #1e1e1e;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-main);
    color: var(--text);
    transition: border-color 0.2s;
    white-space: nowrap;
}

.lang-picker-btn:hover { border-color: var(--orange); }
.lang-picker-btn .caret { font-size: 10px; color: var(--muted); }

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1e1e1e;
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 160px;
    overflow: hidden;
    display: none;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    z-index: 200;
}

.lang-dropdown.open { display: block; }

.lang-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    cursor: pointer;
    font-size: 13.5px;
    transition: background 0.15s;
    font-family: var(--font-main);
}

.lang-dropdown-item:hover { background: rgba(255,255,255,0.06); }
.lang-dropdown-item.active { color: var(--orange); font-weight: 600; }
.lang-dropdown-item .flag { font-size: 16px; }
.lang-dropdown-item .tick { color: var(--orange); }

/* Notification Bell */
.notif-btn {
    position: relative;
    background: #1e1e1e;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: border-color 0.2s;
}

.notif-btn:hover { border-color: var(--orange); }

.notif-badge {
    position: absolute;
    top: -3px; right: -3px;
    background: var(--orange);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

.avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid var(--orange);
    object-fit: cover;
    cursor: pointer;
}

/* ── HERO BANNER ── */
.hero {
    position: relative;
    margin: 20px 24px 0;
    border-radius: 16px;
    overflow: hidden;
    height: 390px;
}

.hero-bg {
    position: absolute; inset: 0;
    background: url('https://images.unsplash.com/photo-1518834107812-67b0b7c58434?w=1200&h=600&fit=crop') center/cover no-repeat;
    filter: brightness(0.5);
    transition: opacity 0.6s;
}

.hero-gradient {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(14,14,14,0.94) 28%, transparent 70%),
                linear-gradient(0deg, rgba(14,14,14,0.55) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 40px 44px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,92,0,0.12);
    border: 1px solid rgba(255,92,0,0.4);
    color: var(--orange);
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 14px;
    width: fit-content;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 14px rgba(0,0,0,0.6);
    /* Font switches via JS based on language */
}

.hero-subtitle {
    color: var(--orange-light);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.hero-meta {
    display: flex;
    gap: 0;
    font-size: 13px;
    color: #ccc;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.hero-meta .dot-sep {
    margin: 0 8px;
    color: #555;
}

.hero-desc {
    font-size: 13px;
    color: #bbb;
    max-width: 380px;
    line-height: 1.65;
    margin-bottom: 24px;
}

.hero-actions { display: flex; gap: 12px; align-items: center; }

.btn-watch {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 26px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    font-family: var(--font-main);
}

.btn-watch:hover { background: var(--orange-light); transform: translateY(-1px); }

.btn-mylist {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    font-family: var(--font-main);
}

.btn-mylist:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); }

/* Hero dots */
.hero-dots {
    position: absolute;
    bottom: 20px; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 6px;
    z-index: 3;
}

.dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.28);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background: var(--orange);
    width: 22px;
    border-radius: 4px;
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 3;
    font-size: 18px;
    transition: background 0.2s;
    line-height: 1;
}

.hero-nav:hover { background: rgba(255,92,0,0.65); }
.hero-nav.prev { left: 14px; }
.hero-nav.next { right: 14px; }

/* ── PAGE CONTENT ── */
.content { padding: 0 24px 50px; }

.section { margin-top: 34px; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-title .s-arrow { color: var(--orange); font-size: 20px; }

.view-all {
    color: var(--orange);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.view-all:hover { opacity: 0.75; }

/* ── CARDS ROW ── */
.row-wrap { position: relative; }

.cards-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.cards-row::-webkit-scrollbar { height: 4px; }
.cards-row::-webkit-scrollbar-track { background: transparent; }
.cards-row::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.scroll-arrow {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20,20,20,0.92);
    border: 1px solid var(--border);
    color: #fff;
    width: 32px; height: 54px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 16px;
    z-index: 5;
    transition: background 0.2s;
}

.scroll-arrow:hover { background: var(--orange); }

/* ── TRENDING CARD ── */
.trend-card {
    min-width: 158px;
    max-width: 158px;
    position: relative;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.25s;
}

.trend-card:hover { transform: scale(1.045); }

.trend-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.trend-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.88) 0%, transparent 55%);
}

.trend-rank {
    position: absolute;
    top: 10px; left: 10px;
    background: rgba(14,14,14,0.82);
    border: 1px solid rgba(255,92,0,0.5);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--orange);
    display: flex; align-items: center; gap: 4px;
}

.trend-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 10px 10px 12px;
}

.trend-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
}

.trend-genre { font-size: 11px; color: #aaa; }

/* ── GENRE PILLS ── */
.genres-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.genre-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    color: #fff;
}

.genre-pill:hover { opacity: 0.82; transform: translateY(-2px); }

/* ── CONTINUE WATCHING ── */
.cw-card {
    min-width: 222px;
    max-width: 222px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg);
    transition: transform 0.25s;
}

.cw-card:hover { transform: scale(1.03); }

.cw-thumb { position: relative; }

.cw-thumb img {
    width: 100%;
    height: 128px;
    object-fit: cover;
    display: block;
}

.cw-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    background: rgba(255,92,0,0.88);
    color: #fff;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
}

.cw-card:hover .cw-play { opacity: 1; }

.progress-bar { height: 3px; background: #2e2e2e; }

.progress-fill { height: 100%; background: var(--orange); }

.cw-info { padding: 8px 10px 10px; }

.cw-title {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cw-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
}

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
    .sidebar { width: 64px; min-width: 64px; }
    .logo-text, .logo-badge, .nav-item span:not(.nav-icon),
    .lang-section, .premium-box { display: none; }
    .nav-item { padding: 13px; justify-content: center; }
    .nav-item.active { margin: 2px 6px; padding: 13px; }
    .main { margin-left: 64px; }
}

@media (max-width: 600px) {
    .hero { height: 280px; margin: 12px 12px 0; }
    .hero-title { font-size: 28px; }
    .topbar { padding: 10px 14px; }
    .content { padding: 0 12px 40px; }
}