:root{
  --bg:#0b0f14;
  --card:rgba(18,18,18,.78);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.65);
  --accent:#FF8C00;
  --accent2:#00cfcf;
  --shadow:0 16px 60px rgba(0,0,0,.55);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family:"Segoe UI",system-ui,-apple-system,Arial,sans-serif;
  color:var(--text);
  background:transparent;
  overflow-x:hidden;

  /* ВАЖНО — фикс футера */
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

body::before{
  content:"";
  position:fixed; inset:0;
  background:url('/images/logo.jpg') no-repeat center center fixed;
  background-size:cover;
  filter:saturate(1.05) contrast(1.05);
  z-index:-3;
}
body::after{
  content:"";
  position:fixed; inset:0;
  background:
    radial-gradient(900px 520px at 20% 10%, rgba(255,140,0,.16), transparent 60%),
    radial-gradient(900px 520px at 85% 25%, rgba(0,207,207,.14), transparent 60%),
    linear-gradient(to bottom, rgba(0,0,0,.52), rgba(0,0,0,.72));
  z-index:-2;
}

.top-panel{
  position:sticky;
  top:0;
  z-index:999;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:16px 22px;
  background:rgba(0,0,0,.50);
  border-bottom:1px solid rgba(255,255,255,.08);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:170px;
}
.brand img{height:44px;width:auto;display:block}
.brand .name{
  font-weight:900;
  letter-spacing:.3px;
  color:var(--accent);
  text-shadow:0 0 10px rgba(255,140,0,.22);
  line-height:1.05;
}
.brand .sub{
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
  font-weight:800;
}

.menu{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.menu a{
  text-decoration:none;
  color:rgba(255,140,0,.95);
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,140,0,.18);
  background:rgba(255,140,0,.06);
  transition:.2s ease;
  font-weight:700;
  font-size:14px;
}
.menu a:hover{
  color:#061017;
  background:rgba(0,207,207,.95);
  border-color:rgba(0,207,207,.35);
  box-shadow:0 12px 30px rgba(0,207,207,.18);
  transform:translateY(-1px);
}

.auth{
  display:flex;
  align-items:center;
  gap:12px;
}
.navbar__profile{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:#fff;
  padding:8px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.18);
  transition:.2s ease;
}
.navbar__profile:hover{
  background:rgba(255,255,255,.06);
  transform:translateY(-1px);
  border-color:rgba(255,140,0,.20);
}
.avatar-wrapper{
  width:40px;
  height:40px;
  border-radius:50%;
  overflow:hidden;
  border:2px solid rgba(255,255,255,.9);
  box-shadow:0 0 8px rgba(255,255,255,.18);
  flex-shrink:0;
}
.avatar-wrapper img{
  width:150%;
  height:150%;
  object-fit:cover;
  object-position:center top;
  transform:translateY(12%);
  margin-left:-23%;
  display:block;
}
.user-profile__nickname{
  font-weight:900;
  white-space:nowrap;
}

.logout-link{
  padding:9px 14px;
  background:linear-gradient(135deg, rgba(255,140,0,1), rgba(255,180,72,1));
  color:#0b0f14;
  text-decoration:none;
  border-radius:14px;
  font-weight:950;
  transition:.2s ease;
  border:0;
  box-shadow:0 14px 38px rgba(255,140,0,.18);
}
.logout-link:hover{
  transform:translateY(-1px);
  background:linear-gradient(135deg, rgba(0,207,207,1), rgba(0,255,231,1));
  box-shadow:0 16px 46px rgba(0,207,207,.16);
  color:#061017;
}

.auth a:not(.navbar__profile):not(.logout-link){
  padding:9px 14px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  color:#fff;
  text-decoration:none;
  border-radius:14px;
  font-weight:900;
  transition:.2s ease;
}
.auth a:not(.navbar__profile):not(.logout-link):hover{
  border-color:rgba(255,140,0,.45);
  background:rgba(255,140,0,.12);
  color:rgba(0,207,207,.95);
  transform:translateY(-1px);
}
.wrap{
  width:min(1200px,94vw);
  margin:24px auto 42px;

  flex:1;
}

