/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #0b0f14;
  --bg2:          #111820;
  --bg3:          #19222e;
  --border:       #1e2d3d;
  --border-hover: #2a4060;
  --accent:       #1a8cff;
  --accent-dark:  #0068d6;
  --accent-glow:  rgba(26,140,255,.14);
  --text:         #e8f0fa;
  --text-muted:   #5a7a9e;
  --radius:       12px;
  --shadow:       0 4px 24px rgba(0,0,0,.4);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.55);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,15,20,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 62px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.logo__pixel { color: var(--accent); }
.logo__mood  { color: var(--text); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav__link {
  color: var(--text-muted);
  font-size: .88rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: color .22s, background .22s;
}
.nav__link:hover {
  color: var(--accent);
  background: var(--accent-glow);
  text-decoration: none;
}

.server-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  white-space: nowrap;
  transition: border-color .22s, box-shadow .22s;
}
.server-badge:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.badge__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #2a4060;
  flex-shrink: 0;
  transition: background .4s;
}
.badge__dot.online  { background: #22c55e; box-shadow: 0 0 6px #22c55e88; }
.badge__dot.offline { background: #ef4444; }

/* ===== HERO ===== */
.hero {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #0b0f14 0%, #0d1829 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(26,140,255,.09) 0%, transparent 70%);
  pointer-events: none;
}
.hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.hero__title {
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.5px;
  color: var(--text);
  animation: fadeInUp .5s .05s both;
}
.hero__ip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
  animation: fadeInUp .5s .18s both;
}
.hero__ip code {
  font-family: 'Courier New', monospace;
  font-size: .95rem;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 9px 18px;
  color: var(--accent);
  cursor: pointer;
  transition: border-color .22s, box-shadow .22s;
}
.hero__ip code:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.hero__stats {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
  animation: fadeIn .6s .3s both;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 28px;
  transition: border-color .22s, box-shadow .22s;
}
.stat:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.stat__val {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat__label {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-top: 4px;
  font-weight: 600;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: .88rem;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  padding: 10px 20px;
  transition: background .22s, color .22s, border-color .22s, box-shadow .22s, opacity .2s;
  white-space: nowrap;
  font-family: inherit;
  letter-spacing: .01em;
}
.btn:active { opacity: .85; }

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(26,140,255,.25);
}
.btn--primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.btn--ghost {
  background: var(--bg3);
  color: var(--accent);
  border: 1.5px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn--danger {
  background: #ef4444;
  color: #fff;
}
.btn--danger:hover { background: #dc2626; }

.btn--sm   { font-size: .78rem; padding: 6px 14px; border-radius: 8px; }
.btn--full { width: 100%; }

/* ===== SECTIONS ===== */
.section { padding: 72px 0; }
.section--alt {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  gap: 16px;
  flex-wrap: wrap;
}
.section__title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -.6px;
  color: var(--text);
}

/* ===== FILTERS ===== */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter {
  background: var(--bg3);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .22s, color .22s, background .22s, box-shadow .22s;
  font-family: inherit;
}
.filter:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.filter.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ===== PRODUCTS GRID ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .25s, box-shadow .25s;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.product-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow-lg);
}

.product-card__img {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  min-height: 130px;
  transition: background .25s;
}
.product-card:hover .product-card__img { background: #1a2a3d; }

.product-card__body  { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-card__cat   {
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; color: var(--accent);
}
.product-card__name  { font-size: 1rem; font-weight: 700; color: var(--text); }
.product-card__desc  { font-size: .83rem; color: var(--text-muted); flex: 1; line-height: 1.5; }
.product-card__footer {
  display: flex; align-items: center;
  justify-content: space-between; margin-top: 16px; gap: 8px;
}
.product-card__price { font-size: 1.15rem; font-weight: 800; color: var(--text); }
.product-card__price small { font-size: .72rem; font-weight: 500; color: var(--text-muted); margin-left: 2px; }

.badge-sale {
  background: #f59e0b;
  color: #000;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
}

.empty-msg { color: var(--text-muted); text-align: center; padding: 48px 0; font-size: .95rem; }

/* ===== INFO GRID ===== */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 36px;
}
.info-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  transition: border-color .25s, box-shadow .25s;
}
.info-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.info-card__icon { font-size: 1.9rem; margin-bottom: 12px; }
.info-card h3 { font-size: .95rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.info-card p  { font-size: .85rem; color: var(--text-muted); }
.info-card small { font-size: .78rem; }

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 8px; margin-top: 36px; }
.faq-item {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .22s, box-shadow .22s;
}
.faq-item:hover { border-color: var(--border-hover); }
.faq-item[open] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.faq-item summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 700;
  font-size: .93rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--accent);
  transition: opacity .22s;
  font-weight: 400;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 22px 18px; color: var(--text-muted); font-size: .88rem; line-height: 1.6; }

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.72);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  max-width: 460px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: fadeIn .25s both;
}
.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, color .2s, background .2s;
  font-family: inherit;
}
.modal__close:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.modal-product__img   { font-size: 3.5rem; margin-bottom: 14px; }
.modal-product__cat   { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--accent); margin-bottom: 4px; }
.modal-product__name  { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; color: var(--text); }
.modal-product__desc  { font-size: .88rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }
.modal-product__price { font-size: 1.6rem; font-weight: 800; margin-bottom: 22px; color: var(--accent); }

.modal-form { display: flex; flex-direction: column; gap: 12px; }
.modal-form label { font-size: .82rem; font-weight: 700; color: var(--text-muted); }
.modal-form input, .modal-form select {
  width: 100%;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: .9rem;
  padding: 11px 14px;
  outline: none;
  transition: border-color .22s, box-shadow .22s;
  font-family: inherit;
}
.modal-form input:focus, .modal-form select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  background: var(--bg2);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.footer__inner p    { font-size: .85rem; color: var(--text-muted); }
.footer__copy       { font-size: .75rem; color: #2a4060; }
.footer__mail       { color: var(--accent); transition: opacity .2s; }
.footer__mail:hover { opacity: .75; text-decoration: none; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  color: var(--text);
  padding: 13px 22px;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  z-index: 300;
  max-width: 300px;
}
.toast.show { opacity: 1; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position:  400px 0; }
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); }
  50%       { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
}

/* Online badge pulse */
.badge__dot.online { animation: pulseDot 2.2s ease-in-out infinite; }

/* Skeleton loader */
.stat__val.loading {
  display: inline-block;
  width: 44px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--bg3) 25%, var(--border) 50%, var(--bg3) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite linear;
}

/* Info cards staggered */
.info-card { animation: fadeIn .5s both; }
.info-grid .info-card:nth-child(1) { animation-delay: .05s; }
.info-grid .info-card:nth-child(2) { animation-delay: .12s; }
.info-grid .info-card:nth-child(3) { animation-delay: .19s; }
.info-grid .info-card:nth-child(4) { animation-delay: .26s; }

/* FAQ staggered */
.faq-item { animation: fadeIn .4s both; }
.faq-list .faq-item:nth-child(1) { animation-delay: .04s; }
.faq-list .faq-item:nth-child(2) { animation-delay: .10s; }
.faq-list .faq-item:nth-child(3) { animation-delay: .16s; }
.faq-list .faq-item:nth-child(4) { animation-delay: .22s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
  .hero__inner { flex-direction: column; align-items: flex-start; }
  .hero__stats { gap: 10px; }
  .hero__stats .stat { padding: 14px 18px; }
  .nav { display: none; }
  .header__inner { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
