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

:root {
    --bg0: #030404;
    --bg1: #0B1018;
    --bg2: #121826;
    --bg3: #182131;
    --bg4: #1F2A3D;
    --b1: #273244;
    --b2: #34445C;
    --b3: #465C78;
    --acc: #00C2FF;
    --accd: #0099CC;
    --accbg: rgba(0, 194,255,.08);
    --accbg2: rgba(0, 194,255, 0.16);
    --blue: #3EA6FF;
    --teal: #00D4AA;
    --grn: #47E08A;
    --red: #FF4A4A;
    --pur: #8F6BFF;
    --t1: #F8F8F8;
    --t2: #BBBBBB;
    --t3: #777777;
    --t4: #444444;
    --gold: #F5C84C;
    --sil: #A7A7A7;
    --brnz: #A55E2A;
    --mono: 'JetBrains Mono', monospace;
    --sans: 'Sora', sans-serif;
    --r4: 4px;
    --r8: 8px;
    --r12: 12px;
    --r16: 16px;
    --tr: all 0.16s cubic-bezier(0.4, 0, 0.2, 1);
}

html,
body {
    height: 100%;
    font-family: var(--sans);
    font-size: 13px;
    background: var(--bg0);
    color: var(--t1);
    overflow: hidden;
    -webkit-font-smoothing: antialiased
}

::-webkit-scrollbar {
    width: 4px
}

::-webkit-scrollbar-track {
    background: transparent
}

::-webkit-scrollbar-thumb {
    background: var(--b2);
    border-radius: 2px
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden
}

/* NAV */
.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 50px;
    background: var(--bg1);
    border-bottom: 1px solid var(--b1);
    position: relative;
    z-index: 500;
    flex-shrink: 0
}

.logo-badge {
    background: var(--acc);
    color: #000;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: var(--r4);
    line-height: 1.3;
    letter-spacing: -.3px
}

.logo-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--t1);
    letter-spacing: -.3px
}

.ndiv {
    width: 1px;
    height: 18px;
    background: var(--b2);
    margin: 0 3px;
    flex-shrink: 0
}

.nbtn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid var(--b2);
    border-radius: var(--r8);
    background: transparent;
    color: var(--t2);
    cursor: pointer;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    transition: var(--tr);
    white-space: nowrap
}

.nbtn:hover {
    border-color: var(--b3);
    color: var(--t1);
    background: var(--bg3)
}

.nbtn.active {
    border-color: var(--accd);
    color: var(--acc);
    background: var(--accbg)
}

.nbtn svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0
}

.nbtn-icon {
    padding: 4px 7px
}

.wlbadge {
    background: var(--acc);
    color: #000;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 20px;
    min-width: 16px;
    text-align: center;
    line-height: 1.5
}

.tsw {
    display: flex;
    background: var(--bg3);
    border: 1px solid var(--b2);
    border-radius: var(--r8);
    overflow: hidden;
    padding: 2px;
    gap: 1px
}

.tsbtn {
    padding: 3px 12px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--t2);
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .5px;
    text-transform: uppercase;
    transition: var(--tr)
}

.tsbtn.active {
    background: var(--acc);
    color: #000
}

.tsbtn:hover:not(.active) {
    color: var(--t1);
    background: var(--bg4)
}

.nright {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px
}

.ldot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--grn);
    animation: pk 1.8s ease infinite;
    flex-shrink: 0
}

@keyframes pk {
    0%,
    100% {
        opacity: 1
    }

    50% {
        opacity: .3
    }
}

/* DRAWER */
.doverlay {
    position: fixed;
    inset: 50px 0 0 0;
    background: rgba(4, 5, 10, .72);
    backdrop-filter: blur(4px);
    z-index: 400;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease
}

.doverlay.open {
    opacity: 1;
    pointer-events: all
}

.dpanel {
    position: absolute;
    top: 0;
    left: 0;
    width: 264px;
    height: 100%;
    background: var(--bg1);
    border-right: 1px solid var(--b2);
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.4, 0, .2, 1);
    z-index: 410;
    overflow-y: auto
}

.doverlay.open .dpanel {
    transform: translateX(0)
}

