/* --- Шрифты и системные настройки iOS --- */
body {
  margin: 0;
  padding: 0;
  background-color: var(--system-background, #06020c); /* Фирменный темно-пурпурный фон */
  color: #ffffff;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.4;
}

/* Заголовки и важные элементы в Space Grotesk */
h1, h2, h3, h4, h5, h6, .logo, .btn, .product-tag, .product-price, .modal-product-price, .modal-tab, .filter-tab, .mobile-nav-item span {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
}

/* --- Переменные iOS Dark Theme (Purple Premium Edition) --- */
:root {
  --system-background: #06020c;
  --secondary-system-background: #11071c;
  --tertiary-system-background: #1d0c2f;
  
  --label-primary: #ffffff;
  --label-secondary: #beb8c9; /* Лавандово-серый */
  --label-tertiary: #6c5480;
  
  --system-blue: #c464fa; /* iOS Premium Purple */
  --system-blue-rgb: 196, 100, 250;
  --system-red: #ff453a;
  --system-green: #30d158;
  
  --separator: rgba(196, 100, 250, 0.15);
  --modal-overlay-bg: rgba(4, 2, 8, 0.85);
  
  --transition-ios: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Скроллбар (Премиальный стиль) --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #06020c;
}
::-webkit-scrollbar-thumb {
  background: rgba(196, 100, 250, 0.25);
  border-radius: 10px;
  border: 2px solid #06020c;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(196, 100, 250, 0.45);
}

/* --- Навигация (iOS Navigation Bar с сильным размытием) --- */
header {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1100px;
  z-index: 1000;
  background: rgba(11, 5, 20, 0.40);
  backdrop-filter: saturate(200%) blur(30px);
  -webkit-backdrop-filter: saturate(200%) blur(30px);
  border: 1px solid rgba(196, 100, 250, 0.2);
  border-radius: 24px;
  padding: 0.8rem 2.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 50px rgba(0,0,0,0.8), inset 0 1px 1px rgba(255,255,255,0.05);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

header:hover {
  border-color: rgba(196, 100, 250, 0.4);
  box-shadow: 0 12px 60px rgba(0,0,0,0.9), 0 0 20px rgba(196, 100, 250, 0.15);
}

.logo {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
  color: var(--label-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo span {
  color: var(--system-blue);
}

#hero-avatar {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 20px 50px rgba(191, 90, 242, 0.4));
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.25, 1), opacity 0.8s ease;
}

#hero-avatar.fly-down {
  transform: translateY(120%) rotate(15deg) scale(0.7);
  opacity: 0;
  pointer-events: none;
}

#hero-anime-girl {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 20px 50px rgba(191, 90, 242, 0.4));
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(100px) scale(0.8);
  opacity: 0;
  pointer-events: none;
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.25, 1), opacity 0.8s ease, filter 0.3s ease;
}

#hero-anime-girl.active {
  transform: translateY(0) scale(1) rotate(0deg);
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}

#hero-anime-girl:hover {
  filter: drop-shadow(0 25px 60px rgba(191, 90, 242, 0.7)) brightness(1.05);
}

#hero-anime-girl:active {
  transform: scale(0.96);
  transition: transform 0.1s ease;
}

nav {
  display: flex;
  gap: 1.8rem;
}

nav a {
  text-decoration: none;
  color: var(--label-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-ios);
}

nav a:hover {
  color: var(--system-blue);
}

.sound-btn {
  background: transparent;
  border: none;
  color: var(--label-secondary);
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-ios);
  outline: none;
}

.sound-btn:hover {
  color: var(--system-blue);
  transform: scale(1.15);
}

.sound-btn svg {
  display: block;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-btn.sound-muted {
  color: var(--label-tertiary);
}

.sound-btn.sound-muted:hover {
  color: var(--system-red);
}

/* --- Герой Секция (В стиле презентаций Apple) --- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8%;
  padding-top: 90px;
  gap: 3rem;
  position: relative;
  background: radial-gradient(circle at 50% 0%, #1c0a2f 0%, #06020c 60%, #000000 100%);
}

.hero-content {
  flex: 1.1;
  max-width: 580px;
  z-index: 10;
}

.hero-tagline {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--system-blue);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.8rem;
  display: inline-block;
}

.hero-title {
  font-size: clamp(2.3rem, 4.5vw, 4rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, #ffffff 40%, #e2b3ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.2rem;
}

.hero-desc {
  color: var(--label-secondary);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.hero-cta-group {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* --- Кнопки iOS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.9rem 2rem;
  border-radius: 14px; /* iOS стандарт скругления */
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-ios);
  will-change: transform;
}

