/* ============ MUDMAN SHOP — тёмно-синий минимализм ============ */

:root {
  --bg-0: #0b111c;
  --panel: rgba(13, 20, 32, 0.72);
  --panel-solid: #101827;
  --line: rgba(190, 210, 240, 0.12);
  --text: #dde6f2;
  --text-dim: #8c9bb2;
  --accent: #c94f43;
  --accent-dark: #93382f;
  --ok: #6fae62;
  --gold: #d4b454;
  --radius: 6px;
  font-size: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  min-height: 100vh;
  background: var(--bg-0);
  color: var(--text);
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---- фон-картинка с размытием и виньеткой ---- */
.bg {
  position: fixed;
  inset: -40px;
  background: url("assets/bg.png") center / cover no-repeat;
  filter: blur(12px) saturate(0.7) brightness(0.55);
  z-index: -2;
}
.vignette {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 30%, rgba(4, 8, 15, 0.82) 100%),
    linear-gradient(180deg, rgba(6, 10, 18, 0.55), rgba(6, 10, 18, 0.25) 30%, rgba(4, 8, 15, 0.8) 100%);
  z-index: -1;
}

/* ============ ШАПКА ============ */
.topbar {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 16px 44px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 13, 22, 0.66);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  user-select: none;
}
.logo span { color: var(--accent); }

.nav { display: flex; gap: 6px; }

.nav-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  padding: 10px 18px;
  cursor: pointer;
  border-radius: var(--radius);
  transition: color 0.25s, background 0.25s;
}
.nav-btn:hover { color: var(--text); }
.nav-btn.active { color: var(--text); background: rgba(201, 79, 67, 0.16); }

.user-zone { margin-left: auto; display: flex; align-items: center; gap: 16px; }

.balance { display: flex; align-items: center; gap: 12px; animation: fadeIn 0.4s ease; }
.balance-value { font-weight: 700; letter-spacing: 0.04em; }

/* ============ КНОПКИ ============ */
.btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 10px 22px;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.15s;
}
.btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(190, 210, 240, 0.3); }
.btn:active { transform: scale(0.97); }

.btn-steam { background: var(--accent-dark); border-color: transparent; }
.btn-steam:hover { background: var(--accent); border-color: transparent; }

.btn-small { padding: 6px 14px; font-size: 0.8rem; }
.btn-ghost { background: transparent; }

.btn-buy { background: var(--accent-dark); border-color: transparent; font-weight: 600; }
.btn-buy:hover { background: var(--accent); }
.btn-buy.btn-owned,
.btn-buy.btn-owned:hover {
  background: #4d535c;
  border-color: rgba(255, 255, 255, 0.08);
  color: #c0c4ca;
  cursor: default;
  transform: none;
}

/* ============ РАСКЛАДКА: сайдбар слева + контент ============ */
.layout {
  display: flex;
  gap: 44px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 44px;
  align-items: flex-start;
}

main { flex: 1; min-width: 0; }

/* ============ САЙДБАР СЕРВЕРА ============ */
.sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 108px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.5s ease;
}

.server-title {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  line-height: 1;
}

.server-subtitle {
  margin-top: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent);
}

.server-description {
  margin-top: 20px;
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.035);
  border-left: 2px solid var(--accent);
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.5;
}
.server-description strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.server-online {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 24px 0 10px;
}