.dseclabel {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--t3);
    padding: 14px 16px 7px
}

.ditem {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 16px;
    cursor: pointer;
    border-left: 2px solid transparent;
    transition: var(--tr)
}

.ditem:hover {
    background: var(--bg3);
    border-left-color: var(--acc)
}

.dicon {
    width: 14px;
    height: 14px;
    stroke: var(--t3);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    transition: var(--tr)
}

.ditem:hover .dicon {
    stroke: var(--acc)
}

.dlabel {
    font-size: 12px;
    font-weight: 500;
    color: var(--t2);
    transition: var(--tr)
}

.ditem:hover .dlabel {
    color: var(--t1)
}

.dsub {
    font-size: 9px;
    color: var(--t3)
}

.ddiv {
    height: 1px;
    background: var(--b1);
    margin: 6px 0
}

/* WORKSPACE */
.workspace {
    display: grid;
    grid-template-columns: 252px 1fr 292px;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    position: relative
}

/* LEFT PANEL */
.pleft {
    background: var(--bg2);
    border-right: 1px solid var(--b1);
    display: flex;
    flex-direction: column;
    overflow: hidden
}

.phdr {
    padding: 10px 12px 8px;
    border-bottom: 1px solid var(--b1);
    flex-shrink: 0
}

.peyebrow {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--acc);
    margin-bottom: 3px
}

.ptitle {
    font-size: 13px;
    font-weight: 700;
    color: var(--t1);
    letter-spacing: -.3px
}

.psubt {
    font-size: 9px;
    color: var(--t3);
    margin-top: 1px
}

.lbcols {
    display: grid;
    grid-template-columns: 26px 1fr 34px 22px;
    gap: 5px;
    align-items: center;
    padding: 5px 12px;
    border-bottom: 1px solid var(--b1);
    background: var(--bg0);
    flex-shrink: 0
}

.lbcollabel {
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--t3)
}

.lbscroll {
    flex: 1;
    overflow-y: auto
}

.lbrow {
    display: grid;
    grid-template-columns: 26px 1fr 34px 22px;
    gap: 5px;
    align-items: center;
    padding: 6px 12px;
    border-bottom: 1px solid rgba(26, 31, 48, .5);
    cursor: pointer;
    transition: var(--tr)
}

.lbrow:hover {
    background: var(--bg4)
}

.lbrow.inwl {
    background: rgba(232, 184, 75, .03)
}

.lbrank {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    text-align: center
}

.lbinfo {
    min-width: 0
}

.lbtitle {
    font-size: 11px;
    font-weight: 600;
    color: var(--t1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1px
}

.lbmeta {
    font-size: 9px;
    color: var(--t3)
}

.lbscore {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--blue);
    text-align: right
}

.wltog {
    width: 20px;
    height: 20px;
    border-radius: var(--r4);
    border: 1px solid var(--b2);
    background: transparent;
    color: var(--t3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tr);
    flex-shrink: 0
}

.wltog:hover,
.wltog.saved {
    border-color: var(--accd);
    color: var(--acc);
    background: var(--accbg)
}

.wltog svg {
    width: 9px;
    height: 9px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round
}

/* CENTER */
.pcenter {
    background: var(--bg0);
    display: flex;
    flex-direction: column;
    overflow: hidden
}

.gtopbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
    border-bottom: 1px solid var(--b1);
    background: var(--bg2);
    flex-shrink: 0
}

.gbread {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    color: var(--t3)
}

.gbread .cur {
    color: var(--t2);
    font-weight: 600
}

.gbread svg {
    width: 9px;
    height: 9px;
    stroke: var(--t3);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round
}

.gstrow {
    display: flex;
    gap: 14px
}

.gst {
    text-align: right
}

.gstval {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--teal)
}

.gstlabel {
    font-size: 7px;
    color: var(--t3);
    text-transform: uppercase;
    letter-spacing: .8px
}

.garea {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--bg0)
}

#globe-container {
    width: 100%;
    height: 100%
}

/* Zoom controls */
.zoom-btns {
    position: absolute;
    bottom: 56px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 50
}

.zoom-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--r4);
    border: 1px solid var(--b2);
    background: var(--bg2);
    color: var(--t2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    transition: var(--tr)
}