.btn-primary {
  background: linear-gradient(135deg, var(--system-blue) 0%, #a83af0 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 15px rgba(196, 100, 250, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(196, 100, 250, 0.4);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background-color: var(--secondary-system-background);
  color: var(--label-primary);
  border: 1px solid rgba(196, 100, 250, 0.25);
}

.btn-secondary:hover {
  background-color: var(--tertiary-system-background);
  border-color: var(--system-blue);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(196, 100, 250, 0.1);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

/* Декоративный 3D холст справа */
.hero-visual {
  flex: 1.2;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 600px;
  position: relative;
  z-index: 5;
}

.hero-visual-canvas {
  width: 100%;
  height: 100%;
}

/* --- Секция Каталога (В стиле App Store) --- */
.store-section {
  padding: 6rem 8% 4rem 8%;
  background-color: #000000;
  content-visibility: auto;
  contain-intrinsic-size: 1px 800px;
}

.section-header {
  margin-bottom: 3rem;
  text-align: left;
}

.section-subtitle {
  color: var(--label-secondary);
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
  display: block;
}

.section-title {
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #ffffff 60%, var(--system-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Переключатель вкладок iOS (Segmented Control) */
.filter-tabs {
  display: inline-flex;
  background-color: rgba(17, 7, 28, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 4px;
  border-radius: 20px;
  margin-top: 1.5rem;
  border: 1px solid rgba(196, 100, 250, 0.15);
}

.filter-tab {
  background: transparent;
  border: none;
  color: var(--label-secondary);
  padding: 0.6rem 1.6rem;
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  transition: var(--transition-ios);
}

.filter-tab:hover {
  color: var(--label-primary);
}

.filter-tab.active {
  background-color: rgba(196, 100, 250, 0.18);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  border: 0.5px solid rgba(196, 100, 250, 0.25);
}

/* Сетка карточек */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.2rem;
  margin-top: 2rem;
}

.product-card {
  background: rgba(17, 7, 28, 0.35);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(196, 100, 250, 0.15);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.03), 0 10px 30px rgba(0, 0, 0, 0.5);
  transform-style: preserve-3d;
  will-change: transform;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
}

.product-card:hover {
  background: rgba(29, 12, 47, 0.4);
  border-color: rgba(196, 100, 250, 0.45);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(196, 100, 250, 0.25);
}

.product-card.revealed {
  transition: border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease, transform 0.15s cubic-bezier(0.25, 1, 0.5, 1);
  transition-delay: 0s !important;
}

.product-image-container {
  width: 100%;
  height: 260px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(196, 100, 250, 0.15) 0%, rgba(8, 2, 13, 0.8) 100%), #0c0c0e;
  border-bottom: 0.5px solid rgba(196, 100, 250, 0.12);
}

.product-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  box-sizing: border-box;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.product-card:hover .product-card-img {
  transform: scale(1.06);
}

/* Заглушка изображения */
.product-image-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #1c1c1e, #000);
  gap: 10px;
  color: var(--label-secondary);
}

.product-image-fallback svg {
  stroke: var(--system-blue);
}

.product-image-fallback span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Тег категории */
.product-tag {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 5;
  background: rgba(8, 2, 13, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-model { color: #d182ff; }
.tag-render { color: #5ef286; }
.tag-skin {
  color: #5eaeff;
  font-family: 'VT323', monospace;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  line-height: 1;
  padding: 3px 10px 4px 10px;
}

/* Контент карточки */
.product-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin-bottom: 0.5rem;
  color: var(--label-primary);
}

/* Футер карточки */
.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.8rem;
}

.product-price {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--label-primary);
  letter-spacing: -0.2px;
}

.product-price span {
  color: #5ef286;
}

/* Кнопка GET */
.btn-card {
  background: rgba(196, 100, 250, 0.12);
  color: #d182ff;
  padding: 0.5rem 1.6rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 0.5px solid rgba(196, 100, 250, 0.2);
  text-transform: uppercase;
  transition: var(--transition-ios);
  cursor: pointer;
}


/* --- Секция Портфолио --- */
.portfolio-section {
  padding: 6rem 8% 4rem 8%;
  background-color: #000000;
  border-top: 0.5px solid var(--separator);
  content-visibility: auto;
  contain-intrinsic-size: 1px 400px;
}

.portfolio-grid {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 1.5rem 0;
  margin-top: 2rem;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

/* Бесконечный трек-поезд */
.portfolio-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  will-change: transform;
}

.portfolio-track.revealed {
  transition: opacity 0.85s cubic-bezier(0.25, 1, 0.5, 1), transform 0s !important;
  transition-delay: 0s !important;
}

@keyframes trainScroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

/* Карточка работы портфолио в поезде */
.portfolio-item {
  position: relative;
  width: 320px;
  height: 240px;
  flex-shrink: 0;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(17, 7, 28, 0.25);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(196, 100, 250, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s ease, border-color 0.3s ease;
}

.portfolio-item:hover {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(196, 100, 250, 0.25);
  border-color: rgba(196, 100, 250, 0.45);
  z-index: 10;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.portfolio-item:hover img {
  transform: scale(1.08);
}

/* Оверлей с информацией при наведении */
.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.8rem 1.4rem 1.4rem;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.portfolio-item:hover .portfolio-overlay {
  transform: translateY(0);
}

.portfolio-overlay h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.3px;
  margin: 0;
}

.portfolio-overlay span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--system-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Тег категории на карточке портфолио */
.portfolio-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  background: rgba(8, 2, 13, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--system-blue);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.portfolio-item:hover .portfolio-tag {
  opacity: 1;
  transform: translateY(0);
}

/* Пустое состояние портфолио */
.portfolio-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  background: rgba(24, 14, 34, 0.2);
  border: 1px dashed rgba(191, 90, 242, 0.2);
  border-radius: 24px;
  text-align: center;
  gap: 1rem;
}

.portfolio-empty-state svg {
  stroke: var(--label-tertiary);
  opacity: 0.6;
}

.portfolio-empty-state h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--label-secondary);
  margin: 0;
}

