html {
  scroll-behavior: smooth;
}

::selection {
  background-color: rgba(0, 99, 199, 0.3);
  color: white;
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0063c7;
}

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #0063c7 0%, #3b82f6 50%, #0063c7 100%);
  box-shadow: 0 0 10px rgba(0, 99, 199, 0.8);
  z-index: 9999;
  transition: width 0.1s ease-out;
}

#navbar {
  background: transparent;
  border-bottom: none;
}

#navbar .glass-nav {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 4px 30px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: none;
}

#navbar.scrolled .glass-nav {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: rgba(0, 99, 199, 0.3);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 99, 199, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

#nav-container {
  width: 100%;
  max-width: 80rem;
}

#nav-inner {
  height: 4.5rem;
}

nav .hidden.lg\:flex a {
  position: relative;
}

nav .hidden.lg\:flex a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #0063c7;
  transition: all 0.3s;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(0, 99, 199, 0.8);
}

nav .hidden.lg\:flex a:hover::after {
  width: 100%;
}

nav a[href="#"]::after {
  display: none !important;
}

#navbar.scrolled {
  background: transparent;
  backdrop-filter: none;
}

.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  pointer-events: none;
}

.glass-card-hover:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 99, 199, 0.3);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 99, 199, 0.2);
}

.glass-image {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.glass-stat {
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.glass-stat:hover {
  background: rgba(0, 99, 199, 0.1);
  border-color: rgba(0, 99, 199, 0.3);
}

.glass-icon {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.glass-nav {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.glass-button {
  background: rgba(0, 99, 199, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgb(9 54 100 / 47%);
  color: white;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.6s;
}

.glass-button:hover {
  background: rgba(0, 99, 199, 0.3);
  border-color: rgba(0, 99, 199, 0.3);
  box-shadow: rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.glass-button:hover::before {
  left: 100%;
}

.glass-button:active {
  transform: translateY(0);
}

.glass-text {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-text-accent {
  color: #0063c7;
  text-shadow: 0 0 30px rgba(0, 99, 199, 0.5);
}

.subtitle-container {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1.5rem 2rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.subtitle-container p {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  margin: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#hero-video {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 1 !important;
  object-fit: cover;
  object-position: center;
  transform: translateZ(0);
  will-change: transform;
  -webkit-playsinline: true;
}

video {
  width: 100%;
  height: auto;
  display: block;
}

video:focus {
  outline: none;
}

table {
  border-collapse: collapse;
}

table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.overflow-x-auto::-webkit-scrollbar {
  height: 6px;
}

.overflow-x-auto::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.overflow-x-auto::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

:focus-visible {
  outline: 2px solid #0063c7;
  outline-offset: 2px;
}

#model-modal {
  z-index: 200;
}

#model-panel {
  -webkit-overflow-scrolling: touch;
}

#model-content {
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;
}

#model-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

#model-scroll::-webkit-scrollbar {
  width: 6px;
}

#model-scroll::-webkit-scrollbar-track {
  background: transparent;
}

#model-scroll::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

#model-scroll::-webkit-scrollbar-thumb:hover {
  background: #0063c7;
}

@media (max-width: 639px) {
  #model-panel {
    align-items: flex-end;
  }

  #model-content {
    max-height: 92vh;
  }

  #model-content.translate-y-full {
    transform: translateY(100%);
  }

  #model-scroll {
    border-radius: 1.5rem 1.5rem 0 0;
  }

  #model-content > button {
    top: 0.75rem;
    right: 0.75rem;
  }
}

@media (min-width: 640px) {
  #model-content.translate-y-full {
    transform: scale(0.95);
    opacity: 0;
  }

  #model-content.sm\:scale-95 {
    transform: scale(0.95);
  }
}

@media (max-width: 640px) {
  #hero h1 {
    font-size: 2.5rem;
  }

  .glass-card {
    padding: 1.5rem 1rem;
  }

  .subtitle-container {
    padding: 1rem;
    margin: 0 1rem;
  }

  table {
    font-size: 0.875rem;
  }

  th,
  td {
    padding: 0.75rem 0.5rem;
  }
}

@media (max-width: 768px) {
  #navbar > div {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  #navbar .glass-nav {
    border-radius: 1rem;
    margin: 0 0.5rem;
  }

  #navbar.scrolled .glass-nav {
    transform: scale(0.98);
  }

  #scroll-progress {
    height: 2px;
  }
}

#snow-canvas {
  will-change: transform;
  transform: translateZ(0);
  pointer-events: none;
}

nav,
a,
button {
  position: relative;
  z-index: 2;
}

@media print {
  #navbar,
  #model-modal,
  button {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .glass-button::before {
    display: none;
  }
}
/* ============================================================
   iOS OVERLAY — подсветка кнопки «Поделиться» в Safari
   ============================================================ */

.ios-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.ios-overlay--visible {
  opacity: 1;
}

.ios-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: auto;
}

