:root{
  --bg: #0b0c10;
  --panel: #11131a;
  --card: #121521;
  --text: #e9edf5;
  --muted: #a6afc2;
  --line: #23283a;

  --accent: #7c5cff;
  --accent2: #00d4ff;
  --good: #24d18b;

  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*{ 
    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 30% -10%, rgba(124,92,255,.22), transparent 60%),
                radial-gradient(900px 700px at 90% 0%, rgba(0,212,255,.18), transparent 55%),
                var(--bg);
    color: var(--text);
}

a{ 
    color: inherit; text-decoration: none;
}

.container{ 
    width: min(1100px, calc(100% - 32px)); margin: 0 auto; 
}

.sr-only{
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.small{ font-size: .85rem; }
.muted{ color: var(--muted); }
.section-title{ margin: 0; font-size: 1.1rem; }

/* Topbar */
.topbar{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(11,12,16,.65);
  border-bottom: 1px solid rgba(35,40,58,.7);
}
.topbar__inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.brand{ display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .2px; }
.brand__mark{
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(124,92,255,.9), rgba(0,212,255,.7));
  box-shadow: var(--shadow);
}
.brand__text{ font-size: 1.05rem; }
.brand__dot{ opacity: .9; }

.nav{ display: flex; gap: 14px; }
.nav__link{
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--muted);
}
.nav__link:hover{ background: rgba(255,255,255,.05); color: var(--text); }
.nav__link.is-active{
  background: rgba(124,92,255,.18);
  color: var(--text);
  border: 1px solid rgba(124,92,255,.25);
}

.topbar__actions{ display: flex; gap: 10px; }

/* Buttons */
.btn{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{ background: rgba(255,255,255,.08); }
.btn:active{ transform: translateY(1px); }

.btn--primary{
  background: linear-gradient(135deg, rgba(124,92,255,.95), rgba(0,212,255,.75));
  border-color: rgba(255,255,255,.18);
}
.btn--ghost{ background: transparent; }
.btn--sm{ padding: 8px 10px; border-radius: 12px; font-size: .9rem; }

.iconbtn{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text);
  width: 36px; height: 36px;
  border-radius: 12px;
  cursor: pointer;
}
.iconbtn:hover{ background: rgba(255,255,255,.08); }

/* Main */
.main{ padding: 26px 0 50px; }

/* Hero */
.hero{
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 18px;
  align-items: start;
  margin-top: 10px;
}
.hero h1{ margin: 0 0 8px; font-size: 2.2rem; }
.hero__cta{ display: flex; gap: 10px; margin: 14px 0; }

.pillrow{ display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.pill{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.pill.is-active{
  border-color: rgba(124,92,255,.35);
  background: rgba(124,92,255,.18);
}

.panel{
  background: rgba(17,19,26,.85);
  border: 1px solid rgba(35,40,58,.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.panel__title{ margin: 0 0 10px; font-size: 1.05rem; }
.panel__list{ margin: 0; padding-left: 18px; color: var(--muted); }
.panel__list li{ margin: 8px 0; display: flex; gap: 10px; justify-content: space-between; }
.tag{
  display: inline-grid; place-items: center;
  font-size: .8rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text);
}
.score{ color: var(--good); font-weight: 800; }

/* Toolbar */
.toolbar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 24px 0 14px;
}
.toolbar__right{ display: flex; gap: 10px; align-items: center; }

.search input,
.select select{
  width: 240px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text);
  outline: none;
}
.select select{ cursor: pointer; }

/* Grid + cards */
.grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card{
  background: rgba(18,21,33,.86);
  border: 1px solid rgba(35,40,58,.95);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: translateZ(0);
}
.card__media{
  position: relative;
  background: rgba(255,255,255,.03);
}
.card__media img{
  display: block;
  width: 100%;
  height: auto;
}
.badge{
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.18);
  font-size: .85rem;
}
.card__body{ padding: 14px; }
.card__title{ margin: 0 0 6px; font-size: 1.05rem; }
.card__meta{ margin: 0 0 10px; }
.user{ color: rgba(0,212,255,.9); }

.card__actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0 12px;
}

.vote{ display: flex; align-items: center; gap: 8px; }
.vote__count{ min-width: 46px; text-align: center; font-weight: 700; }

.rating{ display: flex; align-items: baseline; gap: 6px; }
.rating__value{ font-size: 1.2rem; font-weight: 900; color: var(--good); }

.chiprow{ display: flex; flex-wrap: wrap; gap: 8px; }
.chip{
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: .85rem;
}

/* Footer */
.footer{
  border-top: 1px solid rgba(35,40,58,.75);
  padding: 20px 0;
  background: rgba(11,12,16,.55);
}
.footer__inner{ display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer__link{ text-decoration: underline; text-underline-offset: 3px; }

/* Modal */
.modal{
  border: none;
  padding: 0;
  border-radius: 18px;
  width: min(560px, calc(100% - 24px));
  background: rgba(17,19,26,.98);
  color: var(--text);
  box-shadow: var(--shadow);
}
.modal::backdrop{ background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.modal__content{ padding: 16px; }
.modal__header{
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid rgba(35,40,58,.8);
  padding-bottom: 10px;
}
.modal__body{ padding: 14px 0; }
.modal__footer{
  display: flex; justify-content: flex-end; gap: 10px;
  border-top: 1px solid rgba(35,40,58,.8);
  padding-top: 10px;
}

.field{ display: grid; gap: 6px; margin-bottom: 10px; }
.field__label{ font-size: .9rem; color: var(--muted); }
.field input{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--text);
}

.dropzone{
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  padding: 18px;
}
.dropzone__inner{ text-align: center; }

@media (max-width: 980px){
  .hero{ grid-template-columns: 1fr; }
  .grid{ grid-template-columns: repeat(2, 1fr); }
  .nav{ display: none; }
  .search input, .select select{ width: 200px; }
}
@media (max-width: 640px){
  .grid{ grid-template-columns: 1fr; }
  .toolbar{ flex-direction: column; align-items: stretch; }
  .toolbar__right{ width: 100%; justify-content: space-between; }
  .search input, .select select{ width: 100%; }
}
