:root{
  --bg:#0f1115; --panel:#151922; --muted:#9aa4b2; --text:#e8edf2; --primary:#5b8def; --primary-2:#3b6fe0; --danger:#ef6b6b; --success:#53c68c; --warn:#f1b84b; --border:#232838;
  --radius:12px; --shadow:0 6px 24px rgba(0,0,0,.35);
}
*{box-sizing:border-box}
html,body{height:100%}
body{font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial; margin:0; background:var(--bg); color:var(--text);}
.container{max-width:980px; margin:0 auto; padding:20px;}
.navbar{background:linear-gradient(180deg, #121521, #0f1115); border-bottom:1px solid var(--border);}
.navbar .container{display:flex; align-items:center; justify-content:space-between;}
.brand{font-weight:700; letter-spacing:.2px}
.chip{display:inline-flex; align-items:center; gap:8px; background:#192031; padding:6px 10px; border-radius:999px;}
.badge{background:#2a3450; color:#c8d5ff; padding:2px 6px; font-size:12px; border-radius:6px; margin-left:6px}
.inline-form{display:flex; gap:8px}
.input{background:#0d0f14; color:var(--text); border:1px solid var(--border); border-radius:8px; padding:10px 12px; width:100%}
.btn{background:#20273a; color:var(--text); border:1px solid var(--border); border-radius:10px; padding:10px 14px; cursor:pointer; transition:.15s ease;}
.btn:hover{transform:translateY(-1px)}
.btn.primary{background:var(--primary); border-color:transparent; color:white}
.btn.primary:hover{background:var(--primary-2)}
.btn.icon{display:inline-flex; align-items:center; gap:8px}
.btn.icon.voted{background:#2b3a6a; color:#dbe7ff; border-color:#2b3a6a}
.btn[disabled]{opacity:.6; cursor:not-allowed}
.muted{color:var(--muted)}
.snackbar{position:fixed; left:50%; bottom:24px; transform:translateX(-50%); background:#1b2540; color:#e8edf2; border:1px solid var(--border); padding:10px 14px; border-radius:10px; box-shadow:var(--shadow); opacity:0; pointer-events:none; transition:opacity .2s ease, transform .2s ease; z-index:1000}
.snackbar.show{opacity:1; transform:translateX(-50%) translateY(-4px)}
.banner{border:1px solid var(--border); background:#132238; color:#dbe7ff; padding:10px 12px; border-radius:10px; margin-bottom:12px}
.banner.info{background:#132238;}
.grid{display:grid; grid-template-columns:2fr 1fr; gap:18px}
.grid.two{grid-template-columns:1fr 1fr}
.card{background:var(--panel); border:1px solid var(--border); border-radius:var(--radius); padding:16px; box-shadow:var(--shadow)}
.card-header{display:flex; align-items:center; justify-content:space-between; margin-bottom:6px}
.filters{display:flex; gap:8px}
.cards{list-style:none; padding:0; margin:0}
.row{display:flex; align-items:center; justify-content:space-between; padding:14px; border:1px solid var(--border); border-radius:10px; background:#0f1320; margin:10px 0}
.row img.poster{width:64px; height:96px; object-fit:cover; border-radius:8px; margin-right:12px; border:1px solid var(--border)}
.row-main{display:flex; flex-direction:column; gap:8px}
.row-actions{display:flex; align-items:center; gap:10px}
.row-actions .inline-form{display:flex; align-items:center; gap:8px}
.row-actions .btn{white-space:nowrap}
.title{display:flex; align-items:center; gap:10px; font-size:16px}
.type{color:#b6c2ff; background:#1a2140; padding:2px 8px; border-radius:999px; font-size:12px}
.meta{display:flex; align-items:center; gap:10px; color:var(--muted); font-size:13px}
.k{opacity:.7}
.v{opacity:.9}
.badge.success{background:#153a2c; color:#9ce9c2}
.badge.warn{background:#3a3215; color:#f5d592}
.badge.danger{background:#3a1a1a; color:#f1adad}
.chip.active{outline:2px solid var(--primary)}

@media (max-width:900px){
  .grid{grid-template-columns:1fr}
}

/* Mobile tweaks */
@media (max-width:600px){
  .container{padding:14px;}
  .navbar .container{flex-wrap:wrap; gap:8px}
  .inline-form{flex-wrap:wrap}
  .inline-form .input, .inline-form .btn{flex:1 1 100%}
  .grid.two{grid-template-columns:1fr}
  .filters{overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:6px}
  .row{flex-direction:column; align-items:stretch; gap:10px}
  .row img.poster{width:56px; height:84px; margin:0 0 8px 0}
  .row-actions{justify-content:flex-start; flex-wrap:wrap}
  .row-actions .btn{flex:0 1 auto}
}

/* Very small devices */
@media (max-width:420px){
  .container{padding:10px}
  .title{font-size:15px}
  .meta{flex-wrap:wrap; gap:6px}
}
