:root {
    --bg: #07080f;
    --bg-soft: #11131f;
    --card: #15182a;
    --card-hover: #1c2138;
    --line: #262c45;
    --line-soft: #1c2138;
    --text: #eef0fa;
    --muted: #9aa0bd;
    --muted-2: #6b7196;
    --brand: #1e9bff;
    --brand-2: #22d3ee;
    --funny: #ffb13d;
    --action: #ff4d6d;
    --ok: #2ee59d;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 20px 60px rgba(0, 0, 0, .5);
    --glow: 0 0 0 1px rgba(30, 155, 255, .25), 0 16px 50px rgba(30, 155, 255, .25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
    background:
        radial-gradient(1100px 520px at 88% -8%, rgba(30, 155, 255, .22), transparent 60%),
        radial-gradient(900px 460px at -5% 2%, rgba(34, 211, 238, .14), transparent 55%),
        var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
::selection { background: var(--brand); color: #fff; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 22px; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }

/* ---------- Navbar ---------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(18px) saturate(160%);
    background: rgb(255 233 153 / 70%);
    border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; gap: 18px; height: 70px; }
.logo { font-weight: 800; font-size: 23px; letter-spacing: -.6px; display: flex; align-items: center; gap: 9px; }
.logo .dot { width: 13px; height: 13px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 0 18px var(--brand); animation: pulse 2.4s ease-in-out infinite; }
.logo b { background: linear-gradient(135deg, #fff 20%, var(--brand) 90%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
    
.logo-img {
    display: block;
    height: 54px; width: 216px;
    object-fit: cover; object-position: center;
    border-radius: 12px;
    box-shadow: 0 0 0 1px rgba(40, 150, 255, .25), 0 6px 20px rgba(20, 120, 255, .18);
}
.sidebar .logo-img { height: 46px; width: 184px; }
.admin-topbar .logo-img { height: 42px; width: 168px; }
.auth-card .logo-img { height: 62px; width: 240px; margin: 0 auto; }

@media (max-width: 880px) {
    .logo-img { height: 46px; width: 182px; }
}
.nav .spacer { flex: 1; }
.search { display: flex; align-items: center; gap: 9px; background: var(--bg-soft);
    border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; min-width: 240px; transition: .2s; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,155,255,.15); }
.search input { background: transparent; border: 0; outline: 0; color: var(--text); width: 100%; font-size: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
    border: 1px solid var(--line); background: var(--bg-soft); color: var(--text);
    padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: .16s;
    font-family: inherit; white-space: nowrap; }
.btn:hover { background: var(--card-hover); transform: translateY(-1px); border-color: #333a5c; }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border: 0; color: #fff;
    box-shadow: 0 8px 22px rgba(30,155,255,.35); }
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 12px 28px rgba(30,155,255,.45); }
.btn-danger { border-color: rgba(255,77,109,.4); color: #ff8095; }
.btn-danger:hover { background: rgba(255,77,109,.12); }
.btn-sm { padding: 8px 13px; font-size: 13px; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero { margin: 30px 0 6px; border-radius: 26px; overflow: hidden; position: relative;
    border: 1px solid var(--line); box-shadow: var(--shadow); animation: fadeUp .5s ease both;
    background: linear-gradient(120deg, rgba(30,155,255,.28), rgba(34,211,238,.2)), var(--card); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 340px; }
.hero-text { padding: 46px; display: flex; flex-direction: column; justify-content: center; }
.hero-text .kicker { color: #ffd0e2; font-weight: 700; letter-spacing: 2.5px; font-size: 12px; text-transform: uppercase;
    display: inline-flex; align-items: center; gap: 8px; }
.hero-text h1 { font-size: 44px; line-height: 1.08; margin: 14px 0 16px; letter-spacing: -1.2px; }
.hero-text p { color: rgba(255,255,255,.75); max-width: 470px; margin-bottom: 26px; }
.hero-media { position: relative; background: #000; overflow: hidden; }
.hero-media video, .hero-media iframe, .hero-media img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; border: 0; }
.hero-media::after { content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, var(--card) 0%, transparent 22%); pointer-events: none; }
.hero-media .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 72px; opacity: .35; animation: float 4s ease-in-out infinite; }

/* ---------- Filters ---------- */
.section-head { display: flex; align-items: center; gap: 14px; margin: 40px 0 20px; flex-wrap: wrap; }
.section-head h2 { font-size: 24px; letter-spacing: -.5px; display: flex; align-items: center; gap: 10px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { padding: 9px 17px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--bg-soft); color: var(--muted); font-size: 14px; font-weight: 600; transition: .16s; }
.chip:hover { color: var(--text); border-color: #333a5c; transform: translateY(-1px); }
.chip.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent;
    box-shadow: 0 8px 20px rgba(30,155,255,.35); }

/* ---------- Grid + Cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; transition: .2s; animation: fadeUp .45s ease both; position: relative; }
.card:hover { transform: translateY(-6px); background: var(--card-hover); box-shadow: var(--shadow); border-color: #33405e; }
.thumb { position: relative; aspect-ratio: 16/10; background: #000; overflow: hidden; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; transition: .35s; }
.card:hover .thumb img, .card:hover .thumb video { transform: scale(1.06); }
.thumb .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 50px;
    background: linear-gradient(135deg, #1b2036, #0f1119); }
.thumb::before { content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.6)); pointer-events: none; }
.thumb .play { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: .2s; z-index: 2; }
.card:hover .thumb .play { opacity: 1; }
.thumb .play span { width: 58px; height: 58px; border-radius: 50%; background: rgba(30,155,255,.85);
    display: grid; place-items: center; font-size: 22px; color: #fff; backdrop-filter: blur(4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.5); transform: scale(.8); transition: .2s; }
.card:hover .thumb .play span { transform: scale(1); }
.badge { position: absolute; top: 12px; left: 12px; z-index: 2; padding: 5px 11px; border-radius: 999px;
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: #0b0d17; }
.badge.funny { background: var(--funny); }
.badge.action { background: var(--action); color: #fff; }
.views { position: absolute; bottom: 11px; right: 11px; z-index: 2; padding: 4px 10px; border-radius: 8px;
    background: rgba(0,0,0,.55); font-size: 12px; font-weight: 600; backdrop-filter: blur(4px); }
.card-body { padding: 15px 17px 17px; }
.card-body h3 { font-size: 15.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.card-body .meta { color: var(--muted); font-size: 13px; margin-top: 7px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card-body .meta .meta-dot { opacity: .5; }

/* ---------- Hero extra ---------- */
.hero-stat { display: inline-flex; align-items: center; color: rgba(255,255,255,.85); font-weight: 600; font-size: 14px;
    background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.15); padding: 9px 16px; border-radius: 999px; }

/* ---------- Trending rail ---------- */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 18px;
    overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; }
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.rail-item { scroll-snap-align: start; }
.rail-item .thumb { position: relative; aspect-ratio: 16/10; border-radius: var(--radius-sm); overflow: hidden; background: #000; border: 1px solid var(--line); transition: .18s; }
.rail-item:hover .thumb { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow); }
.rail-item .thumb img, .rail-item .thumb video { width: 100%; height: 100%; object-fit: cover; }
.rail-item .thumb .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 40px; background: linear-gradient(135deg, #1b2036, #0f1119); }
.rail-item h4 { font-size: 14px; margin-top: 9px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Sort bar ---------- */
.sortbar { display: flex; gap: 8px; margin: 0 0 22px; flex-wrap: wrap; }
.sort { padding: 8px 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft);
    color: var(--muted); font-size: 13.5px; font-weight: 600; transition: .15s; }
.sort:hover { color: var(--text); border-color: #33405e; }
.sort.active { background: var(--card-hover); color: var(--text); border-color: var(--brand); }

/* ---------- Tags ---------- */
.taglist { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 24px 0 4px; }
.taglist-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.tag-chip { padding: 6px 13px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line);
    color: var(--muted); font-size: 13px; font-weight: 600; transition: .15s; }
.tag-chip:hover { color: var(--text); border-color: var(--brand); background: rgba(30,155,255,.08); }
.tag-chip.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }

/* ---------- Watch bar + like button ---------- */
.watch-bar { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.like-btn { transition: .15s; }
.like-btn.liked { border-color: rgba(34,211,238,.5); color: #ff8db6; background: rgba(34,211,238,.1); }
.like-btn.pop { animation: likePop .3s ease; }
@keyframes likePop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ---------- Watch ---------- */
.watch { display: grid; grid-template-columns: 1fr 340px; gap: 30px; margin: 30px 0; animation: fadeUp .4s ease both; }
.player { background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
    aspect-ratio: 16/9; box-shadow: var(--shadow); }
.player video, .player iframe { width: 100%; height: 100%; border: 0; }
.watch h1 { font-size: 27px; margin: 20px 0 10px; letter-spacing: -.5px; }
.watch .desc { color: var(--muted); margin-top: 16px; white-space: pre-line;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.side h3 { font-size: 13px; color: var(--muted); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1.2px; }
.side .row { display: flex; gap: 13px; margin-bottom: 14px; padding: 7px; border-radius: var(--radius-sm); transition: .15s; }
.side .row:hover { background: var(--card); }
.side .row .t { width: 138px; aspect-ratio: 16/10; border-radius: 10px; overflow: hidden; background: #000; flex: none; }
.side .row .t img, .side .row .t video { width: 100%; height: 100%; object-fit: cover; }
.side .row .t .ph { width: 100%; height: 100%; display: grid; place-items: center; background: #11131f; }
.side .row h4 { font-size: 14px; line-height: 1.32; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.side .row small { color: var(--muted); }

/* ---------- Footer / misc ---------- */
.empty { text-align: center; padding: 90px 20px; color: var(--muted); }
.empty .big { font-size: 66px; margin-bottom: 16px; animation: float 4s ease-in-out infinite; }
.empty h3 { color: var(--text); font-size: 20px; margin-bottom: 6px; }
footer { border-top: 1px solid var(--line-soft); margin-top: 70px; padding: 34px 0; color: var(--muted-2); font-size: 14px; text-align: center; }
.pagination { display: flex; gap: 6px; justify-content: center; list-style: none; margin: 40px 0; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; min-width: 40px; justify-content: center; padding: 9px 13px;
    border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); font-size: 14px; transition: .15s; }
.pagination a:hover { border-color: var(--brand); }
.pagination .active span { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; }
.pagination .disabled span { opacity: .4; }

/* ---------- Flash ---------- */
.flash { padding: 14px 18px; border-radius: var(--radius-sm); margin: 18px 0; font-weight: 600; animation: fadeUp .3s ease both; }
.flash.ok { background: rgba(46,229,157,.12); border: 1px solid rgba(46,229,157,.4); color: #6ff0bd; }
.flash.err { background: rgba(255,77,109,.12); border: 1px solid rgba(255,77,109,.4); color: #ff8095; }

/* ---------- Admin shell ---------- */
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, var(--bg-soft), var(--bg)); border-right: 1px solid var(--line-soft);
    padding: 26px 18px; position: sticky; top: 0; height: 100vh; }
.sidebar .logo { margin-bottom: 34px; font-size: 21px; padding: 0 8px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 12px 15px; border-radius: var(--radius-sm);
    color: var(--muted); font-weight: 600; margin-bottom: 5px; transition: .15s; font-size: 14.5px; }
.sidebar nav a:hover { background: var(--card); color: var(--text); }
.sidebar nav a.active { background: linear-gradient(135deg, rgba(30,155,255,.25), rgba(34,211,238,.18));
    color: #fff; box-shadow: inset 0 0 0 1px rgba(30,155,255,.3); }
.admin-main { padding: 30px 38px; max-width: 1200px; }

/* Mobile admin top bar + drawer (hidden on desktop) */
.admin-topbar { display: none; align-items: center; gap: 14px; height: 60px; padding: 0 16px;
    background: rgba(7,8,15,.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line-soft);
    position: sticky; top: 0; z-index: 60; }
.admin-topbar .logo { font-size: 19px; }
.hamburger { background: var(--bg-soft); border: 1px solid var(--line); color: var(--text);
    width: 42px; height: 42px; border-radius: 11px; font-size: 20px; cursor: pointer; line-height: 1; }
.sidebar-overlay { display: none; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.table-wrap table { min-width: 640px; }
.admin-head { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; flex-wrap: wrap; }
.admin-head h1 { font-size: 27px; letter-spacing: -.5px; }
.admin-head .spacer { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
    position: relative; overflow: hidden; transition: .18s; }
.stat:hover { transform: translateY(-3px); border-color: #33405e; }
.stat::after { content: ""; position: absolute; top: -30px; right: -30px; width: 80px; height: 80px; border-radius: 50%;
    background: radial-gradient(circle, rgba(30,155,255,.25), transparent 70%); }
.stat .n { font-size: 32px; font-weight: 800; letter-spacing: -1px; }
.stat .l { color: var(--muted); font-size: 12.5px; margin-top: 5px; text-transform: uppercase; letter-spacing: .6px; }

table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); font-size: 14px; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; background: var(--bg-soft); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: .12s; }
tbody tr:hover { background: var(--card-hover); }
.tag { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.tag.funny { background: var(--funny); color: #0b0d17; }
.tag.action { background: var(--action); color: #fff; }
.tag.on { background: rgba(46,229,157,.18); color: #6ff0bd; }
.tag.off { background: rgba(154,160,189,.18); color: var(--muted); }
.tbl-thumb { width: 70px; height: 44px; border-radius: 9px; object-fit: cover; background: #000; }

/* ---------- Forms / login ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: 100%; max-width: 410px; background: var(--card); border: 1px solid var(--line);
    border-radius: 22px; padding: 38px; box-shadow: var(--shadow); animation: fadeUp .4s ease both; }
.auth-card h1 { font-size: 25px; margin-bottom: 6px; letter-spacing: -.5px; }
.auth-card p.sub { color: var(--muted); margin-bottom: 26px; font-size: 14px; }
.auth-card .cred { background: var(--bg-soft); border: 1px dashed var(--line); border-radius: 10px;
    padding: 12px 14px; font-size: 13px; color: var(--muted); margin-top: 20px; }
.auth-card .cred code { color: var(--brand); font-weight: 700; }

.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; max-width: 760px;
    animation: fadeUp .4s ease both; }
.field { margin-bottom: 20px; }
.field > label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=url],
.field textarea, .field select {
    width: 100%; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 13px 15px; color: var(--text); font-size: 14.5px; font-family: inherit; outline: 0; transition: .16s; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,155,255,.15); }
.field textarea { resize: vertical; min-height: 96px; }
.field .err { color: #ff8095; font-size: 13px; margin-top: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); cursor: pointer;
    background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 15px; transition: .15s; }
.check:hover { border-color: #33405e; }
.check input { width: 19px; height: 19px; accent-color: var(--brand); }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 7px; }
.actions { display: flex; gap: 12px; margin-top: 26px; }

/* segmented source switch */
.seg { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 14px;
    padding: 9px 18px; border-radius: 999px; cursor: pointer; font-family: inherit; transition: .15s; }
.seg button.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }

/* dropzone */
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); background: var(--bg-soft);
    padding: 34px 24px; text-align: center; cursor: pointer; transition: .18s; position: relative; }
.dropzone:hover { border-color: var(--brand); background: rgba(30,155,255,.06); }
.dropzone.drag { border-color: var(--brand); background: rgba(30,155,255,.12); transform: scale(1.005); }
.dropzone .dz-icon { font-size: 46px; margin-bottom: 10px; }
.dropzone .dz-title { font-weight: 700; font-size: 16px; }
.dropzone .dz-sub { color: var(--muted); font-size: 13px; margin-top: 5px; }
.dropzone input[type=file] { display: none; }

.preview { margin-top: 16px; display: none; background: #000; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.preview.show { display: block; animation: fadeUp .3s ease both; }
.preview video { width: 100%; max-height: 320px; background: #000; }
.preview .pv-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); border-top: 1px solid var(--line); }
.preview .pv-bar .name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.preview .pv-bar .size { color: var(--muted); font-size: 12.5px; }
.preview .pv-bar .rm { color: #ff8095; cursor: pointer; font-size: 13px; font-weight: 600; }

/* upload overlay + progress */
.up-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(7,8,15,.82); backdrop-filter: blur(8px);
    display: none; place-items: center; padding: 20px; }
.up-overlay.show { display: grid; }
.up-box { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line); border-radius: 20px;
    padding: 30px; text-align: center; box-shadow: var(--shadow); }
.up-box .em { font-size: 44px; margin-bottom: 12px; animation: float 2.4s ease-in-out infinite; }
.up-box h3 { font-size: 19px; margin-bottom: 4px; }
.up-box p { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.progress { height: 12px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress .pfill { height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .2s ease; border-radius: 999px; }
.progress.indet .pfill { width: 40%; animation: bar 1.1s linear infinite; }
.up-pct { margin-top: 12px; font-weight: 700; font-size: 15px; }

/* ---------- Tablet ---------- */
@media (max-width: 980px) {
    .watch { grid-template-columns: 1fr; }
    .search { min-width: 160px; }
}

/* ---------- Mobile ---------- */
@media (max-width: 880px) {
    .container { padding: 0 16px; }

    /* Public nav becomes a two-row layout so search stays usable */
    .nav-inner { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px; }
    .nav-inner .search { order: 3; flex-basis: 100%; min-width: 0; }
    .logo { font-size: 20px; }

    .hero { margin-top: 20px; border-radius: 20px; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-media { min-height: 210px; position: relative; order: -1; }
    .hero-media::after { display: none; }
    .hero-text { padding: 26px 22px; }
    .hero-text h1 { font-size: 28px; }

    .section-head { margin: 30px 0 16px; }
    .section-head h2 { font-size: 20px; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
    .card-body { padding: 12px 13px 14px; }
    .card-body h3 { font-size: 14px; min-height: 0; }
    .rail { grid-auto-columns: minmax(160px, 70%); }

    .watch { gap: 20px; margin: 20px 0; }
    .watch h1 { font-size: 21px; }
    .watch-bar { gap: 8px; }

    /* --- Admin: off-canvas drawer --- */
    .admin-topbar { display: flex; }
    .admin-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; top: 0; left: 0; height: 100dvh; width: 260px; z-index: 80;
        transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay { display: block; position: fixed; inset: 0; z-index: 70;
        background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
    .sidebar-overlay.show { opacity: 1; pointer-events: auto; }
    .admin-main { padding: 20px 16px; }
    .admin-head h1 { font-size: 22px; }
    .stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat { padding: 16px; }
    .stat .n { font-size: 26px; }
    .row2 { grid-template-columns: 1fr; }
    .form-card { padding: 20px; }
}

/* ---------- Small phones ---------- */
@media (max-width: 420px) {
    .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .hero-text h1 { font-size: 24px; }
    .stats { grid-template-columns: 1fr 1fr; }
    .seg { width: 100%; } .seg button { flex: 1; padding: 10px 8px; }
    .actions { flex-direction: column; } .actions .btn { width: 100%; }
    .chips { width: 100%; }
}