.portfolio-empty-state p {
  font-size: 0.9rem;
  color: var(--label-tertiary);
  margin: 0;
  max-width: 360px;
}

/* Лайтбокс (просмотр работы в полноэкранном режиме) */
.portfolio-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  cursor: zoom-out;
}

.portfolio-lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.portfolio-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0.92);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.portfolio-lightbox.active img {
  transform: scale(1);
}

.lightbox-info {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
}

.lightbox-info h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.lightbox-info span {
  font-size: 0.8rem;
  color: var(--label-secondary);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-ios);
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* --- Секция Контактов --- */
.contact-section {
  padding: 5rem 8% 6rem 8%;
  background-color: #000000;
  border-top: 0.5px solid var(--separator);
  content-visibility: auto;
  contain-intrinsic-size: 1px 400px;
}

.contact-info {
  background: rgba(17, 7, 28, 0.4);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  border: 1px solid rgba(196, 100, 250, 0.2);
  border-radius: 28px;
  padding: 4rem 2rem;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(196, 100, 250, 0.1);
  transform-style: preserve-3d;
  will-change: transform;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease, transform 0.15s cubic-bezier(0.25, 1, 0.5, 1);
}

.contact-info:hover {
  border-color: rgba(196, 100, 250, 0.4);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(196, 100, 250, 0.2);
}

.contact-info.revealed {
  transition: border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease, transform 0.15s cubic-bezier(0.25, 1, 0.5, 1);
  transition-delay: 0s !important;
}

.contact-info h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--label-secondary);
  max-width: 600px;
  font-size: 1.05rem;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-btn {
  background-color: var(--secondary-system-background);
  border: 0.5px solid var(--separator);
  color: var(--label-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-ios);
}

.social-btn:hover {
  background-color: var(--tertiary-system-background);
  color: var(--system-blue);
}

/* --- Подвал --- */
footer {
  border-top: 0.5px solid var(--separator);
  padding: 2rem 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--label-secondary);
  font-size: 0.85rem;
  background-color: #000000;
}

footer span {
  color: var(--label-primary);
}

/* --- МОДАЛЬНОЕ ОКНО (В стиле iOS Bottom Sheet) --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  display: flex;
  align-items: flex-end; /* Выравнивание снизу (Bottom Sheet) */
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-overlay-bg);
}

/* Нижняя панель (Bottom Sheet) */
.modal-wrapper {
  position: relative;
  width: 100%;
  max-width: 850px;
  height: 90vh; /* Занимает 90% высоты экрана */
  background: #1c1c1e; /* Цвет iOS Secondary System Background */
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
  transform: translateY(100%); /* Выезд снизу */
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* iOS Grabber (полоска наверху листа) */
.modal-wrapper::before {
  content: '';
  display: block;
  width: 36px;
  height: 5px;
  background-color: var(--label-tertiary);
  border-radius: 3px;
  margin: 10px auto;
  flex-shrink: 0;
}

.modal.active .modal-wrapper {
  transform: translateY(0);
}

/* Закрыть (iOS круглая серая кнопка в углу) */
.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--tertiary-system-background);
  border: none;
  color: var(--label-secondary);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  transition: var(--transition-ios);
}

.modal-close-btn:hover {
  background-color: var(--label-tertiary);
  color: #ffffff;
}

/* Содержимое листа */
.modal-visual-pane {
  width: 100%;
  height: 45vh; /* Верхняя часть - визуал */
  background-color: #0c0c0e;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Вкладки 3D / Галерея (iOS Segmented Control) */
.modal-tabs {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  background-color: rgba(28, 28, 30, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2px;
  border-radius: 8px;
  display: inline-flex;
}

.modal-tab {
  background: transparent;
  border: none;
  color: var(--label-secondary);
  padding: 5px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: var(--transition-ios);
}

.modal-tab.active {
  background-color: #3a3a3c;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Вьюпорты */
.modal-viewport-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.modal-3d-viewport, .modal-gallery-viewport {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.modal-3d-viewport.active, .modal-gallery-viewport.active {
  opacity: 1;
  pointer-events: all;
}

.modal-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Стрелки в стиле iOS */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.5);
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
}

.arrow-left { left: 10px; }
.arrow-right { right: 10px; }

/* Нижняя панель описания (Инфо и ТТХ в стиле App Store) */
.modal-info-pane {
  flex-grow: 1;
  padding: 1.5rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* App Header с иконкой сквиркл и кнопкой GET */
.app-header {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.app-icon {
  width: 72px;
  height: 72px;
  background-color: #0c0c0e;
  border-radius: 22%; /* Фирменный скругленный сквиркл Apple */
  box-shadow: inset 0 0 1px rgba(255,255,255,0.2), 0 4px 10px rgba(0,0,0,0.3);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  box-sizing: border-box;
}

.app-metadata {
  flex-grow: 1;
}

.modal-product-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 2px;
}

.app-category {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--label-secondary);
}

.modal-product-price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--system-green);
  margin-top: 2px;
}

