:root{
  --bg:#0b0f17;
  --card:#101827;
  --card2:#0f172a;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --border:rgba(255,255,255,.08);
  --accent:#60a5fa;
  --danger:#ef4444;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 14px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background: radial-gradient(1200px 700px at 20% -10%, rgba(96,165,250,.20), transparent 70%),
              radial-gradient(900px 600px at 90% 0%, rgba(34,197,94,.10), transparent 55%),
              var(--bg);
  color:var(--text);
}

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 16px;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11,15,23,.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.titleRow{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

h1{
  margin:0;
  font-size: 22px;
  letter-spacing: .2px;
}

.subtitle{
  margin:6px 0 0;
  color:var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.stats{
  padding: 10px 12px;
  background: rgba(16,24,39,.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

.controls{
  margin-top: 14px;
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}

.controlGroup{
  display:flex;
  flex-direction: column;
  gap: 6px;
}

.label{color: var(--muted); font-size: 12px;}

.input, .select{
  width: 320px;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(16,24,39,.65);
  color: var(--text);
  outline: none;
}

.input:focus, .select:focus{
  border-color: rgba(96,165,250,.65);
  box-shadow: 0 0 0 3px rgba(96,165,250,.15);
}

.buttons{
  display:flex;
  gap: 10px;
  margin-left: auto;
}

.btn{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(16,24,39,.75);
  color: var(--text);
  cursor: pointer;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
}

.btn:hover{ background: rgba(16,24,39,.95); border-color: rgba(255,255,255,.14); }
.btn:active{ transform: translateY(1px); }

.btnDanger{
  border-color: rgba(239,68,68,.35);
}
.btnDanger:hover{
  border-color: rgba(239,68,68,.65);
}

.tableWrap{
  margin-top: 18px;
  background: rgba(16,24,39,.55);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table{
  width:100%;
  border-collapse: collapse;
}

.table thead th{
  text-align:left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .3px;
  padding: 12px 12px;
  background: rgba(15,23,42,.65);
  border-bottom: 1px solid var(--border);
}

.table tbody td{
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 14px;
}

.table tbody tr:hover{ background: rgba(15,23,42,.35); }

.colNo{ width: 60px; }
.colSeries{ width: 180px; }
.colEp{ width: 120px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 13px; }
.colDate{ width: 160px; color: var(--muted); font-size: 13px; }
.colSeen{ width: 80px; text-align: center; }

.badge{
  display:inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(96,165,250,.25);
  color: rgba(96,165,250,.95);
  background: rgba(96,165,250,.08);
  font-size: 12px;
}

tr.seen{
  opacity: .6;
}
tr.seen td{
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(229,231,235,.35);
}

.checkbox{
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor:pointer;
}

.hint{
  margin: 12px 4px 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 720px){
  .buttons{ margin-left: 0; width: 100%; }
  .btn{ flex: 1; }
  .input, .select{ width: 100%; }
  .titleRow{ flex-direction: column; align-items: stretch; }
  .stats{ align-self: flex-start; }
  .colSeries{ width: auto; }
}
