:root {
  --bg-base: #06020d;
  --panel-bg: rgba(15, 8, 30, 0.78);
  --panel-border: rgba(217, 70, 239, 0.34);
  --neon-main: #c026d3;
  --neon-bright: #e879f9;
  --neon-purple: #7c3aed;

  --text-main: #f6f3ff;
  --text-muted: #a699c9;
  --text-dim: #706494;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Rich Neon Purple Atmospheric Background */
.bg-backdrop {
  position: fixed;
  inset: 0;
  z-index: -4;
  background:
    radial-gradient(circle at 18% 12%, rgba(124, 58, 237, 0.38) 0%, transparent 45%),
    radial-gradient(circle at 84% 78%, rgba(217, 70, 239, 0.34) 0%, transparent 48%),
    radial-gradient(circle at 50% 0%, rgba(168, 85, 247, 0.42) 0%, transparent 56%),
    linear-gradient(180deg, #0d051d 0%, #05020b 100%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(to right, rgba(168, 85, 247, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(217, 70, 239, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 25%, #000 35%, transparent 82%);
  pointer-events: none;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  z-index: -2;
  pointer-events: none;
  animation: orbDrift 14s ease-in-out infinite alternate;
}

.bg-orb-1 {
  width: 520px;
  height: 520px;
  top: -140px;
  left: -100px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.36), transparent 70%);
}

.bg-orb-2 {
  width: 480px;
  height: 480px;
  bottom: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.28), transparent 70%);
  animation-delay: -6s;
}

@keyframes orbDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(26px, -22px) scale(1.08); }
}

.bg-vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at center, transparent 48%, rgba(3, 1, 8, 0.85) 100%);
  pointer-events: none;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(217, 70, 239, 0.2);
  background: rgba(8, 3, 18, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: #fff;
}

.logo-mark svg {
  width: 34px;
  height: 34px;
  display: block;
  filter: drop-shadow(0 0 12px rgba(232, 121, 249, 0.55));
}

.logo-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-text {
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
  font-size: 1.08rem;
  letter-spacing: 0.08em;
}

.logo-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--neon-bright);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.18s, text-shadow 0.18s;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  text-shadow: 0 0 14px rgba(232, 121, 249, 0.65);
}

.ip-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(192, 38, 211, 0.2));
  border: 1px solid rgba(232, 121, 249, 0.5);
  border-radius: 12px;
  color: #fff;
  padding: 8px 15px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(192, 38, 211, 0.28);
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}

.ip-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(192, 38, 211, 0.35));
  box-shadow: 0 0 26px rgba(232, 121, 249, 0.5);
}

.ip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon-bright);
  box-shadow: 0 0 10px var(--neon-bright);
}

.ip-copy-ico {
  width: 14px;
  height: 14px;
  opacity: 0.8;
}

/* Main */
.main-wrap {
  flex: 1;
  padding: 34px 0 54px;
}

.hero-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.ver-pill {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f0abfc;
  background: rgba(147, 51, 234, 0.22);
  border: 1px solid rgba(217, 70, 239, 0.35);
  border-radius: 999px;
  padding: 4px 11px;
  margin-bottom: 10px;
}

.hero-strip-left h1 {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.accent-neon {
  background: linear-gradient(135deg, #c084fc 0%, #f0abfc 50%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(232, 121, 249, 0.5));
}

.hero-strip-left p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.inline-ip {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--neon-bright);
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Segmented Tabs */
.store-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(13, 6, 26, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: 14px;
  backdrop-filter: blur(12px);
}

.s-tab {
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.86rem;
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.18s;
}

.s-tab:hover {
  color: #fff;
}

.s-tab.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.85), rgba(192, 38, 211, 0.85));
  color: #fff;
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.4);
}

/* Two-Panel Store */
.store-panels {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 24px;
  align-items: stretch;
}