.zoom-btn:hover {
    border-color: var(--b3);
    color: var(--t1);
    background: var(--bg3)
}

.reset-btn {
    position: absolute;
    bottom: 56px;
    left: 12px;
    padding: 4px 10px;
    border-radius: var(--r4);
    border: 1px solid var(--b2);
    background: var(--bg2);
    color: var(--t2);
    cursor: pointer;
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 600;
    transition: var(--tr);
    z-index: 50
}

.reset-btn:hover {
    border-color: var(--acc);
    color: var(--acc)
}

/* Map tooltip */
.mtooltip {
    position: absolute;
    background: var(--bg2);
    border: 1px solid var(--b2);
    border-radius: var(--r8);
    padding: 7px 11px;
    font-size: 11px;
    pointer-events: none;
    z-index: 200;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .7);
    display: none
}

.mtooltip.show {
    display: block
}

.mtt-name {
    font-weight: 700;
    color: var(--t1);
    margin-bottom: 2px
}

.mtt-sub {
    font-size: 9px;
    color: var(--t3)
}

/* BOTTOM FILTERS */
.gfilters {
    padding: 7px 10px;
    border-top: 1px solid var(--b1);
    background: var(--bg2);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 5px
}

.gfilter-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center
}

.filter-label {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--t3);
    white-space: nowrap;
    align-self: center
}

.fpill {
    padding: 3px 9px;
    border: 1px solid var(--b2);
    border-radius: 20px;
    background: transparent;
    color: var(--t2);
    font-family: var(--sans);
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: .3px;
    transition: var(--tr);
    white-space: nowrap
}

.fpill:hover {
    border-color: var(--teal);
    color: var(--teal);
    background: rgba(46, 196, 182, .08)
}

.fpill.active {
    border-color: var(--teal);
    color: var(--teal);
    background: rgba(46, 196, 182, .1)
}

.fpill.country-pill {
    font-size: 8px;
    padding: 2px 7px
}

.fpill.country-pill.active {
    border-color: var(--acc);
    color: var(--acc);
    background: var(--accbg)
}

#country-filter-row {
    flex-wrap: wrap;
    overflow: hidden;
    max-height: 0;
    transition: max-height .3s ease;
    opacity: 0;
    transition: max-height .3s ease, opacity .3s ease
}

#country-filter-row.visible {
    max-height: 120px;
    opacity: 1;
    overflow-y: auto
}

/* RIGHT PANEL */
.pright {
    background: var(--bg2);
    border-left: 1px solid var(--b1);
    display: flex;
    flex-direction: column;
    overflow: hidden
}

.rhdr {
    padding: 11px 12px 9px;
    border-bottom: 1px solid var(--b1);
    background: linear-gradient(180deg, var(--bg4) 0%, var(--bg2) 100%);
    flex-shrink: 0
}

.rfocus-label {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 3px
}

.rfocus-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--t1);
    letter-spacing: -.4px;
    line-height: 1.2
}

.rfocus-sub {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    color: var(--t3);
    margin-top: 2px
}

.rscroll {
    flex: 1;
    overflow-y: auto;
    padding: 7px
}

/* SHOW CARDS */
.scard {
    background: var(--bg3);
    border: 1px solid var(--b1);
    border-radius: var(--r12);
    padding: 9px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: var(--tr)
}

.scard:hover {
    border-color: var(--b3);
    background: var(--bg4)
}

.scard.inwl {
    border-color: var(--accd);
    background: rgba(232, 184, 75, .03)
}

.scinner {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 9px;
    align-items: start
}