.dot {
  width: 9px; height: 9px;
  background: var(--ok);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.dot.offline { background: #687384; animation: none; box-shadow: none; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(111, 174, 98, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(111, 174, 98, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 174, 98, 0); }
}

.server-ip {
  font-family: Consolas, monospace;
  font-size: 0.92rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: inline-block;
}
.server-ip:hover { color: var(--text); border-color: rgba(190, 210, 240, 0.3); }

.sidebar-sep { height: 1px; background: var(--line); margin: 24px 0; }

.sidebar-caption {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.server-features { list-style: none; }
.server-features li {
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 7px 0 7px 18px;
  position: relative;
  transition: color 0.2s;
}
.server-features li:hover { color: var(--text); }
.server-features li[data-preview] { cursor: help; }
.server-features li::before {
  content: "";
  position: absolute;
  left: 0; top: 15px;
  width: 8px; height: 2px;
  background: var(--accent);
}

.feature-preview {
  position: fixed;
  width: 260px;
  aspect-ratio: 1 / 1;
  padding: 5px;
  background: rgba(10, 16, 26, 0.94);
  border: 1px solid rgba(190, 210, 240, 0.28);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  z-index: 90;
  animation: featurePreviewIn 0.18s ease;
  overflow: hidden;
}
.feature-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 3px;
}
.feature-preview.is-wide {
  width: 360px;
  aspect-ratio: 639 / 281;
}
.feature-preview.is-wide img { object-fit: contain; }
@keyframes featurePreviewIn {
  from { opacity: 0; transform: translateX(7px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ============ КОНТЕНТ ============ */
.tab { display: none; }
.tab.active { display: block; animation: fadeIn 0.35s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.section-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 22px;
}

/* ============ ТОВАРЫ ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s;
  animation: fadeIn 0.5s ease backwards;
}
.card:nth-child(1) { animation-delay: 0.03s; }
.card:nth-child(2) { animation-delay: 0.06s; }
.card:nth-child(3) { animation-delay: 0.09s; }
.card:nth-child(4) { animation-delay: 0.12s; }
.card:nth-child(5) { animation-delay: 0.15s; }
.card:nth-child(6) { animation-delay: 0.18s; }
.card:nth-child(7) { animation-delay: 0.21s; }
.card:nth-child(8) { animation-delay: 0.24s; }

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(201, 79, 67, 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.card-img {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: radial-gradient(ellipse at 50% 62%, rgba(190, 215, 255, 0.08), transparent 68%);
}
.card-img img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.55));
  transition: transform 0.3s ease;
}
.card:hover .card-img img { transform: scale(1.05); }

.card-body { padding: 14px 18px 18px; border-top: 1px solid var(--line); }

.card-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.card-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }

.card-price { font-size: 1.08rem; font-weight: 700; white-space: nowrap; }
.card-price small { font-size: 0.7rem; color: var(--text-dim); font-weight: 500; }

.card-row .btn-buy { padding: 9px 26px; }

/* ---- VIP-карточка ---- */
.card.vip .card-img {
  background:
    radial-gradient(ellipse at 50% 55%, rgba(212, 180, 84, 0.16), transparent 70%);
  flex-direction: column;
  gap: 14px;
}
.vip-mark {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: 0.34em;
  color: var(--gold);
  text-shadow: 0 0 34px rgba(212, 180, 84, 0.45);
}
.vip-sub {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.card.vip:hover { border-color: rgba(212, 180, 84, 0.5); }
.card.vip-owned:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}
.card.vip-owned:hover .card-img img { transform: none; }
.card.vip-owned .card-img { cursor: default; }

/* ============ ЛИЧНЫЙ КАБИНЕТ ============ */
.account-locked {
  text-align: center;
  padding: 110px 0;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.account-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 22px;
}

.acc-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  backdrop-filter: blur(8px);
}

.acc-card-title {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.acc-profile { display: flex; align-items: center; gap: 16px; }
.acc-avatar {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  background: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.3rem;
}
.acc-avatar.has-image {
  background-position: center;
  background-size: cover;
  color: transparent;
}

.btn:disabled { opacity: 0.55; cursor: wait; }
.acc-nick { font-weight: 600; margin-bottom: 2px; }
.acc-steamid { font-size: 0.8rem; color: var(--text-dim); font-family: Consolas, monospace; }

.vip-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.vip-badge.active { background: rgba(212, 180, 84, 0.16); color: var(--gold); }
.vip-badge.inactive { background: rgba(255, 255, 255, 0.06); color: var(--text-dim); }
.vip-until { margin-top: 10px; font-size: 0.85rem; color: var(--text-dim); }

.acc-balance { font-size: 1.6rem; font-weight: 700; margin-bottom: 14px; }

.history { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.history th {
  text-align: left;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.73rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.history td { padding: 11px 12px; border-bottom: 1px solid rgba(190, 210, 240, 0.05); }
.history tr:last-child td { border-bottom: none; }

.amount-plus { color: #8fc07f; }
.amount-minus { color: #d98d84; }

.status-pill {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.status-ok { background: rgba(111, 174, 98, 0.16); color: #8fc07f; }

/* ============ МОДАЛКА ПОДТВЕРЖДЕНИЯ ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 15, 0.72);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.22s ease;
}

.modal {
  width: 400px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 30px 28px;
  position: relative;
  animation: modalIn 0.28s ease;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.modal-close {
  position: absolute;
  top: 10px; right: 14px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }

.modal-caption {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.modal-product { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.modal-product img {
  width: 74px; height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.5));
}
.modal-product img[src=""] { display: none; }

.modal-title { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.06em; }

.kit-list { list-style: none; margin: 4px 0 16px; }
.kit-list li {
  padding: 7px 0 7px 18px;
  font-size: 0.9rem;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(190, 210, 240, 0.05);
  position: relative;
}
.kit-list li:last-child { border-bottom: none; }
.kit-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 16px;
  width: 7px; height: 2px;
  background: var(--accent);
}

.modal-price { font-size: 1.35rem; font-weight: 800; margin: 6px 0 18px; }

.modal-actions { display: flex; gap: 12px; }
.modal-actions .btn { flex: 1; }

/* ============ ТОСТ ============ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 14px 26px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  z-index: 200;
  animation: toastIn 0.3s ease;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ============ ПОДВАЛ ============ */
.footer {
  text-align: center;
  padding: 24px;
  color: rgba(140, 155, 178, 0.45);
  font-size: 0.78rem;
  border-top: 1px solid var(--line);
}

.footer-vk {
  width: fit-content;
  margin: 12px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8c9bb2;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-vk:hover,
.footer-vk:focus-visible {
  color: #ffffff;
  transform: translateY(-1px);
}

.footer-vk:focus-visible {
  outline: 2px solid #447bba;
  outline-offset: 4px;
  border-radius: 4px;
}

.footer-vk-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  padding: 2px;
  border-radius: 6px;
  fill: currentColor;
  background: #447bba;
  color: #ffffff;
}

/* Мобильная раскладка не меняет десктопные размеры и анимации. */
@media (max-width: 900px) {
  .topbar { gap: 18px; padding: 14px 20px; flex-wrap: wrap; }
  .user-zone { margin-left: 0; }
  .layout { display: block; padding: 24px 20px 36px; }
  .sidebar { position: static; width: 100%; margin-bottom: 30px; }
  .account-row { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  :root { font-size: 15px; }
  .topbar { align-items: stretch; }
  .logo { width: 100%; }
  .nav { order: 3; width: 100%; }
  .nav-btn { flex: 1; padding-inline: 10px; }
  .user-zone { margin-left: auto; max-width: 100%; }
  .balance { flex-wrap: wrap; justify-content: flex-end; }
  .layout { padding: 18px 14px 30px; }
  .sidebar { padding: 24px 20px; }
  .server-title { font-size: 1.75rem; }
  .grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .card-img { max-height: 340px; }
  .acc-card { min-width: 0; }
  .acc-card.wide { overflow-x: auto; }
  .history { min-width: 570px; }
  .modal { width: calc(100vw - 28px); padding: 24px 20px; }
  .toast { width: calc(100vw - 28px); bottom: 18px; text-align: center; }
  .feature-preview { width: min(72vw, 280px); }
  .feature-preview.is-wide { width: min(86vw, 360px); }
}