/* Кнопка GET */
.btn-get {
  background-color: var(--system-blue);
  color: #ffffff;
  border: none;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.4rem 1.6rem;
  border-radius: 16px;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  will-change: transform;
}

.btn-get:hover {
  opacity: 1;
  transform: scale(1.06) rotate(-2deg);
  box-shadow: 0 4px 12px rgba(191, 90, 242, 0.4);
}

.modal-product-desc {
  font-size: 0.92rem;
  color: var(--label-secondary);
  line-height: 1.45;
  margin-bottom: 1.8rem;
}

/* Характеристики в стиле таблицы App Store Information */
.modal-specs-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.specs-grid {
  display: flex;
  flex-direction: column;
  background-color: var(--secondary-system-background);
  border-radius: 12px;
  padding: 0 1rem;
  margin-bottom: 2rem;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 0.5px solid var(--separator);
}

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

.spec-label {
  font-size: 0.9rem;
  color: var(--label-secondary);
}

.spec-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--label-primary);
}

/* --- Загрузчик --- */
.model-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0c0c0e;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 15;
  transition: opacity 0.3s ease;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: var(--system-blue);
  animation: spin 0.8s linear infinite;
  margin-bottom: 0.8rem;
}

.model-loader span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--label-secondary);
}

.viewer-instruction {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  font-size: 0.72rem;
  color: var(--label-secondary);
  background: rgba(0,0,0,0.6);
  padding: 4px 10px;
  border-radius: 20px;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Адаптивность для Bottom Sheet --- */
@media (min-width: 851px) {
  /* На десктопе модальное окно выглядит как классическое iOS оверлейное окно по центру */
  .modal {
    align-items: center;
  }
  
  .modal-wrapper {
    height: 80vh;
    max-height: 700px;
    border-radius: 22px; /* Полноценные скругленные углы по кругу */
    flex-direction: row; /* Горизонтальное деление на десктопе */
  }
  
  .modal-wrapper::before {
    display: none; /* Убираем grabber */
  }
  
  .modal-visual-pane {
    flex: 1.1;
    height: 100%;
    border-right: 0.5px solid var(--separator);
  }
  
  .modal-info-pane {
    flex: 0.9;
    height: 100%;
    padding: 2.5rem 2rem;
  }
}

@media (max-width: 968px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 110px;
    padding-bottom: 30px;
    gap: 2rem;
  }
  
  .hero-visual {
    width: 100%;
    height: 350px;
  }
  
  .hero-cta-group {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  header {
    width: 85%;
    padding: 0.6rem 1.5rem;
    top: 12px;
  }
  
  nav {
    display: none;
  }
  
  .hero-title {
    font-size: 2.1rem;
  }
  
  .store-section {
    padding: 4rem 5% 3rem 5%;
  }
  
  .contact-section {
    padding: 4rem 5%;
  }
  
  footer {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.5rem 5%;
  }
}

/* --- Мобильная навигация (Floating Bottom Bar) --- */
.mobile-nav-bar {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 100px !important; /* Чтобы контент не перекрывался плавающим меню */
  }

  header {
    justify-content: center !important;
    width: 85% !important;
    padding: 0.6rem 1.5rem !important;
    top: 12px !important;
  }

  header nav {
    display: none !important;
  }

  .mobile-nav-bar {
    display: flex;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 460px;
    height: 66px;
    background: rgba(8, 2, 13, 0.65);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 0.5px solid rgba(191, 90, 242, 0.25);
    border-radius: 24px;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.08);
    z-index: 1500;
    padding: 0 8px;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--label-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    gap: 5px;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    flex: 1;
    height: 100%;
    padding: 0;
    position: relative;
  }

  .mobile-nav-item svg {
    stroke: currentColor;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
  }

  .mobile-nav-item span {
    transition: color 0.3s ease;
  }

  /* Активное состояние */
  .mobile-nav-item.active {
    color: var(--system-blue);
  }

  .mobile-nav-item.active svg {
    transform: scale(1.15) translateY(-3px);
    filter: drop-shadow(0 0 8px rgba(191, 90, 242, 0.5));
    stroke: var(--system-blue);
  }

  /* Смещение кнопки редактора CMS на мобильных, чтобы не перекрывалось меню */
  .editor-toggle-btn {
    bottom: 100px !important;
    right: 20px !important;
  }

  .editor-panel {
    width: 95% !important;
    bottom: -250px !important;
  }

  .editor-panel.active {
    bottom: 100px !important;
  }
}