.sposter {
    width: 42px;
    height: 60px;
    border-radius: var(--r4);
    border: 1px solid var(--b2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.sprank {
    position: absolute;
    top: 2px;
    left: 2px;
    background: rgba(0, 0, 0, .85);
    color: var(--acc);
    font-family: var(--mono);
    font-size: 7px;
    font-weight: 700;
    padding: 1px 3px;
    border-radius: 2px
}

.stitle {
    font-size: 11px;
    font-weight: 700;
    color: var(--t1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px
}

.sgenres {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-bottom: 5px
}

.schip {
    font-size: 8px;
    padding: 1px 5px;
    border-radius: var(--r4);
    background: var(--bg4);
    border: 1px solid var(--b2);
    color: var(--t2);
    font-weight: 500
}

.smetrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 5px
}

.smblk {
    display: flex;
    align-items: center;
    gap: 4px
}

.smlabel {
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--t3);
    font-weight: 700
}

.smval {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.1
}

.smval.ai {
    color: var(--teal)
}

.smval.uv {
    color: var(--blue)
}

.sfooter {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap
}

.sptag {
    font-size: 8px;
    padding: 2px 5px;
    border-radius: var(--r4);
    background: var(--bg0);
    border: 1px solid var(--b1);
    color: var(--t3);
    font-weight: 500
}

.cwlbtn {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border: 1px solid var(--b2);
    border-radius: var(--r4);
    background: transparent;
    color: var(--t2);
    cursor: pointer;
    font-family: var(--sans);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    transition: var(--tr);
    margin-left: auto;
    flex-shrink: 0
}

.cwlbtn:hover,
.cwlbtn.saved {
    border-color: var(--accd);
    color: var(--acc);
    background: var(--accbg)
}

.cwlbtn svg {
    width: 8px;
    height: 8px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round
}

/* STATUS BAR */
.sbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 14px;
    background: var(--bg0);
    border-top: 1px solid var(--b1);
    font-size: 9px;
    color: var(--t3);
    letter-spacing: .3px;
    flex-shrink: 0
}

.ssep {
    color: var(--b2)
}

.stime {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 9px
}

/* TOAST */
.toasts {
    position: fixed;
    bottom: 18px;
    right: 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 1000;
    pointer-events: none
}

.toast {
    background: var(--bg2);
    border: 1px solid var(--b2);
    border-radius: var(--r8);
    padding: 7px 12px;
    font-size: 11px;
    color: var(--t2);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .7);
    animation: tin .22s ease, tout .22s ease 2.1s forwards;
    display: flex;
    align-items: center;
    gap: 7px
}

.tdot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0
}

.tdot.add {
    background: var(--grn)
}

.tdot.rm {
    background: var(--red)
}

@keyframes tin {
    from {
        opacity: 0;
        transform: translateY(6px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes tout {
    from {
        opacity: 1
    }

    to {
        opacity: 0;
        transform: translateY(-4px)
    }
}

/* WL MODAL */
.wloverlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 5, 10, .78);
    backdrop-filter: blur(6px);
    z-index: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
    display: flex;
    align-items: center;
    justify-content: center
}

.wloverlay.open {
    opacity: 1;
    pointer-events: all
}

.wlpanel {
    background: var(--bg2);
    border: 1px solid var(--b2);
    border-radius: var(--r16);
    width: 400px;
    max-height: 58vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .8);
    transform: scale(.95);
    transition: transform .22s ease
}

.wloverlay.open .wlpanel {
    transform: scale(1)
}

.wlphdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--b1)
}

.wlptitle {
    font-size: 14px;
    font-weight: 700;
    color: var(--t1)
}

.wlpclose {
    width: 26px;
    height: 26px;
    border-radius: var(--r4);
    border: 1px solid var(--b2);
    background: transparent;
    color: var(--t2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tr)
}

.wlpclose:hover {
    background: var(--bg3);
    color: var(--t1)
}

.wlpclose svg {
    width: 11px;
    height: 11px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round
}

.wlscroll {
    flex: 1;
    overflow-y: auto;
    padding: 8px
}

.wlitem {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border-radius: var(--r8);
    border: 1px solid var(--b1);
    background: var(--bg3);
    margin-bottom: 4px
}

.wlirank {
    font-family: var(--mono);
    font-size: 9px;
    color: var(--t3);
    min-width: 18px;
    text-align: center
}

.wliinfo {
    flex: 1;
    min-width: 0
}

.wlititle {
    font-size: 11px;
    font-weight: 600;
    color: var(--t1);
    margin-bottom: 1px
}

.wlimeta {
    font-size: 9px;
    color: var(--t3)
}

.wlirm {
    width: 18px;
    height: 18px;
    border-radius: var(--r4);
    border: 1px solid var(--b2);
    background: transparent;
    color: var(--t3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--tr);
    flex-shrink: 0
}

