:root{
  --bg0: #070914;
  --bg1: #0b1020;
  --panel: rgba(12, 16, 28, 0.72);
  --panel2: rgba(12, 16, 28, 0.52);
  --text: rgba(245, 246, 250, 0.92);
  --muted: rgba(245, 246, 250, 0.62);
  --muted2: rgba(245, 246, 250, 0.45);
  --shadow: 0 20px 60px rgba(0,0,0,.55);
  --accent: linear-gradient(90deg, #60a5fa, #a78bfa, #34d399);
  --accent2: linear-gradient(135deg, #a78bfa, #22d3ee, #f472b6);
  --radius: 18px;
}

*{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 800px at 10% 10%, rgba(99,102,241,.18), transparent 55%),
    radial-gradient(900px 700px at 85% 15%, rgba(34,211,238,.12), transparent 50%),
    radial-gradient(1000px 900px at 60% 95%, rgba(244,114,182,.10), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  color: var(--text);
}

.bg-orb{
  position: fixed;
  inset: auto auto 0 0;
  width: 520px;
  height: 520px;
  background: var(--accent2);
  filter: blur(80px);
  opacity: .10;
  pointer-events: none;
  transform: translate(-25%, 35%);
}
.orb2{
  inset: 0 0 auto auto;
  width: 560px;
  height: 560px;
  background: var(--accent);
  opacity: .12;
  transform: translate(35%, -35%);
}

.container{
  max-width: 1150px;
  margin: 0 auto;
  padding: 28px 18px 40px;
}

.top{
  display:flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 16px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  position: relative;
  overflow:hidden;
}
.top::before{
  content:"";
  position:absolute;
  inset:0;
  padding:1px;
  border-radius: var(--radius);
  background: var(--accent);
  opacity: .45;

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events:none;
}

.brand h1{
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: .3px;
}
.subtitle{
  margin:0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.controls{
  display:flex;
  flex-direction: column;
  gap: 10px;
  min-width: 340px;
  max-width: 520px;
  width: 52%;
}

.search input{
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  outline: none;
  background: rgba(0,0,0,.20);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(0,0,0,.25) inset;
}
.search input::placeholder{color: rgba(245,246,250,.45)}
.search input:focus{
  border-color: rgba(167,139,250,.60);
  box-shadow: 0 0 0 3px rgba(167,139,250,.15);
}

.row{
  display:flex;
  gap: 10px;
  align-items: center;
}

select{
  appearance: none;
  -webkit-appearance: none;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  outline:none;
  background: rgba(0,0,0,.20);
  color: var(--text);
  flex: 1;
}
select:focus{
  border-color: rgba(96,165,250,.65);
  box-shadow: 0 0 0 3px rgba(96,165,250,.15);
}

.btn{
  border: 0;
  border-radius: 14px;
  padding: 10px 12px;
  color: rgba(0,0,0,.92);
  background: var(--accent);
  cursor: pointer;
  font-weight: 650;
  letter-spacing: .2px;
  transition: transform .08s ease, filter .12s ease;
  white-space: nowrap;
}
.btn:hover{filter: brightness(1.05)}
.btn:active{transform: translateY(1px)}
.btn:disabled{
  opacity: .45;
  cursor: not-allowed;
  filter: grayscale(60%);
}

.btn-ghost{
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.14);
}

.stats{
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.stat{
  background: var(--panel2);
  border-radius: 16px;
  padding: 12px 12px;
  text-align:left;
  position:relative;
  overflow:hidden;
  box-shadow: 0 12px 35px rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.06);
}
.stat::before{
  content:"";
  position:absolute;
  inset:0;
  background: var(--accent2);
  opacity: .08;
  pointer-events:none;
}
.stat button{
  all: unset;
  cursor: pointer;
  display: block;
  width:100%;
}
.stat .k{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.stat .v{
  font-size: 18px;
  font-weight: 750;
  letter-spacing: .2px;
}

.notice{
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(0,0,0,.18);
  border: 1px dashed rgba(255,255,255,.14);
  color: var(--muted);
}

.sections{
  margin-top: 16px;
  display:flex;
  flex-direction: column;
  gap: 18px;
}

.group{
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(0,0,0,.10);
  border: 1px solid rgba(255,255,255,.06);
}

.groupHeader{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 6px 10px;
}
.groupHeader h2{
  margin:0;
  font-size: 15px;
  letter-spacing: .2px;
}
.groupHeader .count{
  color: var(--muted);
  font-size: 12px;
}

.cards{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 10px;
}

.card{
  position:relative;
  border-radius: 16px;
  padding: 14px 14px 12px;
  background: var(--panel);
  text-decoration: none;
  color: var(--text);
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 12px 40px rgba(0,0,0,.38);
  transition: transform .08s ease, border-color .12s ease;
}
.card::before{
  content:"";
  position:absolute;
  inset:0;
  padding: 1px;
  border-radius: 16px;
  background: var(--accent);
  opacity: .35;

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events:none;
}
.card:hover{
  transform: translateY(-1px);
  border-color: rgba(167,139,250,.18);
}
.card:active{
  transform: translateY(0);
}

.title{
  font-weight: 730;
  letter-spacing: .1px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.meta{
  display:flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items:center;
}

.chip{
  font-size: 12px;
  color: rgba(245,246,250,.86);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  padding: 5px 8px;
  border-radius: 999px;
  line-height: 1.0;
  white-space: nowrap;
}

.chip.status{
  border-color: rgba(255,255,255,.14);
}
.status-Watching{ background: rgba(34,211,238,.12); border-color: rgba(34,211,238,.35); }
.status-Completed{ background: rgba(34,197,94,.10); border-color: rgba(34,197,94,.30); }
.status-On-Hold{ background: rgba(167,139,250,.12); border-color: rgba(167,139,250,.30); }
.status-Dropped{ background: rgba(244,114,182,.10); border-color: rgba(244,114,182,.30); }
.status-Plan-to-Watch{ background: rgba(96,165,250,.10); border-color: rgba(96,165,250,.30); }

.footer{
  margin-top: 26px;
  color: var(--muted2);
  font-size: 12px;
}
.footer code{color: rgba(245,246,250,.75)}

.fallback{
  margin-top: 16px;
  padding: 14px 14px;
  border-radius: var(--radius);
  background: rgba(0,0,0,.14);
  border: 1px solid rgba(255,255,255,.08);
}
.fallback h2{margin: 0 0 8px; font-size: 15px}
.fallback p{margin: 10px 0; color: var(--muted); font-size: 13px; line-height: 1.5}
.hint{color: var(--muted2) !important}

.file{
  flex: 1;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
  color: var(--text);
}

.sr-only{
  position:absolute !important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

@media (max-width: 900px){
  .top{flex-direction: column; align-items: stretch}
  .controls{width: 100%; min-width: unset}
  .stats{grid-template-columns: repeat(3, minmax(0, 1fr))}
}

@media (max-width: 520px){
  .row{flex-direction: column; align-items: stretch}
  .btn{width: 100%}
  .stats{grid-template-columns: repeat(2, minmax(0, 1fr))}
}