/* --- Встроенный визуальный редактор (CMS) --- */
.editor-toggle-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(191, 90, 242, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 0.5px solid rgba(191, 90, 242, 0.25);
  color: #d182ff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: var(--transition-ios);
}

.editor-toggle-btn:hover {
  transform: scale(1.08) rotate(45deg);
  background: rgba(191, 90, 242, 0.25);
  color: #ffffff;
  border-color: rgba(191, 90, 242, 0.5);
  box-shadow: 0 4px 25px rgba(191, 90, 242, 0.35);
}

.editor-panel {
  position: fixed;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 700px;
  background: rgba(28, 28, 30, 0.85);
  backdrop-filter: saturate(180%) blur(30px);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  border-radius: 20px;
  border: 0.5px solid rgba(191, 90, 242, 0.25);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.12);
  z-index: 2400;
  transition: bottom 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  padding: 1.2rem;
  box-sizing: border-box;
}

.editor-panel.active {
  bottom: 24px;
}

.editor-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  border-bottom: 0.5px solid rgba(191, 90, 242, 0.12);
  padding-bottom: 0.5rem;
}

.editor-panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.editor-panel-close {
  background: transparent;
  border: none;
  color: var(--label-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-ios);
}

.editor-panel-close:hover {
  color: #fff;
}

.editor-panel-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.editor-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn-editor-action {
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.editor-hint {
  font-size: 0.76rem;
  color: var(--label-secondary);
  text-align: center;
  margin-top: 0.4rem;
}

[contenteditable="true"] {
  outline: none;
  transition: var(--transition-ios);
  position: relative;
}

[contenteditable="true"]:hover {
  background: rgba(191, 90, 242, 0.08);
  box-shadow: 0 0 0 4px rgba(191, 90, 242, 0.15);
  border-radius: 6px;
  cursor: text;
}

[contenteditable="true"]:focus {
  background: rgba(191, 90, 242, 0.12);
  box-shadow: 0 0 0 6px rgba(191, 90, 242, 0.35);
  border-radius: 6px;
}

.product-card-edit-controls {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  display: none;
  gap: 6px;
}

.editor-mode-active .product-card-edit-controls {
  display: flex;
}

.btn-card-control {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(8, 2, 13, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-ios);
}

.btn-card-control:hover {
  transform: scale(1.1);
}

.btn-card-delete:hover {
  color: var(--system-red);
  border-color: rgba(255, 69, 58, 0.4);
  background: rgba(255, 69, 58, 0.15);
}

.btn-card-edit-props:hover {
  color: var(--system-blue);
  border-color: rgba(191, 90, 242, 0.4);
  background: rgba(191, 90, 242, 0.15);
}

/* --- Стилизация под Minecraft (Пасхалка для Кастомного Скина) --- */

/* 1. Карточка скина в каталоге */
.minecraft-card:hover {
  box-shadow: 4px 4px 0px #000 !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
}

/* 2. Minecraft тема для модального окна */
.theme-minecraft {
  font-family: 'VT323', monospace;
  letter-spacing: 0.5px;
}

.theme-minecraft #modal-title {
  font-family: 'VT323', monospace;
  font-size: 2.2rem;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 2px 2px 0px #3f3f3f;
}

.theme-minecraft #modal-app-category {
  font-family: 'VT323', monospace;
  font-size: 1.3rem;
  color: #5eaeff;
}

.theme-minecraft #modal-price {
  font-family: 'VT323', monospace;
  font-size: 1.6rem;
  color: #5ef286;
  text-shadow: 1px 1px 0px #1e5f30;
}

.theme-minecraft #modal-desc {
  font-family: 'VT323', monospace;
  font-size: 1.25rem;
  line-height: 1.3;
  color: #e0e0e0;
}

.theme-minecraft .modal-specs-title {
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  color: #d182ff;
  text-transform: uppercase;
}

/* Спецификации в стиле Minecraft Инвентаря */
.theme-minecraft .specs-grid {
  background-color: #2c2c2d;
  border: 3px double #3c3c3d;
  box-shadow: inset -2px -2px 0px #1e1e1f, inset 2px 2px 0px #8b8b8b;
  border-radius: 0px;
  padding: 0.5rem 1rem;
}

.theme-minecraft .spec-item {
  border-bottom: 2px dashed #3c3c3d;
  padding: 0.6rem 0;
}

.theme-minecraft .spec-label {
  font-size: 1.25rem;
  color: #aaaaaa;
}

.theme-minecraft .spec-value {
  font-size: 1.25rem;
  color: #ffffff;
  text-shadow: 1px 1px 0px #3f3f3f;
}