.wlirm:hover {
    border-color: var(--red);
    color: var(--red)
}

.wlirm svg {
    width: 8px;
    height: 8px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round
}

.wlempty {
    padding: 36px 18px;
    text-align: center;
    color: var(--t3);
    font-size: 12px
}

.wlempty svg {
    width: 28px;
    height: 28px;
    stroke: var(--t4);
    fill: none;
    stroke-width: 1.5;
    margin: 0 auto 10px;
    display: block
}

/* API Banner warning / Status Pill */
.api-badge {
    background: rgba(255, 76, 106, 0.12);
    border: 1px solid rgba(255, 76, 106, 0.3);
    color: var(--red);
    font-size: 9px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--r8);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--tr);
}
.api-badge:hover {
    background: rgba(255, 76, 106, 0.2);
    border-color: var(--red);
}
.api-badge.active-api {
    background: rgba(46, 196, 182, 0.12);
    border: 1px solid rgba(46, 196, 182, 0.3);
    color: var(--teal);
}
.api-badge.active-api:hover {
    background: rgba(46, 196, 182, 0.2);
    border-color: var(--teal);
}

/* API Settings Modal overlay */
.api-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 5, 10, .78);
    backdrop-filter: blur(6px);
    z-index: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
    display: flex;
    align-items: center;
    justify-content: center
}
.api-overlay.open {
    opacity: 1;
    pointer-events: all
}
.api-panel {
    background: var(--bg2);
    border: 1px solid var(--b2);
    border-radius: var(--r16);
    width: 440px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .8);
    transform: scale(.95);
    transition: transform .22s ease
}
.api-overlay.open .api-panel {
    transform: scale(1)
}
.api-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--t1);
    margin-bottom: 6px;
}
.api-desc {
    font-size: 11px;
    color: var(--t2);
    margin-bottom: 16px;
    line-height: 1.4;
}
.api-input {
    width: 100%;
    background: var(--bg0);
    border: 1px solid var(--b2);
    border-radius: var(--r8);
    color: var(--t1);
    font-family: var(--mono);
    font-size: 11px;
    padding: 10px 12px;
    margin-bottom: 12px;
    outline: none;
    transition: var(--tr);
}
.api-input:focus {
    border-color: var(--acc);
}
.api-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.api-btn {
    padding: 6px 14px;
    border-radius: var(--r8);
    border: 1px solid var(--b2);
    background: transparent;
    color: var(--t2);
    cursor: pointer;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 11px;
    transition: var(--tr);
}
.api-btn:hover {
    background: var(--bg3);
    color: var(--t1);
}
.api-btn.primary {
    background: var(--acc);
    color: #000;
    border-color: var(--acc);
}
.api-btn.primary:hover {
    background: #f0ca72;
    border-color: #f0ca72;
}

/* MOBILE PANEL TAB BAR (hidden on desktop) */
.mtabbar {
    display: none
}

.mtab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px 4px;
    border: 1px solid var(--b2);
    border-radius: var(--r8);
    background: transparent;
    color: var(--t2);
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--tr);
    white-space: nowrap
}

.mtab svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0
}

.mtab.active {
    border-color: var(--accd);
    color: var(--acc);
    background: var(--accbg)
}

/* LOADING SHIMMER */
.shimmer {
    background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
    background-size: 200% 100%;
    animation: shimmer-pulse 1.5s infinite;
}
@keyframes shimmer-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE / MOBILE ADAPTATION
   Same visual language & features — panels become swipeable tabs