.panel {
  position: relative;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  backdrop-filter: blur(22px);
  box-shadow:
    0 0 42px rgba(147, 51, 234, 0.22),
    0 22px 58px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-top-line {
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #7c3aed 0%, #f0abfc 50%, #ec4899 100%);
  box-shadow: 0 2px 24px rgba(232, 121, 249, 0.95), 0 0 42px rgba(168, 85, 247, 0.65);
  flex-shrink: 0;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 3px 0 auto 0;
  height: 68px;
  background: linear-gradient(180deg, rgba(192, 38, 211, 0.14), transparent);
  pointer-events: none;
}

.panel-head {
  position: relative;
  z-index: 1;
  padding: 18px 24px 14px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.96rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.12);
}

.panel-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  color: #e9d5ff;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(217, 70, 239, 0.3);
  border-radius: 999px;
  padding: 2px 9px;
}

/* Left List */
.item-list {
  position: relative;
  z-index: 1;
  max-height: 520px;
  overflow-y: auto;
  padding: 6px 0;
}

.item-list::-webkit-scrollbar {
  width: 5px;
}

.item-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

.item-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #9333ea, #e879f9);
  border-radius: 999px;
}

.item-row {
  position: relative;
  width: 100%;
  margin: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 24px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(168, 85, 247, 0.06);
  color: var(--text-main);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s, padding-left 0.16s;
}

.item-row:last-child {
  border-bottom: none;
}

.item-row:hover {
  background: rgba(168, 85, 247, 0.12);
  padding-left: 28px;
}

.item-row.active {
  background: linear-gradient(90deg, rgba(192, 38, 211, 0.42) 0%, rgba(124, 58, 237, 0.18) 100%);
  box-shadow: 0 0 22px rgba(217, 70, 239, 0.22);
  padding-left: 28px;
}

.item-row.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #f0abfc, #c026d3);
  box-shadow: 0 0 12px #f0abfc;
}

.item-row-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.pixel-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pixel-icon svg {
  width: 44px;
  height: 44px;
  shape-rendering: crispEdges;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.78));
}

.item-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.item-price {
  font-family: "Montserrat", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #f0abfc;
  background: rgba(192, 38, 211, 0.14);
  border: 1px solid rgba(217, 70, 239, 0.26);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.item-price.free {
  color: #86efac;
  background: rgba(74, 222, 128, 0.12);
  border-color: rgba(74, 222, 128, 0.3);
}

/* Right Panel */
.panel-head-right {
  flex-wrap: wrap;
  padding-bottom: 0;
}

.panel-head-right > span {
  padding-bottom: 14px;
}

.dur-tabs,
.qty-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dur-tab,
.qty-tab {
  position: relative;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: "Montserrat", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 4px 4px 14px;
  cursor: pointer;
  transition: color 0.15s;
}

.dur-tab:hover,
.qty-tab:hover {
  color: #fff;
}

.dur-tab.active,
.qty-tab.active {
  color: #fff;
  text-shadow: 0 0 12px rgba(240, 171, 252, 0.55);
}

.dur-tab.active::after,
.qty-tab.active::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #9333ea, #f0abfc);
  box-shadow: 0 0 14px rgba(232, 121, 249, 0.9);
}

.panel-body {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Selected Item Banner */
.selected-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(192, 38, 211, 0.1));
  border: 1px solid rgba(217, 70, 239, 0.25);
}

.selected-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.selected-icon svg {
  width: 52px;
  height: 52px;
  shape-rendering: crispEdges;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.75));
}

.selected-kind {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--neon-bright);
  margin-bottom: 2px;
}

.selected-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.38rem;
  font-weight: 800;
  margin: 0;
}

.detail-heading {
  margin: 0 0 10px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #e879f9;
  letter-spacing: 0.02em;
}

.cmd-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  color: #ece7f8;
}

.cmd-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  line-height: 1.45;
}

.cmd-code {
  color: #f0abfc;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  background: rgba(147, 51, 234, 0.2);
  border: 1px solid rgba(217, 70, 239, 0.26);
  border-radius: 7px;
  padding: 2px 8px;
}