/* Кнопка GET в стиле меню Minecraft */
.theme-minecraft .btn-get {
  background-color: #707070;
  border: 2px solid #000;
  box-shadow: inset -2px -2px 0px #3d3d3d, inset 2px 2px 0px #a0a0a0;
  border-radius: 0px;
  color: #e0e0e0;
  font-family: 'VT323', monospace;
  font-size: 1.4rem;
  font-weight: normal;
  text-transform: uppercase;
  padding: 0.5rem 2rem;
  text-shadow: 2px 2px 0px #3f3f3f;
  transition: none;
  cursor: pointer;
}

.theme-minecraft .btn-get:hover {
  background-color: #5eaeff;
  color: #fff;
  border-color: #000;
  box-shadow: inset -2px -2px 0px #2a5f9e, inset 2px 2px 0px #a5d3ff;
  transform: none;
}

/* --- Анимации появления при прокрутке (Scroll Reveal) --- */

.reveal-up, .reveal-left, .reveal-right, .reveal-scale {
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.85s cubic-bezier(0.25, 1, 0.5, 1), transform 0.85s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 1. Появление снизу вверх с легким 3D наклоном на зрителя */
.reveal-up {
  transform: translateY(50px) perspective(1000px) rotateX(12deg) scale(0.96);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0) perspective(1000px) rotateX(0deg) scale(1);
}

/* 2. Выезжание слева */
.reveal-left {
  transform: translateX(-60px);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* 3. Выезжание справа */
.reveal-right {
  transform: translateX(60px);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* 4. Мягкое масштабирование из глубины */
.reveal-scale {
  transform: scale(0.9) translateY(20px);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Каскадная задержка для элементов в сетках */
.products-grid > :nth-child(1) { transition-delay: 0.05s; }
.products-grid > :nth-child(2) { transition-delay: 0.15s; }
.products-grid > :nth-child(3) { transition-delay: 0.25s; }
.products-grid > :nth-child(4) { transition-delay: 0.35s; }
.products-grid > :nth-child(5) { transition-delay: 0.45s; }

.portfolio-grid > :nth-child(1) { transition-delay: 0.05s; }
.portfolio-grid > :nth-child(2) { transition-delay: 0.1s; }
.portfolio-grid > :nth-child(3) { transition-delay: 0.15s; }
.portfolio-grid > :nth-child(4) { transition-delay: 0.2s; }
.portfolio-grid > :nth-child(5) { transition-delay: 0.25s; }
.portfolio-grid > :nth-child(6) { transition-delay: 0.3s; }

@keyframes avatarBounce {
  0% {
    transform: translateY(-50%) scale(0);
  }
  60% {
    transform: translateY(-50%) scale(1.15);
  }
  80% {
    transform: translateY(-50%) scale(0.95);
  }
  100% {
    transform: translateY(-50%) scale(1);
  }
}

/* --- Интерактивный Конфигуратор Скинов (Premium UI) --- */
.configurator-section {
  padding: 6rem 8% 4rem 8%;
  background-color: #000000;
  border-top: 0.5px solid var(--separator);
  content-visibility: auto;
  contain-intrinsic-size: 1px 600px;
}

.configurator-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  margin-top: 2rem;
  align-items: start;
}

/* Настройки (левая колонка) */
.configurator-settings {
  background: rgba(24, 14, 34, 0.25);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(191, 90, 242, 0.2);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 10px 30px rgba(0, 0, 0, 0.4);
}

.control-group {
  margin-bottom: 2.5rem;
}

.control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.control-label-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-icon {
  width: 20px;
  height: 20px;
  filter: invert(1) drop-shadow(0 0 5px rgba(191, 90, 242, 0.6));
}

.control-header label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--label-primary);
  letter-spacing: -0.3px;
}

.control-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--system-blue);
  background: rgba(191, 90, 242, 0.15);
  padding: 4px 10px;
  border-radius: 20px;
  border: 0.5px solid rgba(191, 90, 242, 0.3);
  box-shadow: 0 0 10px rgba(191, 90, 242, 0.1);
  transition: var(--transition-ios);
}

/* Слайдеры */
.range-slider-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.range-slider-wrapper input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 10px;
  background: linear-gradient(to right, var(--tertiary-system-background), var(--system-blue));
  outline: none;
  margin: 15px 0;
  position: relative;
  z-index: 2;
}

.range-slider-wrapper input[type="range"]::-webkit-slider-runnable-track {
  background: transparent;
}

.range-slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--system-blue);
  box-shadow: 0 0 10px rgba(191, 90, 242, 0.8), 0 2px 4px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.range-slider-wrapper input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 15px rgba(191, 90, 242, 1), 0 2px 6px rgba(0,0,0,0.6);
}

.range-slider-wrapper input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.25);
  background: var(--system-blue);
  border-color: #ffffff;
}

/* Метки слайдера */
.slider-ticks {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  margin-top: -5px;
}