.hero{
  display:grid;
  grid-template-columns: 1.05fr .95fr;
  gap:18px;
  align-items:stretch;
  margin-bottom:18px;
}
.hero-card{
  border-radius:22px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.42);
  box-shadow:var(--shadow);
  overflow:hidden;
  position:relative;
  padding:22px;
  min-height:320px;
}
.hero-card::before{
  content:"";
  position:absolute; inset:-2px;
  background:
    radial-gradient(700px 260px at 14% 18%, rgba(255,140,0,.18), transparent 60%),
    radial-gradient(700px 260px at 86% 34%, rgba(0,207,207,.14), transparent 60%);
  pointer-events:none;
}
.hero-title{
  margin:0;
  font-size:42px;
  font-weight:1100;
  letter-spacing:.4px;
  line-height:1.05;
  position:relative;
  z-index:1;
}
.hero-title b{color:var(--accent)}
.hero-sub{
  margin:12px 0 0;
  color:rgba(255,255,255,.75);
  font-weight:800;
  line-height:1.55;
  max-width:62ch;
  position:relative;
  z-index:1;
}
.hero-actions{
  margin-top:18px;
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  position:relative;
  z-index:1;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:13px 18px;
  border-radius:16px;
  font-weight:1000;
  text-decoration:none;
  transition:.2s ease;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
}
.btn:hover{transform:translateY(-1px); border-color:rgba(255,140,0,.35); background:rgba(255,140,0,.10)}
.btn-primary{
  background:linear-gradient(135deg, rgba(255,140,0,1), rgba(255,180,72,1));
  color:#0b0f14;
  border:0;
  box-shadow:0 14px 38px rgba(255,140,0,.18);
}
.btn-primary:hover{
  background:linear-gradient(135deg, rgba(0,207,207,1), rgba(0,255,231,1));
  color:#061017;
  box-shadow:0 16px 46px rgba(0,207,207,.16);
  border:0;
}

.side{
  border-radius:22px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.42);
  box-shadow:var(--shadow);
  overflow:hidden;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.mini{
  border-radius:18px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.18);
  padding:14px;
}
.mini .t{color:rgba(255,255,255,.62); font-weight:950; font-size:12px}
.mini .v{margin-top:8px; font-weight:1100; font-size:18px; letter-spacing:.2px}
.search{
  display:flex;
  gap:10px;
}
.search input{
  flex:1;
  width:100%;
  padding:13px 14px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.22);
  color:#fff;
  outline:none;
  font-weight:900;
}
.search input::placeholder{color:rgba(255,255,255,.45)}
.search input:focus{
  border-color:rgba(255,140,0,.40);
  box-shadow:0 0 0 4px rgba(255,140,0,.14);
}

.cat-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.chip{
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:#fff;
  text-decoration:none;
  font-weight:1000;
  transition:.2s ease;
}
.chip:hover{transform:translateY(-1px); border-color:rgba(255,140,0,.35); background:rgba(255,140,0,.10)}
.chip.active{
  background:rgba(0,207,207,.14);
  border-color:rgba(0,207,207,.35);
}

.grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:14px;
  margin-top:16px;
}
.card{
  border-radius:22px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.42);
  box-shadow:0 16px 44px rgba(0,0,0,.35);
  overflow:hidden;
  position:relative;
  transition:.2s ease;
  display:flex;
  flex-direction:column;
  min-height: 280px;
}
.card:hover{
  transform:translateY(-2px);
  border-color:rgba(255,140,0,.22);
  background:rgba(255,140,0,.06);
}
.thumb{
  height:128px;
  position:relative;
  overflow:hidden;
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.22));
  border-bottom:1px solid rgba(255,255,255,.08);
}
.thumb::before{
  content:"";
  position:absolute; inset:-2px;
  background:
    radial-gradient(260px 160px at 20% 18%, rgba(255,140,0,.20), transparent 60%),
    radial-gradient(260px 160px at 80% 35%, rgba(0,207,207,.14), transparent 60%);
  pointer-events:none;
}
.iconbox{
  position:absolute;
  left:14px; top:14px;
  width:46px; height:46px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.20);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 14px 30px rgba(0,0,0,.25);
}
.iconbox svg{width:22px;height:22px;fill:currentColor;color:rgba(255,255,255,.90)}
.badge{
  position:absolute;
  right:12px; top:12px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.86);
  font-weight:1000;
  font-size:12px;
  white-space:nowrap;
}
.body{
  padding:14px 14px 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
  flex:1;
}
.title{
  font-weight:1100;
  letter-spacing:.2px;
  font-size:16px;
  margin:0;
  color:#fff;
  min-height: 22px;
}
.desc{
  color:rgba(255,255,255,.72);
  font-weight:800;
  font-size:13px;
  line-height:1.45;
  margin:0;
  min-height: 54px;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
}
.footer{
  margin-top:auto;
  text-align:center;
  padding:30px;
  background:rgba(0,0,0,.6);
  color:#FF8C00;
  font-size:16px;
  text-shadow:0 0 10px #000;
  border-top:1px solid rgba(255,255,255,.1);
}
.price{
  font-weight:1200;
  letter-spacing:.2px;
  color:#d8fff8;
  background:rgba(0,207,207,.10);
  border:1px solid rgba(0,207,207,.22);
  padding:10px 12px;
  border-radius:16px;
  white-space:nowrap;
}
.buy{
  border:0;
  border-radius:16px;
  padding:12px 14px;
  font-weight:1100;
  cursor:pointer;
  color:#0b0f14;
  background:linear-gradient(135deg, rgba(255,140,0,1), rgba(255,180,72,1));
  transition:.2s ease;
  box-shadow:0 14px 38px rgba(255,140,0,.14);
  white-space:nowrap;
}
.buy:hover{
  transform:translateY(-1px);
  background:linear-gradient(135deg, rgba(0,207,207,1), rgba(0,255,231,1));
  color:#061017;
  box-shadow:0 16px 46px rgba(0,207,207,.16);
}

