:root{
  --bg: #0b0f14;
  --panel: rgba(16, 24, 38, .75);
  --panel2: rgba(15, 23, 36, .78);
  --text: #e9eef6;
  --muted: rgba(233, 238, 246, .72);
  --border: rgba(130, 160, 210, .18);
  --shadow: 0 18px 45px rgba(0,0,0,.35);
  --r: 18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial;
  color: var(--text);
  background: var(--bg);
}

.bg{
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 10% 10%, rgba(90,140,255,.25), transparent 60%),
    radial-gradient(700px 500px at 90% 20%, rgba(120,255,210,.14), transparent 60%),
    radial-gradient(900px 700px at 50% 100%, rgba(255,120,200,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.03), transparent 40%);
  pointer-events:none;
}

.shell{ max-width: 1050px; margin: 0 auto; padding: 18px 16px; position:relative; }
.topbar{ padding-top: 26px; }

.brand{ display:flex; gap:14px; align-items:flex-start; }
.logo{
  width: 46px; height: 46px;
  border-radius: 14px;
  display:grid; place-items:center;
  font-weight: 800;
  letter-spacing: .5px;
  background: linear-gradient(135deg, rgba(90,140,255,.9), rgba(120,255,210,.65));
  color: #06121f;
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
}
h1{ margin:0; font-size: 22px; letter-spacing: .2px; }
.brand p{ margin: 4px 0 0; color: var(--muted); }

.panel{
  margin-top: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(10px);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.addForm{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
  padding: 14px;
}

.field{
  flex: 1 1 520px;
  display:grid;
  gap: 8px;
  min-width: 240px;
}
.field span{ color: var(--muted); font-size: 13px; }
.field input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  outline: none;
  background: rgba(9, 14, 22, .65);
  color: var(--text);
}
.field input:focus{
  border-color: rgba(140, 190, 255, .45);
  box-shadow: 0 0 0 4px rgba(90,140,255,.14);
}

.btn{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(24, 38, 58, .75);
  color: var(--text);
  cursor: pointer;
  transition: transform .06s ease, filter .2s ease, background .2s ease;
}
.btn:hover{ filter: brightness(1.08); }
.btn:active{ transform: translateY(1px); }

.primary{
  background: linear-gradient(135deg, rgba(90,140,255,.9), rgba(120,255,210,.5));
  color: #06121f;
  border-color: transparent;
  font-weight: 700;
}
.ghost{ background: rgba(24, 38, 58, .45); }

.msg{
  padding: 0 14px 14px;
  min-height: 22px;
  color: var(--muted);
}
.msg.ok{ color: rgba(170, 255, 200, .95); }
.msg.error{ color: rgba(255, 160, 160, .95); }

.meta{
  margin-top: 18px;
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.meta-left{ display:flex; align-items:center; gap: 10px; }
h2{ margin:0; font-size: 16px; }
.hint{ color: var(--muted); font-size: 13px; }

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

.grid{
  margin-top: 12px;
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.card{
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow:hidden;
  background: var(--panel2);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 35px rgba(0,0,0,.35);
  display:flex;
  flex-direction: column;
}

.thumb{
  position: relative;
  aspect-ratio: 460 / 215;
  overflow:hidden;
}
.thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
  transform: scale(1.02);
}
.badge{
  position:absolute;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.14);
  font-size: 12px;
  color: rgba(255,255,255,.85);
}

.body{
  padding: 12px 12px 14px;
  display:grid;
  gap: 10px;
}

.title{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.title a{
  color: var(--text);
  text-decoration:none;
  font-weight: 700;
  line-height: 1.15;
}
.title a:hover{ text-decoration: underline; }
.sub{
  color: var(--muted);
  font-size: 12px;
}

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

.score{
  display:flex;
  gap: 10px;
  align-items:center;
}
.score b{
  font-size: 18px;
  letter-spacing: .2px;
}
.counts{
  display:flex;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.voteBtns{
  display:flex;
  gap: 10px;
}
.voteBtn{
  flex: 1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(24, 38, 58, .45);
  color: var(--text);
  cursor:pointer;
}
.voteBtn:hover{ filter: brightness(1.1); }
.voteBtn:active{ transform: translateY(1px); }

.footer{ padding-bottom: 28px; color: var(--muted); }


.info{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}

.linkBtn{
  text-decoration: none;
}


/* Compact add area */
.panel.compact{ padding: 10px 10px 8px; }
.compactRow{ padding: 10px; }
.compactRow .field span{ display:none; }
.compactRow .field input{ padding: 12px 12px; }
.compactRow .btn{ min-width: 44px; padding: 12px 12px; font-weight: 800; }

/* Featured: first card spans full width */
.card.featured{
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
}
.card.featured .thumb{ aspect-ratio: auto; }
.card.featured .thumb img{ height: 100%; }
@media (max-width: 820px){
  .card.featured{ grid-template-columns: 1fr; }
}

/* Info row polish */
.info .pill b{ font-weight: 800; color: rgba(255,255,255,.92); }

/* Ensure anchor buttons look like buttons */
.voteBtn.linkBtn{ display:flex; }