═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    html, body {
        font-size: 12px
    }

    .mtabbar {
        display: flex;
        gap: 5px;
        padding: 6px 8px;
        background: var(--bg1);
        border-bottom: 1px solid var(--b1);
        flex-shrink: 0
    }

    .workspace {
        grid-template-columns: 1fr;
        display: block
    }

    .pleft, .pcenter, .pright {
        display: none;
        width: 100%;
        height: 100%;
        border: none
    }

    .workspace[data-panel="left"] .pleft {
        display: flex
    }

    .workspace[data-panel="center"] .pcenter {
        display: flex
    }

    .workspace[data-panel="right"] .pright {
        display: flex
    }

    /* NAV: condense to fit small widths */
    .nav {
        gap: 6px;
        padding: 0 8px
    }

    .logo-name {
        display: none
    }

    .nbtn-txt {
        display: none
    }

    .nbtn {
        padding: 6px 8px
    }

    .tsbtn {
        padding: 5px 9px
    }

    /* DRAWER: wider slide-out for touch */
    .dpanel {
        width: min(78vw, 280px)
    }

    /* Touch-friendly tap targets */
    .wltog {
        width: 26px;
        height: 26px
    }

    .cwlbtn {
        padding: 5px 9px
    }

    .zoom-btn {
        width: 34px;
        height: 34px
    }

    /* Filter pills: horizontal scroll instead of dense wrap */
    .gfilter-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px
    }

    .gfilter-row::-webkit-scrollbar {
        display: none
    }

    .fpill {
        flex-shrink: 0
    }

    #country-filter-row.visible {
        max-height: 40px
    }

    /* Status bar: keep it from overflowing */
    .sbar {
        gap: 7px;
        padding: 4px 8px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch
    }

    .sbar::-webkit-scrollbar {
        display: none
    }

    /* Watchlist modal: fit small screens */
    .wlpanel {
        width: 92vw;
        max-height: 74vh
    }

    /* Toasts: don't run off narrow screens */
    .toasts {
        left: 12px;
        right: 12px;
        bottom: 12px
    }

    .toast {
        width: 100%
    }
}

@media (max-width: 480px) {
    .nbtn[aria-label="Search"] {
        display: flex;
    }

    .sbar span:not(.stime):not(:first-child):not(#sbar-focus) {
        display: none
    }

    .ssep {
        display: none
    }
}

/* SEARCH AND DETAIL EXTENSIONS */
.search-container {
    display: flex;
    align-items: center;
}

.search-input {
    width: 0;
    opacity: 0;
    padding: 5px 0;
    border: 1px solid transparent;
    border-radius: var(--r8);
    background: transparent;
    color: var(--t1);
    font-family: var(--sans);
    font-size: 11px;
    outline: none;
    pointer-events: none;
    transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.16s ease, padding 0.22s ease, border-color 0.22s ease, margin 0.22s ease;
    margin-right: 0;
}

.search-container.open .search-input {
    width: 160px;
    opacity: 1;
    padding: 5px 10px;
    background: var(--bg0);
    border-color: var(--b2);
    pointer-events: auto;
    margin-right: 4px;
}

/* Selected Movie Detailed View */
.detail-container {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-backdrop {
    width: 100%;
    height: 120px;
    border-radius: var(--r12);
    border: 1px solid var(--b1);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 2px;
}

.detail-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(14, 16, 24, 0) 20%, rgba(14, 16, 24, 0.85) 100%);
}

.detail-poster-overlay {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    gap: 8px;
    z-index: 10;
    align-items: flex-end;
}

.detail-poster {
    width: 36px;
    height: 52px;
    border-radius: var(--r4);
    border: 1px solid var(--b2);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.detail-title-group {
    min-width: 0;
}

.detail-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--t1);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0,0,0,0.9);
}

.detail-meta {
    font-size: 9px;
    color: var(--t2);
    margin-top: 2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}

.detail-overview {
    font-size: 11px;
    color: var(--t2);
    line-height: 1.45;
    background: var(--bg3);
    border: 1px solid var(--b1);
    border-radius: var(--r12);
    padding: 9px 11px;
}

.detail-sec-title {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 3px;
}

.detail-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: var(--bg3);
    border: 1px solid var(--b1);
    border-radius: var(--r12);
    padding: 8px 10px;
}

.detail-actions {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.dback-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px;
    border: 1px solid var(--b2);
    border-radius: var(--r8);
    background: var(--bg3);
    color: var(--t2);
    cursor: pointer;
    font-family: var(--sans);
    font-weight: 600;
    font-size: 10px;
    transition: var(--tr);
}

.dback-btn:hover {
    border-color: var(--b3);
    color: var(--t1);
    background: var(--bg4);
}

.dback-btn svg {
    width: 10px;
    height: 10px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