.slider-ticks .tick {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--label-secondary);
  cursor: pointer;
  transition: var(--transition-ios);
  position: relative;
}

.slider-ticks .tick.active {
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(191, 90, 242, 0.6);
}

/* Опции (Чекбоксы) */
.options-group h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--label-primary);
  margin-bottom: 1.2rem;
  letter-spacing: -0.3px;
}

.option-checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  cursor: pointer;
  position: relative;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid rgba(191, 90, 242, 0.08);
  transition: var(--transition-ios);
}

.option-checkbox-container:hover {
  background: rgba(191, 90, 242, 0.04);
  border-color: rgba(191, 90, 242, 0.2);
}

.option-checkbox-container input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-custom {
  position: relative;
  height: 22px;
  width: 22px;
  background-color: var(--secondary-system-background);
  border: 1px solid rgba(191, 90, 242, 0.3);
  border-radius: 6px;
  flex-shrink: 0;
  transition: var(--transition-ios);
}

.option-checkbox-container:hover .checkbox-custom {
  border-color: var(--system-blue);
}

.option-checkbox-container input:checked ~ .checkbox-custom {
  background-color: var(--system-blue);
  border-color: var(--system-blue);
  box-shadow: 0 0 10px rgba(191, 90, 242, 0.6);
}

.checkbox-custom::after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.option-checkbox-container input:checked ~ .checkbox-custom::after {
  display: block;
}

.option-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.option-title-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-icon {
  width: 16px;
  height: 16px;
  filter: invert(1) opacity(0.9) drop-shadow(0 0 3px rgba(191, 90, 242, 0.4));
}

.option-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--label-primary);
}

.option-desc {
  font-size: 0.8rem;
  color: var(--label-secondary);
  line-height: 1.4;
}

/* Превью колонка */
.configurator-preview-pane {
  display: flex;
  justify-content: center;
}

.preview-card {
  width: 100%;
  max-width: 380px;
  background: rgba(24, 14, 34, 0.35);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(191, 90, 242, 0.25);
  border-radius: 28px;
  padding: 2.2rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), 0 20px 50px rgba(0, 0, 0, 0.5);
  transform-style: preserve-3d;
  will-change: transform;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.preview-card:hover {
  border-color: rgba(191, 90, 242, 0.4);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(191, 90, 242, 0.2);
}

.preview-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(191, 90, 242, 0.25) 0%, transparent 70%);
  filter: blur(30px);
  z-index: 1;
  pointer-events: none;
  transition: background 0.5s ease;
}

.preview-badge-status {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 5;
  background: rgba(8, 2, 13, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #5eaeff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.preview-image-container {
  width: 100%;
  height: 240px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 2;
  margin-top: 1rem;
  margin-bottom: 2rem;
  background: radial-gradient(circle at center, rgba(191, 90, 242, 0.08) 0%, transparent 75%);
  border-radius: 20px;
}

#preview-skin-img {
  max-height: 220px;
  object-fit: contain;
  transition: filter 0.3s ease, transform 0.5s ease;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
  image-rendering: pixelated;
}

/* Оверлей майнкрафт-сетки */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(191, 90, 242, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191, 90, 242, 0.03) 1px, transparent 1px);
  background-size: 16px 16px;
  border-radius: 20px;
  transition: opacity 0.3s ease;
  opacity: 1;
}

/* Кнопка копирования заказа */
.btn-copy-order {
  border: 1px solid rgba(191, 90, 242, 0.3) !important;
  background-color: rgba(24, 14, 34, 0.5) !important;
  color: var(--system-blue) !important;
  transition: var(--transition-ios) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-copy-order:hover {
  background-color: rgba(191, 90, 242, 0.15) !important;
  border-color: var(--system-blue) !important;
  transform: translateY(-3px) scale(1.05) !important;
  box-shadow: 0 8px 20px rgba(191, 90, 242, 0.15);
}

.btn-copy-order:active {
  transform: translateY(-1px) scale(0.95) !important;
}

.btn-copy-order svg {
  stroke: var(--system-blue);
  transition: stroke 0.3s ease;
}

.btn-copy-order:hover svg {
  stroke: #ffffff;
}

/* Пользовательское соглашение модалка и ссылка */
.modal-wrapper-tos {
  background: rgba(16, 8, 24, 0.92) !important;
  border: 1px solid rgba(191, 90, 242, 0.3) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 45px rgba(191, 90, 242, 0.2) !important;
}

.footer-link:hover {
  color: var(--system-blue) !important;
  text-shadow: 0 0 8px rgba(191, 90, 242, 0.4);
}

/* Цена */
.preview-price-wrapper {
  text-align: center;
  margin-bottom: 1.8rem;
  z-index: 2;
}

.price-label {
  font-size: 0.8rem;
  color: var(--label-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 0.3rem;
}

.price-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 15px rgba(191, 90, 242, 0.5);
  letter-spacing: -1px;
}

/* Кнопка */
.btn-order-telegram {
  width: 100%;
  padding: 0.95rem 1.8rem !important;
  border-radius: 16px !important;
  z-index: 2;
  background-color: var(--system-blue) !important;
  box-shadow: 0 8px 25px rgba(191, 90, 242, 0.4) !important;
  font-size: 0.95rem !important;
  letter-spacing: -0.2px;
}

.btn-order-telegram:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 0 12px 30px rgba(191, 90, 242, 0.6) !important;
}

