:root {
  --primary: #15181F;
  --secondary: #232735;
  --accent: #3D7FFF;
  --success: #21D07A;
  --danger: #F14B6E;
  --glass: rgba(30,36,50,0.75);
}
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: linear-gradient(135deg, #15181F 60%, #232735 100%);
  min-height: 100vh;
  overflow: overlay;
}
.glass-card {
  background: var(--glass);
  backdrop-filter: blur(16px);
  box-shadow: 0 0 0 1.5px #232735, 0 0 24px 0 #3D7FFF33;
  border-radius: 2rem;
  border: 1.5px solid #232735;
  position: relative;
}
.logo-pulse {
  animation: logoPulse 2.5s infinite cubic-bezier(0.45,0,0.55,1);
}
@keyframes logoPulse {
  0%,100% { box-shadow: 0 0 0 0 #3D7FFF66; }
  60% { box-shadow: 0 0 0 15px #3D7FFF11; }
}
.pin-digit[data-filled="true"] {
  background: linear-gradient(135deg,#232735 60%,#3D7FFF88 100%);
  border-color: #3D7FFF;
  color: #fff;
}
.pin-digit[data-filled="false"] {
  background: #222533;
  border-color: #232735;
  color: #475569;
}
.pin-digit:focus {
  outline: 2px solid #3D7FFF;
  outline-offset: 2px;
}
.pin-key.active {
  background: #3D7FFF22;
  box-shadow: 0 0 0 2px #3D7FFF88 inset;
}
.pin-key {
  --transition: all 0.15s ease;
}
.pin-digit {
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.shake {
  animation: shake 0.38s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes shake {
  10%, 90% { transform: translateX(-2px);}
  20%, 80% { transform: translateX(4px);}
  30%, 50%, 70% { transform: translateX(-8px);}
  40%, 60% { transform: translateX(8px);}
}
/* Subtle background mesh animation */
.bg-mesh {
  position: fixed;
  z-index: 0;
  width: 100vw; height: 100vh;
  top: 0; left: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-blur-shape {
  position: absolute;
  border-radius: 9999px;
  filter: blur(35px);
  opacity: 0.10;
}
.bg-blur-shape1 { background: #3D7FFF; width: 320px; height: 180px; top: 12%; left: 15%; animation-delay: 0s;}
.bg-blur-shape2 { background: #F14B6E; width: 160px; height: 110px; top: 58%; left: 70%; animation-delay: 2.7s;}
.bg-blur-shape3 { background: #21D07A; width: 190px; height: 90px; top: 75%; left: 17%; animation-delay: 5s;}

@keyframes float {
  0% { transform:translateY(0px) scale(1);}
  100% { transform:translateY(24px) scale(1.07);}
}
/* Hide scroll on mobile */
html, body { overscroll-behavior: none; }
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  touch-action: manipulation;
  scrollbar-color: #15181f #15181f00;
}
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  touch-action: manipulation;
}

.spinner {
  width: 38px;
  height: 38px;
  display: inline-block;
  border: 4px solid #3D7FFF33;
  border-top: 4px solid #3D7FFF;
  border-radius: 50%;
  animation: spin 1.1s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

img { pointer-events: none; }

/* Bottom section panel */
.section-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  width: 570px;
  justify-self: anchor-center;
  border-radius: 15px;
  z-index: 20;
  background: rgba(21,24,31,0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 28px 0 #23273555;
  margin-top: 2.5rem;
  border: 1px solid #232735;
  display: flex;
  padding: 0.5rem 1.5rem;
  gap: 0.5rem;
  max-width: 100%;
  font-family: 'Inter',sans-serif;
}
@media (max-width: 480px) {
  .section-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 0.5rem 0.5rem;
    border-radius: 15px 15px 0 0;
  }
}
.section-bar-btn {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  padding: 1em 1.2em;
  border-radius: 0.8em;
  font-weight: 600;
  font-size: 1rem;
  color: #AAB6D3;
  background: none;
  border: none;
  transition: background 0.16s, color 0.16s;
  cursor: pointer;
  outline: none;
  user-select: none;
}
.section-bar-btn p {
  --display: none;
  --opacity: 0;
  --width: 0;
  --max-width: 0;
  --overflow: hidden;
  --white-space: nowrap;
  --margin-left: -10px;
  --transition: all 0.5s ease;
  color: #7d99d1;
}
.section-bar-btn:hover,
.section-bar-btn:focus {
  background: #232735cc;
  color: #3D7FFF;
}
.section-bar-btn svg {
  width: auto;
  height: 2em;
  opacity: 0.92;
  flex-shrink: 0;
  color: #7d99d1;
}
.section-bar-btn.active {
  transition: all 0.5s ease;
  color: #3D7FFF;
  background: #23273599;
}
.section-bar-btn.active svg {
  fill: #3D7FFF;
}
.section-bar-btn.active p {
  display: flex;
  --opacity: 1;
  --width: auto;
  --margin-left: 0px;
  --max-width: 100px; /* Подберите значение, которое подходит для вашего текста */
  color: #3D7FFF
}


.fadeout {
  opacity: 0;
  animation: fade 0.5s forwards;
}
@keyframes fade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.hide {
  display: none !important;
}

.item-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}
.item-img-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0.75rem;
  z-index: 0;
  background: #232735;
  transition: box-shadow .2s;
}
.item-qty-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  min-width: 2.1em;
  padding: 0.1em 0.7em;
  background: linear-gradient(90deg,#3D7FFF 70%,#21D07A 100%);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 9999px;
  box-shadow: 0 2px 10px 0 #3D7FFF44;
  z-index: 2;
  text-align: center;
  letter-spacing: 0.02em;
  pointer-events: none;
  user-select: none;
}
.item-info {
  position: relative;
  z-index: 1;
  background: rgba(35,39,53,0.77);
  border-radius: 0.75rem;
  width: 94%;
  margin-bottom: 0.5rem;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.1rem 0.4rem 0.7rem 0.4rem;
  box-shadow: 0 4px 16px 0 #15181f1a;
}

.aspect_video {
  aspect-ratio: 4 / 3;
}