.toast{
  position:fixed;
  top:18px;
  right:18px;
  min-width:280px;
  max-width:520px;
  padding:14px;
  border-radius:16px;
  display:flex;
  align-items:flex-start;
  gap:10px;
  font-weight:900;
  color:#fff;
  box-shadow:0 18px 60px rgba(0,0,0,.45);
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  opacity:0;
  transform:translateX(120%);
  animation:slideIn .45s ease forwards, fadeOut .35s ease forwards 5.2s;
  z-index:9999;
}
.toast.success{background:rgba(0,200,125,.92)}
.toast.error{background:rgba(255,60,60,.92)}
.toast svg{width:20px;height:20px;flex-shrink:0;margin-top:1px}
.toast .msg{font-weight:900;line-height:1.35}
.toast .small{display:block;font-weight:800;opacity:.92;margin-top:4px;font-size:12px}
@keyframes slideIn{to{transform:translateX(0);opacity:1}}
@keyframes fadeOut{to{transform:translateX(120%);opacity:0}}

.modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.78);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  z-index:10000;
  padding:18px;
}
.modal.show{display:flex}
.modal-box{
  width:min(520px, 94vw);
  border-radius:22px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(10,10,12,.92);
  box-shadow:0 30px 90px rgba(0,0,0,.70);
  overflow:hidden;
}
.modal-hd{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.modal-hd strong{font-weight:1100;color:rgba(255,255,255,.92)}
.x{
  width:38px;height:38px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:#fff;
  cursor:pointer;
  font-weight:1100;
  transition:.2s ease;
}
.x:hover{transform:translateY(-1px); border-color:rgba(255,140,0,.35); background:rgba(255,140,0,.10)}
.modal-bd{padding:16px}
.form input, .form select{
  width:100%;
  padding:12px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.22);
  color:#fff;
  outline:none;
  font-weight:900;
  margin-top:10px;
}
.form input[readonly]{opacity:.92}
.form select{cursor:pointer}
.help{
  margin-top:12px;
  color:rgba(255,255,255,.72);
  font-weight:800;
  line-height:1.45;
}
.pay{
  margin-top:10px;
  padding:12px 12px;
  border-radius:18px;
  border:1px solid rgba(255,140,0,.18);
  background:rgba(255,140,0,.08);
  font-weight:950;
  color:#fff;
}
.form .go{
  width:100%;
  margin-top:12px;
  border:0;
  border-radius:16px;
  padding:13px 14px;
  font-weight:1100;
  cursor:pointer;
  color:#0b0f14;
  background:linear-gradient(135deg, rgba(255,140,0,1), rgba(255,180,72,1));
  transition:.2s ease;
  box-shadow:0 14px 38px rgba(255,140,0,.14);
}
.form .go:hover{
  transform:translateY(-1px);
  background:linear-gradient(135deg, rgba(0,207,207,1), rgba(0,255,231,1));
  color:#061017;
  box-shadow:0 16px 46px rgba(0,207,207,.16);
}

@media (max-width: 1100px){
  .grid{grid-template-columns:repeat(3, minmax(0, 1fr))}
}
@media (max-width: 980px){
  .menu{display:none}
  .top-panel{padding:12px 16px}
  .brand img{height:40px}
  .user-profile__nickname{display:none}
  .hero{grid-template-columns:1fr}
  .hero-title{font-size:34px}
  .grid{grid-template-columns:repeat(2, minmax(0, 1fr))}
}
@media (max-width: 520px){
  .grid{grid-template-columns:1fr}
  .hero-title{font-size:30px}
}