:root{
  --bg: #0b0f16;
  --panel: #101827;
  --panel2: #0f172a;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: rgba(255,255,255,0.08);
  --accent: #3b82f6;
  --danger: #ef4444;
  --good: #10b981;
  --warn: #f59e0b;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --radius: 16px;
  --radius2: 22px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  background: radial-gradient(1200px 800px at 30% 0%, rgba(59,130,246,0.15), transparent 55%),
              radial-gradient(1000px 700px at 70% 20%, rgba(16,185,129,0.08), transparent 55%),
              var(--bg);
  color: var(--text);
}

#app{
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 14px 14px;
  background: rgba(11,15,22,0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar__left{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.title{
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 16px;
}

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

.content{
  padding: 14px;
  flex: 1;
}

.screen{
  display: block;
}

.h2{
  margin: 6px 2px 12px;
  font-size: 18px;
  font-weight: 700;
}

.h3{
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--text);
}

.state{
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(16,24,39,0.65);
  border: 1px dashed var(--border);
  color: var(--muted);
}

.state-error{
  border-style: solid;
  border-color: rgba(239,68,68,0.35);
  color: #fecaca;
}

.row-between{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pill{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(16,24,39,0.55);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tile{
  width: 100%;
  padding: 14px 12px;
  border-radius: var(--radius2);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(16,24,39,0.85), rgba(15,23,42,0.65));
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  transition: transform 0.08s ease, border-color 0.08s ease;
}

.tile:active{
  transform: scale(0.99);
}

.tile__title{
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}

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

.list{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row{
  padding: 12px 12px;
  border-radius: var(--radius2);
  border: 1px solid var(--border);
  background: rgba(16,24,39,0.6);
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.08s ease;
}

.row:active{
  transform: scale(0.995);
}

.row-title{
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

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

.card{
  border-radius: var(--radius2);
  border: 1px solid var(--border);
  background: rgba(16,24,39,0.6);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card--flat{
  padding: 14px;
  box-shadow: none;
  margin-top: 12px;
}

.cover-wrap{
  position: relative;
  width: 100%;
  background: rgba(15,23,42,0.7);
  border-bottom: 1px solid var(--border);
  min-height: 220px;
}

.cover{
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: none;
}

.cover-placeholder{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.meta{
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.model{
  font-size: 16px;
  font-weight: 800;
}

.kv{
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  align-items: baseline;
}

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

.kv__v{
  font-size: 13px;
}

.desc{
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.gallery{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.thumb{
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 1px solid var(--border);
  object-fit: cover;
  background: rgba(15,23,42,0.7);
}

.pager{
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

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

.btn:active{
  transform: scale(0.99);
}

.btn-ghost{
  background: transparent;
}

.footer{
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: rgba(11,15,22,0.75);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