/* Подсказка сверху */
.ios-overlay__top {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  animation: ios-fade-in 0.4s ease 0.15s both;
}

.ios-overlay__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(0, 99, 199, 0.5);
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(0, 99, 199, 0.15);
  white-space: nowrap;
}

.ios-overlay__badge strong {
  color: #4d9eff;
  font-weight: 700;
}

.ios-overlay__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #0063c7;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.ios-overlay__arrow-down {
  animation: ios-bounce-down 1.2s ease-in-out infinite;
}

@keyframes ios-bounce-down {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}

@keyframes ios-fade-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Пульсирующий круг внизу экрана, где кнопка «Поделиться» в Safari */
.ios-overlay__pulse {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #0063c7;
  pointer-events: none;
  animation: ios-pulse 1.6s ease-out infinite;
}

.ios-overlay__pulse::before,
.ios-overlay__pulse::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid #0063c7;
  animation: ios-pulse 1.6s ease-out infinite;
}

.ios-overlay__pulse::before {
  animation-delay: 0.4s;
}

.ios-overlay__pulse::after {
  animation-delay: 0.8s;
}

@keyframes ios-pulse {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Кнопка «Понятно» */
.ios-overlay__close {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 36px;
  background: #0063c7;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 10px 30px rgba(0, 99, 199, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ios-overlay__close:active {
  transform: translateX(-50%) scale(0.95);
  box-shadow: 0 5px 15px rgba(0, 99, 199, 0.4);
}

/* На десктопе оверлей не нужен — но на всякий оставим рабочим */
@media (min-width: 1024px) {
  .ios-overlay__pulse {
    display: none;
  }
  .ios-overlay__top {
    top: 20%;
  }
  .ios-overlay__close {
    bottom: auto;
    top: 60%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ios-overlay__arrow-down,
  .ios-overlay__pulse,
  .ios-overlay__pulse::before,
  .ios-overlay__pulse::after {
    animation: none;
  }
}
/* ============================================================
   БАННЕР «ВЕСЬ АССОРТИМЕНТ В ПРИЛОЖЕНИИ»
   ============================================================ */

.app-banner {
  isolation: isolate;
}

/* Бегущий блик */
.app-banner__shine {
  position: absolute;
  top: 0;
  left: -60%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 40%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.08) 60%,
    transparent 100%
  );
  transform: skewX(-18deg);
  animation: app-banner-shine 4.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes app-banner-shine {
  0% {
    left: -60%;
  }
  55% {
    left: 120%;
  }
  100% {
    left: 120%;
  }
}

/* Пульсирующие кольца вокруг иконки */
.app-banner__pulse {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 2px solid rgba(0, 99, 199, 0.65);
  animation: app-banner-pulse 2.2s ease-out infinite;
  pointer-events: none;
}

.app-banner__pulse--delay {
  animation-delay: 1.1s;
}

@keyframes app-banner-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.8);
    opacity: 0;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* Мягкое «дыхание» иконки */
.app-banner__icon {
  animation: app-banner-breathe 2.4s ease-in-out infinite;
}

@keyframes app-banner-breathe {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(0, 99, 199, 0);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 24px rgba(0, 99, 199, 0.55);
  }
}

/* Мигающий акцент на надписи */
.app-banner__label {
  animation: app-banner-blink 1.8s ease-in-out infinite;
}

@keyframes app-banner-blink {
  0%,
  100% {
    opacity: 1;
    text-shadow: 0 0 12px rgba(0, 99, 199, 0.7);
  }
  50% {
    opacity: 0.55;
    text-shadow: 0 0 4px rgba(0, 99, 199, 0.3);
  }
}

/* Пульсация заголовка баннера */
.app-banner__title {
  animation: app-banner-title-glow 3s ease-in-out infinite;
}

@keyframes app-banner-title-glow {
  0%,
  100% {
    text-shadow: 0 0 0 rgba(0, 99, 199, 0);
  }
  50% {
    text-shadow: 0 0 18px rgba(0, 99, 199, 0.55);
  }
}

/* Кнопка CTA — лёгкое «дыхание» */
.app-banner__cta {
  animation: app-banner-cta-breathe 2.8s ease-in-out infinite;
}

@keyframes app-banner-cta-breathe {
  0%,
  100% {
    transform: translateY(0);
    box-shadow: 0 10px 30px rgba(0, 99, 199, 0.35);
  }
  50% {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(0, 99, 199, 0.6);
  }
}

/* Уважаем prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .app-banner__shine,
  .app-banner__pulse,
  .app-banner__icon,
  .app-banner__label,
  .app-banner__title,
  .app-banner__cta {
    animation: none !important;
  }
}