:root{
  --bg: #070a10;
  --panel: rgba(18, 25, 40, 0.72);
  --panel2: rgba(10, 14, 24, 0.74);
  --panel3: rgba(15, 20, 34, 0.62);
  --text: #e9effa;
  --muted: rgba(233, 239, 250, 0.68);
  --border: rgba(160, 190, 255, 0.16);
  --border2: rgba(160, 190, 255, 0.10);
  --accent: #79b7ff;
  --accent2: #b388ff;
  --good: #52ffa8;
  --shadow: 0 18px 45px rgba(0,0,0,0.55);
  --radius: 16px;
}

*{ box-sizing:border-box; }
html, body { height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(121,183,255,0.14), transparent 60%),
              radial-gradient(900px 700px at 90% 10%, rgba(179,136,255,0.12), transparent 55%),
              radial-gradient(900px 700px at 40% 110%, rgba(82,255,168,0.08), transparent 55%),
              var(--bg);
  color: var(--text);
  overflow-x:hidden;
}

.bg-blobs{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:-1;
  filter: blur(36px);
  opacity:0.75;
}
.blob{
  position:absolute;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(121,183,255,0.55), rgba(179,136,255,0.0) 62%);
  animation: floaty 14s ease-in-out infinite;
}
.blob.b1{ left:-120px; top:80px; }
.blob.b2{ right:-140px; top:240px; width:520px; height:520px; animation-duration: 18s; }
.blob.b3{ left:30%; bottom:-200px; width:560px; height:560px; animation-duration: 22s; opacity:0.6; }

@keyframes floaty{
  0%,100%{ transform: translate3d(0,0,0) scale(1); }
  50%{ transform: translate3d(20px,-18px,0) scale(1.03); }
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(10,14,24,0.92), rgba(10,14,24,0.70));
  border-bottom: 1px solid var(--border2);
}

.topbar-inner{
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 16px 12px;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
}
.brand-mark{
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  font-weight: 900;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, rgba(121,183,255,0.28), rgba(179,136,255,0.20));
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}
.brand-title{ font-weight: 900; font-size: 18px; line-height: 1.1; }
.brand-sub{ color: var(--muted); font-size: 12px; margin-top: 2px; }

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

.fgroup{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 10px;
  min-width: 170px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.fgroup.actions{
  display:flex;
  gap: 8px;
  min-width: auto;
  padding: 10px;
}

label{
  display:block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px;
}

.row{ display:flex; gap: 8px; }

input, select{
  width:100%;
  background: rgba(7,10,16,0.8);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 10px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
input:focus, select:focus{
  border-color: rgba(121,183,255,0.65);
  box-shadow: 0 0 0 4px rgba(121,183,255,0.12);
}

.btn{
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  cursor: pointer;
  background: rgba(10,14,24,0.65);
  color: var(--text);
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0px); }

.btn.primary{
  border: 0;
  color: #06101f;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 14px 32px rgba(121,183,255,0.18);
}
.btn.ghost{
  background: rgba(10,14,24,0.45);
}

.btn .dot{
  display:inline-block;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: rgba(6,16,31,0.70);
  margin-right: 8px;
}

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

.meta{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 14px 0 14px;
  flex-wrap: wrap;
}
.count{
  font-size: 13px;
  color: var(--muted);
}
.hint{
  margin-top: 4px;
  font-size: 12px;
  color: rgba(233,239,250,0.55);
}

.search{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel3);
  min-width: 320px;
}
.search svg{
  width: 18px;
  height: 18px;
  color: rgba(233,239,250,0.55);
}
.search input{
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none !important;
}
.search input:focus{
  border:0;
  box-shadow:none;
}

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

.card{
  background: linear-gradient(180deg, rgba(18,25,40,0.70), rgba(10,14,24,0.62));
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow:hidden;
  min-height: 340px;
  display:flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
  cursor: pointer;
}
.card:hover{
  transform: translateY(-3px);
  border-color: rgba(121,183,255,0.38);
  box-shadow: 0 20px 60px rgba(0,0,0,0.62);
}

.thumb{
  width:100%;
  height: 176px;
  background: rgba(7,10,16,0.55);
  border-bottom: 1px solid var(--border2);
  position: relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}
.thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(1.03) contrast(1.02);
}
.thumb::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.35));
  pointer-events:none;
}
.noimg{
  color: rgba(233,239,250,0.55);
  font-size: 12px;
  border: 1px dashed rgba(160,190,255,0.20);
  padding: 10px 12px;
  border-radius: 12px;
}

.card-body{
  padding: 12px;
  display:flex;
  flex-direction: column;
  gap: 9px;
}

.title{
  font-weight: 900;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.2px;
}

.price-row{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.price{
  font-weight: 900;
  color: rgba(121,183,255,0.95);
}
.subtle{
  font-size: 12px;
  color: rgba(233,239,250,0.55);
}

.kv{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(233,239,250,0.70);
}

.badge{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  border: 1px solid var(--border2);
  background: rgba(7,10,16,0.45);
  border-radius: 999px;
  padding: 6px 10px;
}
.badge strong{
  color: rgba(233,239,250,0.95);
}

.desc{
  color: rgba(233,239,250,0.82);
  font-size: 13px;
  line-height: 1.35;
  display:-webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

.skeleton{
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(18,25,40,0.55), rgba(10,14,24,0.55), rgba(18,25,40,0.55));
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  min-height: 340px;
}
@keyframes shimmer{
  0%{ background-position: 200% 0; }
  100%{ background-position: -200% 0; }
}

.empty{
  margin-top: 16px;
  padding: 18px;
  border: 1px dashed rgba(160,190,255,0.22);
  border-radius: 16px;
  background: rgba(10,14,24,0.45);
}
.empty-title{ font-weight: 900; }
.empty-sub{ color: var(--muted); margin-top: 4px; font-size: 13px; }

.toast{
  position: fixed;
  right: 16px;
  bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(160,190,255,0.22);
  background: rgba(10,14,24,0.92);
  box-shadow: 0 18px 50px rgba(0,0,0,0.65);
  color: rgba(233,239,250,0.90);
  max-width: 360px;
}

.modal{
  position: fixed;
  inset: 0;
  z-index: 50;
}
.modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
}
.modal-card{
  position: relative;
  max-width: 760px;
  margin: 70px auto 0;
  background: rgba(10,14,24,0.92);
  border: 1px solid rgba(160,190,255,0.22);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0,0,0,0.75);
  overflow:hidden;
}
.modal-head{
  display:flex;
  justify-content: space-between;
  align-items:center;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(160,190,255,0.14);
}
.modal-title{
  font-weight: 900;
}
.iconbtn{
  border: 1px solid rgba(160,190,255,0.18);
  border-radius: 12px;
  background: rgba(7,10,16,0.45);
  color: rgba(233,239,250,0.85);
  width: 40px;
  height: 40px;
  cursor:pointer;
}
.modal-body{
  padding: 12px;
  display:grid;
  gap: 10px;
  grid-template-columns: 240px 1fr;
}
.modal-body img{
  width: 100%;
  height: 200px;
  border-radius: 14px;
  border: 1px solid rgba(160,190,255,0.16);
  object-fit: cover;
}
.modal-kv{
  display:grid;
  gap: 8px;
}
.modal-row{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}
.modal-foot{
  padding: 12px;
  border-top: 1px solid rgba(160,190,255,0.14);
  display:flex;
  justify-content:flex-end;
  gap: 8px;
}

@media (max-width: 860px){
  .search{ min-width: 100%; }
  .modal-body{ grid-template-columns: 1fr; }
  .modal-card{ margin: 24px 12px 0; }
}