.cmd-arrow {
  color: var(--text-dim);
}

.prefix-tag {
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}

/* Stat Chips Grid for Прочее */
.other-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 10px;
}

.other-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 11px;
  background: rgba(8, 4, 18, 0.7);
  border: 1px solid rgba(168, 85, 247, 0.18);
  font-size: 0.84rem;
  color: var(--text-muted);
}

.other-chip strong {
  color: #f0abfc;
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
}

.other-chip.inherit {
  grid-column: 1 / -1;
  justify-content: center;
  color: #e9d5ff;
  background: rgba(147, 51, 234, 0.16);
  border-color: rgba(217, 70, 239, 0.32);
  font-weight: 600;
}

/* Footer inside Right Panel */
.panel-footer {
  position: relative;
  z-index: 1;
  padding: 18px 26px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(8, 3, 18, 0.55);
  border-top: 1px solid rgba(168, 85, 247, 0.16);
}

.price-readout {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-readout span {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.price-readout strong {
  font-family: "Montserrat", sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 18px rgba(232, 121, 249, 0.45);
}

.buy-btn {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.32), rgba(192, 38, 211, 0.32));
  border: 1.5px solid #e879f9;
  border-radius: 13px;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 14px 32px;
  cursor: pointer;
  box-shadow: 0 0 26px rgba(232, 121, 249, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
}

.buy-btn:hover {
  background: linear-gradient(135deg, #7c3aed, #d946ef);
  box-shadow: 0 0 36px rgba(232, 121, 249, 0.7);
  transform: translateY(-2px);
}

.buy-btn-full {
  width: 100%;
  padding: 14px;
}

/* Footer */
.footer {
  border-top: 1px solid rgba(168, 85, 247, 0.16);
  background: rgba(5, 2, 12, 0.85);
  padding: 18px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 2, 10, 0.82);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  position: relative;
  width: min(440px, 100%);
  background: #100722;
  border: 1px solid rgba(217, 70, 239, 0.45);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75), 0 0 40px rgba(168, 85, 247, 0.25);
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
  background: rgba(217, 70, 239, 0.25);
}

.modal-title {
  margin: 22px 24px 4px;
  font-family: "Montserrat", sans-serif;
  font-size: 1.15rem;
}

.modal-sub {
  margin: 0 24px 18px;
  font-size: 0.86rem;
  color: var(--neon-bright);
}

.modal-form {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.field input[type="text"],
.field input[type="email"] {
  height: 42px;
  background: rgba(7, 3, 15, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.28);
  border-radius: 11px;
  padding: 0 13px;
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.field input[type="text"]:focus,
.field input[type="email"]:focus {
  border-color: var(--neon-bright);
  box-shadow: 0 0 14px rgba(232, 121, 249, 0.25);
}

.pay-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.pay-opt input {
  display: none;
}

.pay-opt span {
  display: block;
  text-align: center;
  padding: 9px 4px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(7, 3, 15, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 10px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.16s;
}

.pay-opt input:checked + span {
  border-color: var(--neon-bright);
  background: rgba(192, 38, 211, 0.24);
  color: #fff;
  box-shadow: 0 0 12px rgba(217, 70, 239, 0.25);
}

.modal-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  background: rgba(147, 51, 234, 0.16);
  border: 1px solid rgba(217, 70, 239, 0.34);
  border-radius: 12px;
}

.modal-total span {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.modal-total strong {
  font-family: "Montserrat", sans-serif;
  font-size: 1.24rem;
}

.rules-list {
  margin: 14px 24px 24px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 150;
  background: #140a28;
  border: 1px solid var(--neon-bright);
  border-radius: 12px;
  color: #fff;
  padding: 11px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 0 24px rgba(217, 70, 239, 0.45);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
  .store-panels {
    grid-template-columns: 1fr;
  }

  .item-list {
    max-height: 320px;
  }
}

@media (max-width: 560px) {
  .panel-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .buy-btn {
    width: 100%;
    text-align: center;
  }

  .pay-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