/* Мобильная адаптивность */
@media (max-width: 900px) {
  .configurator-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .configurator-settings {
    padding: 1.8rem;
  }
}

/* --- Секция Отзывов (Reviews Section) --- */
.reviews-section {
  padding: 6rem 8% 4rem 8%;
  background-color: #000000;
  border-top: 0.5px solid var(--separator);
  content-visibility: auto;
  contain-intrinsic-size: 1px 600px;
}

.reviews-container {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

/* Карточка отзыва */
.review-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3.5rem;
  width: 100%;
  max-width: 900px;
  background: rgba(24, 14, 34, 0.35);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(191, 90, 242, 0.25);
  border-radius: 28px;
  padding: 3rem;
  position: relative;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), 0 20px 50px rgba(0, 0, 0, 0.6);
  transform-style: preserve-3d;
  will-change: transform;
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.15s cubic-bezier(0.25, 1, 0.5, 1);
  overflow: hidden;
}

.review-card:hover {
  border-color: rgba(191, 90, 242, 0.45);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(191, 90, 242, 0.25);
}

.review-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(191, 90, 242, 0.15) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 1;
  pointer-events: none;
}

/* Контент отзыва */
.review-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.review-rating {
  display: flex;
  gap: 4px;
}

.review-rating .star {
  color: #ffcc00;
  font-size: 1.4rem;
  text-shadow: 0 0 10px rgba(255, 204, 0, 0.6);
}

.review-text {
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--label-primary);
  letter-spacing: -0.3px;
  margin: 0;
  font-style: italic;
}

.review-author-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.review-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c464fa 0%, #3a1c5c 100%);
  border: 1px solid rgba(196, 100, 250, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(196, 100, 250, 0.3);
}

.avatar-char {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.review-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.author-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--label-primary);
}

.author-status {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--label-secondary);
}

/* --- 3D Просмотрщик Скина (Skin Viewer Wrapper) --- */
.skin-viewer-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 380px;
  background: radial-gradient(circle at center, rgba(196, 100, 250, 0.08) 0%, transparent 75%);
  border-radius: 24px;
  z-index: 2;
  border: 1px solid rgba(196, 100, 250, 0.12);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.03);
}

.skin-viewer-container {
  position: relative;
  width: 100%;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

#review-skin-img {
  max-width: 200px;
  max-height: 200px;
  object-fit: contain;
  display: block;
  outline: none;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.4));
  image-rendering: pixelated;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#review-skin-img:hover {
  transform: scale(1.15) rotate(3deg);
}

.skin-viewer-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(196, 100, 250, 0.2) 0%, transparent 70%);
  filter: blur(25px);
  z-index: 1;
  pointer-events: none;
}

/* Бейдж */
.skin-viewer-badge {
  position: absolute;
  bottom: 15px;
  z-index: 5;
  background: rgba(8, 2, 13, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 0.5px solid rgba(196, 100, 250, 0.35);
  padding: 5px 12px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--system-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--system-blue);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--system-blue);
  animation: badgeDotPulse 1.5s infinite;
}

@keyframes badgeDotPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* Адаптивность для отзывов */
@media (max-width: 850px) {
  .review-card {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2.2rem;
  }
  
  .skin-viewer-wrapper {
    height: 340px;
  }
}

/* --- Виджет счетчика онлайна --- */
.online-counter-widget {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 2500;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(11, 5, 20, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(48, 209, 88, 0.25);
  border-radius: 16px;
  padding: 0.6rem 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  transition: var(--transition-ios);
}

.online-counter-widget:hover {
  border-color: rgba(48, 209, 88, 0.5);
  box-shadow: 0 8px 32px rgba(48, 209, 88, 0.1), 0 12px 40px rgba(0, 0, 0, 0.6);
}

.online-dot {
  width: 8px;
  height: 8px;
  background-color: var(--system-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--system-green);
  animation: onlineDotPulse 1.8s infinite ease-in-out;
}

.online-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--label-secondary);
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  letter-spacing: 0.2px;
}

.online-text strong {
  color: var(--label-primary);
  font-weight: 700;
}

@keyframes onlineDotPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 4px var(--system-green);
  }
  50% {
    transform: scale(1.2);
    box-shadow: 0 0 12px var(--system-green), 0 0 20px rgba(48, 209, 88, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 4px var(--system-green);
  }
}

/* Мобильная адаптивность для счетчика онлайна */
@media (max-width: 768px) {
  .online-counter-widget {
    bottom: 100px;
    left: 20px;
    padding: 0.5rem 0.8rem;
  }
}



