/* Современные CSS переменные для кастомных стилей */
:root {
  --primary: #00ffaa;
  --secondary: #00ccff;
  --dark: #000000;
  --darker: #000000;
  --card: #0a0a0a;
  --border: #1a1a1a;
  --spot-x: 50%;
  --spot-y: 40%;
}

/* Дополнительные анимации */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wiggle {
  0%, 5% { transform: rotateZ(0) scale(1); }
  10% { transform: rotateZ(-2deg) scale(1.02); }
  15% { transform: rotateZ(1.5deg) scale(0.99); }
  20% { transform: rotateZ(-1deg) scale(1.01); }
  25% { transform: rotateZ(0.8deg) scale(0.995); }
  30% { transform: rotateZ(-0.5deg) scale(1.005); }
  35% { transform: rotateZ(0.3deg) scale(1); }
  40%, 100% { transform: rotateZ(0) scale(1); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px var(--primary); }
  50% { box-shadow: 0 0 20px var(--primary), 0 0 30px var(--primary); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0) translateY(0) rotateZ(0); }
  10% { transform: translateX(-1px) translateY(-0.5px) rotateZ(-0.3deg); }
  20% { transform: translateX(1px) translateY(0.5px) rotateZ(0.3deg); }
  30% { transform: translateX(-0.5px) translateY(-0.3px) rotateZ(-0.2deg); }
  40% { transform: translateX(0.5px) translateY(0.3px) rotateZ(0.2deg); }
  50% { transform: translateX(-0.3px) translateY(0) rotateZ(-0.1deg); }
  60% { transform: translateX(0.3px) translateY(0) rotateZ(0.1deg); }
  70% { transform: translateX(-0.2px) translateY(0) rotateZ(-0.05deg); }
  80% { transform: translateX(0.2px) translateY(0) rotateZ(0.05deg); }
  90% { transform: translateX(-0.1px) translateY(0) rotateZ(-0.02deg); }
}

/* Новые анимации вибрации */
@keyframes vibrate {
  0%, 100% { transform: translateX(0) translateY(0) scale(1); }
  10% { transform: translateX(-0.8px) translateY(0.4px) scale(1.005); }
  20% { transform: translateX(0.8px) translateY(-0.4px) scale(0.995); }
  30% { transform: translateX(-0.4px) translateY(0.6px) scale(1.002); }
  40% { transform: translateX(0.4px) translateY(-0.6px) scale(0.998); }
  50% { transform: translateX(-0.3px) translateY(0.3px) scale(1.001); }
  60% { transform: translateX(0.3px) translateY(-0.3px) scale(0.999); }
  70% { transform: translateX(-0.2px) translateY(0.2px) scale(1.0005); }
  80% { transform: translateX(0.2px) translateY(-0.2px) scale(0.9995); }
  90% { transform: translateX(-0.1px) translateY(0.1px) scale(1.0002); }
}

@keyframes bounce-shake {
  0%, 100% { transform: translateY(0) rotateZ(0) scale(1); }
  10% { transform: translateY(-2px) rotateZ(-0.5deg) scale(1.02); }
  20% { transform: translateY(0) rotateZ(0.5deg) scale(0.98); }
  30% { transform: translateY(-1.5px) rotateZ(-0.3deg) scale(1.01); }
  40% { transform: translateY(0) rotateZ(0.3deg) scale(0.99); }
  50% { transform: translateY(-1px) rotateZ(-0.2deg) scale(1.005); }
  60% { transform: translateY(0) rotateZ(0.2deg) scale(0.995); }
  70% { transform: translateY(-0.5px) rotateZ(-0.1deg) scale(1.002); }
  80% { transform: translateY(0) rotateZ(0.1deg) scale(0.998); }
  90% { transform: translateY(-0.3px) rotateZ(-0.05deg) scale(1.001); }
}

@keyframes pulse-shake {
  0%, 100% { transform: scale(1) rotateZ(0); }
  25% { transform: scale(1.03) rotateZ(-0.3deg); }
  50% { transform: scale(0.97) rotateZ(0.3deg); }
  75% { transform: scale(1.015) rotateZ(-0.15deg); }
}

/* Анимации на вход */
@keyframes slideInFromLeft {
  0% { 
    opacity: 0; 
    transform: translateX(-50px); 
  }
  100% { 
    opacity: 1; 
    transform: translateX(0); 
  }
}

@keyframes slideInFromRight {
  0% { 
    opacity: 0; 
    transform: translateX(50px); 
  }
  100% { 
    opacity: 1; 
    transform: translateX(0); 
  }
}

@keyframes zoomIn {
  0% { 
    opacity: 0; 
    transform: scale(0.8); 
  }
  100% { 
    opacity: 1; 
    transform: scale(1); 
  }
}

@keyframes fadeInUp {
  0% { 
    opacity: 0; 
    transform: translateY(50px) scale(0.9); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0) scale(1); 
  }
}

/* Дополнительные анимации */
@keyframes slideInFromTop {
  0% { 
    opacity: 0; 
    transform: translateY(-100px) rotateX(-15deg); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0) rotateX(0deg); 
  }
}

@keyframes slideInFromBottom {
  0% { 
    opacity: 0;
    transform: translateY(100px) rotateX(15deg); 
  }
  100% { 
    opacity: 1;
    transform: translateY(0) rotateX(0deg); 
  }
}

@keyframes scaleIn {
  0% { 
    opacity: 0; 
    transform: scale(0.8); 
  }
  100% { 
    opacity: 1; 
    transform: scale(1); 
  }
}

@keyframes bounceIn {
  0% { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes rotateIn {
  0% { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes flipIn {
  0% { 
    opacity: 0;
    transform: translateY(40px); 
  }
  100% { 
    opacity: 1;
    transform: translateY(0); 
  }
}

@keyframes glowPulse {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(0, 255, 170, 0.3); 
  }
  50% { 
    box-shadow: 0 0 40px rgba(0, 255, 170, 0.6), 0 0 60px rgba(0, 204, 255, 0.3); 
  }
}

@keyframes shimmer {
  0% { 
    background-position: -200% 0; 
  }
  100% { 
    background-position: 200% 0; 
  }
}

@keyframes floatUp {
    0% {
      opacity: 0;
    transform: translateY(30px) scale(0.9); 
    }
  100% { 
      opacity: 1;
    transform: translateY(0) scale(1); 
  }
}

@keyframes slideInStagger {
  0% { 
    opacity: 0; 
    transform: translateX(-30px); 
    }
    100% {
      opacity: 1;
    transform: translateX(0); 
  }
}

@keyframes slideInStaggerRight {
  0% { 
    opacity: 0; 
    transform: translateX(30px); 
  }
  100% { 
    opacity: 1; 
    transform: translateX(0); 
  }
}

/* Анимация загрузки */
@keyframes loadingSpinner {
  0% { 
    transform: rotate(0deg) scale(1); 
  }
  50% { 
    transform: rotate(180deg) scale(1.1); 
  }
  100% { 
    transform: rotate(360deg) scale(1); 
  }
}

@keyframes loadingDots {
  0%, 20% { 
    opacity: 0;
  }
  50% { 
    opacity: 1;
  }
  100% { 
    opacity: 0; 
  }
}

@keyframes loadingText {
  0% { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Классы анимаций */
.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 0.8s ease-out forwards;
}

.animate-slide-in-down {
  animation: slideInDown 0.8s ease-out forwards;
}

.animate-wiggle {
  animation: wiggle 2s ease-in-out;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-shake {
  animation: shake 0.5s ease-in-out;
}

.animate-vibrate {
  animation: vibrate 0.8s ease-in-out;
}

.animate-bounce-shake {
  animation: bounce-shake 1s ease-in-out;
}

.animate-pulse-shake {
  animation: pulse-shake 0.6s ease-in-out;
}

/* Анимации на вход */
.animate-slide-in-left {
  animation: slideInFromLeft 1s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInFromRight 1s ease-out forwards;
}

.animate-zoom-in {
  animation: zoomIn 1.2s ease-out forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 1s ease-out forwards;
}

/* Задержки для последовательных анимаций */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }

/* Новые классы анимаций */
.animate-slide-in-top {
  animation: slideInFromTop 1s ease-out forwards;
}

.animate-slide-in-bottom {
  animation: slideInFromBottom 1s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 1.2s ease-out forwards;
}

.animate-bounce-in {
  animation: bounceIn 1s ease-out forwards;
}

.animate-rotate-in {
  animation: rotateIn 1s ease-out forwards;
}

.animate-flip-in {
  animation: flipIn 1s ease-out forwards;
}

.animate-glow-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}

.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

.animate-float-up {
  animation: floatUp 0.8s ease-out forwards;
}

.animate-slide-in-stagger {
  animation: slideInStagger 1s ease-out forwards;
}

.animate-slide-in-stagger-right {
  animation: slideInStaggerRight 1s ease-out forwards;
}

/* Анимация загрузки */
.animate-loading-spinner {
  animation: loadingSpinner 1s linear infinite;
}

.animate-loading-dots {
  animation: loadingDots 1.5s infinite;
}

.animate-loading-text {
  animation: loadingText 0.8s ease-out forwards;
}

/* Эффекты при наведении */
.hover-glow:hover {
  animation: glowPulse 1s ease-in-out infinite;
}

.hover-bounce:hover {
  animation: bounceIn 0.6s ease-out;
}

.hover-rotate:hover {
  animation: rotateIn 0.8s ease-out;
}

/* Эффекты для карточек */
.card-hover-effect {
  transition: all 0.3s ease;
}

.card-hover-effect:hover {
  transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
  box-shadow: 0 20px 40px rgba(0, 255, 170, 0.2);
}

/* Эффекты для кнопок */
.btn-hover-effect {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-hover-effect:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 10px 20px rgba(0, 255, 170, 0.3);
}

.btn-hover-effect::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.5s;
}

.btn-hover-effect:hover::before {
  left: 100%;
}

/* Дополнительные стили для анимаций и эффектов */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Анимация появления элементов при скролле */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
  transform: translateY(0);
}

/* Улучшенные эффекты для карточек */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 255, 170, 0.1);
}

/* Градиентные текстовые эффекты */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Улучшенные кнопки */
.btn-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  position: relative;
  overflow: hidden;
}

.btn-gradient::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.5s;
}

.btn-gradient:hover::before {
  left: 100%;
}

/* Анимированный фон с частицами */
.particle-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Стили для FAQ аккордеона */
.faq-item {
  transition: all 0.3s ease;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-content {
  max-height: 200px;
}

/* Улучшенные тени и свечения */
.glow-primary {
  box-shadow: 0 0 20px rgba(0, 255, 170, 0.3);
}

.glow-secondary {
  box-shadow: 0 0 20px rgba(0, 204, 255, 0.3);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .mobile-padding {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .mobile-text {
    font-size: 0.875rem;
  }
}

/* Дополнительные утилиты */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.backdrop-blur {
  backdrop-filter: blur(10px);
}

/* Анимация загрузки */
.loading-spinner {
  animation: spin 1s linear infinite;
}

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

/* Плавные переходы для всех интерактивных элементов */
* {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Улучшенная типографика */
.font-display {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.font-mono {
  font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
}

/* Красивые кастомные скроллбары */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--darker);
  border-radius: 6px;
  border: 1px solid var(--border);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 6px;
  border: 2px solid var(--darker);
  box-shadow: 0 0 10px rgba(0, 255, 170, 0.3);
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  box-shadow: 0 0 15px rgba(0, 255, 170, 0.5);
  transform: scale(1.1);
}

::-webkit-scrollbar-thumb:active {
  background: linear-gradient(135deg, #00ff88, #00aaff);
}

/* Для Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--darker);
}

/* ===== Ambient background layers (глобальные фоновые эффекты) ===== */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1; /* над базовым градиентом, под контентом */
}

.ambient-bg .glow {
  position: absolute;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  mix-blend-mode: screen;
  animation: ambientFloat 22s ease-in-out infinite;
}

.ambient-bg .glow.glow-1 {
  left: -10vw;
  top: -10vh;
  background: radial-gradient(closest-side, rgba(0,255,170,0.9), rgba(0,255,170,0.0));
}

.ambient-bg .glow.glow-2 {
  right: -15vw;
  top: 10vh;
  background: radial-gradient(closest-side, rgba(0,204,255,0.9), rgba(0,204,255,0.0));
  animation-duration: 26s;
}

.ambient-bg .glow.glow-3 {
  left: 20vw;
  bottom: -10vh;
  background: radial-gradient(closest-side, rgba(0,255,200,0.8), rgba(0,255,200,0.0));
  animation-duration: 30s;
}

@keyframes ambientFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(2vw, -2vh, 0) scale(1.05); }
}

/* Виньетка по краям экрана */
.vignette-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 60%, rgba(0,0,0,0.25) 100%);
}

/* Спотлайт за курсором */
.spotlight {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(600px at var(--spot-x) var(--spot-y), rgba(0,255,170,0.10), rgba(0,255,170,0.0) 60%);
  mix-blend-mode: screen;
}

/* Легкая зернистость (очень слабая, чтобы не мешала) */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.02) 0, rgba(255,255,255,0.02) 1px, rgba(0,0,0,0) 1px, rgba(0,0,0,0) 2px);
}

/* ===== Mobile tweaks ===== */
@media (max-width: 768px) {
  .ambient-bg .glow { filter: blur(80px); opacity: 0.12; }
  .vignette-overlay { background: radial-gradient(ellipse at center, rgba(0,0,0,0) 65%, rgba(0,0,0,0.18) 100%); }
  .grain-overlay { opacity: 0.03; }
  /* приглушаем hover-эффекты карточек */
  .card-hover-effect:hover, .pricing-card-3d:hover, .feature-card-3d:hover { transform: none !important; box-shadow: none !important; }
  /* безопасные зоны для экранов с вырезами */
  body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}

/* ===== Перекраска свечений и спотлайта по страницам ===== */
/* Главная */
body.page-home .ambient-bg .glow.glow-1 { background: radial-gradient(closest-side, rgba(0,255,170,0.9), rgba(0,255,170,0)); }
body.page-home .ambient-bg .glow.glow-2 { background: radial-gradient(closest-side, rgba(0,204,255,0.9), rgba(0,204,255,0)); }
body.page-home .ambient-bg .glow.glow-3 { background: radial-gradient(closest-side, rgba(236,72,153,0.8), rgba(236,72,153,0)); }
body.page-home .spotlight { background: radial-gradient(600px at var(--spot-x) var(--spot-y), rgba(0,255,170,0.10), rgba(0,255,170,0) 60%); }

/* PEPENET VPN */
body.page-vpn .ambient-bg .glow.glow-1 { background: radial-gradient(closest-side, rgba(34,197,94,0.9), rgba(34,197,94,0)); }
body.page-vpn .ambient-bg .glow.glow-2 { background: radial-gradient(closest-side, rgba(20,184,166,0.9), rgba(20,184,166,0)); }
body.page-vpn .ambient-bg .glow.glow-3 { background: radial-gradient(closest-side, rgba(59,130,246,0.8), rgba(59,130,246,0)); }
body.page-vpn .spotlight { background: radial-gradient(600px at var(--spot-x) var(--spot-y), rgba(20,184,166,0.10), rgba(20,184,166,0) 60%); }

/* Mr.Peekerson */
body.page-peekerson .ambient-bg .glow.glow-1 { background: radial-gradient(closest-side, rgba(239,68,68,0.9), rgba(239,68,68,0)); }
body.page-peekerson .ambient-bg .glow.glow-2 { background: radial-gradient(closest-side, rgba(245,158,11,0.9), rgba(245,158,11,0)); }
body.page-peekerson .ambient-bg .glow.glow-3 { background: radial-gradient(closest-side, rgba(168,85,247,0.8), rgba(168,85,247,0)); }
body.page-peekerson .spotlight { background: radial-gradient(600px at var(--spot-x) var(--spot-y), rgba(239,68,68,0.10), rgba(239,68,68,0) 60%); }

/* Стили для подсказки скролла */
.scroll-hint {
  transition: all 0.3s ease;
  z-index: 1000;
}

.scroll-hint:hover {
  transform: translateX(-50%) scale(1.05);
}

.scroll-hint span {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.scroll-hint:hover span {
  opacity: 1;
}

/* 3D эффекты */
.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.card-3d:hover {
  transform: rotateY(5deg) rotateX(5deg) translateZ(20px);
}

.btn-3d {
  transform-style: preserve-3d;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.3),
    0 8px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-3d:hover {
  transform: translateY(-2px) translateZ(10px);
  box-shadow: 
    0 8px 16px rgba(0, 0, 0, 0.4),
    0 16px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-3d:active {
  transform: translateY(0) translateZ(5px);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 4px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.logo-3d {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.logo-3d:hover {
  transform: rotateY(15deg) rotateX(10deg) translateZ(30px);
}

.title-3d {
  transform-style: preserve-3d;
  text-shadow: 
    0 1px 0 #ccc,
    0 2px 0 #c9c9c9,
    0 3px 0 #bbb,
    0 4px 0 #b9b9b9,
    0 5px 0 #aaa,
    0 6px 1px rgba(0,0,0,.1),
    0 0 5px rgba(0,0,0,.1),
    0 1px 3px rgba(0,0,0,.3),
    0 3px 5px rgba(0,0,0,.2),
    0 5px 10px rgba(0,0,0,.25);
}

.pricing-card-3d {
  transform-style: preserve-3d;
  transition: all 0.3s ease;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.1);
}

.pricing-card-3d:hover {
  transform: rotateY(8deg) rotateX(5deg) translateZ(25px);
  box-shadow: 
    0 8px 16px rgba(0, 0, 0, 0.3),
    0 16px 32px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(0, 255, 170, 0.1);
}

.feature-card-3d {
  transform-style: preserve-3d;
  transition: all 0.3s ease;
}

.feature-card-3d:hover {
  transform: rotateY(5deg) rotateX(3deg) translateZ(15px);
  box-shadow: 
    0 6px 12px rgba(0, 0, 0, 0.2),
    0 12px 24px rgba(0, 0, 0, 0.1),
    0 0 15px rgba(0, 255, 170, 0.1);
}

.faq-3d {
  transform-style: preserve-3d;
  transition: all 0.3s ease;
}

.faq-3d:hover {
  transform: rotateX(2deg) translateZ(10px);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Дополнительные стили для FAQ */
.faq-item {
  transition: all 0.3s ease;
}

.faq-item.active {
  transform: rotateX(1deg) translateZ(5px);
  box-shadow: 
    0 6px 12px rgba(0, 0, 0, 0.2),
    0 12px 24px rgba(0, 0, 0, 0.1),
    0 0 20px rgba(0, 255, 170, 0.1);
}

.faq-content {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-arrow {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 3D анимации */
@keyframes float3d {
  0%, 100% { 
    transform: translateY(0px) rotateX(0deg) rotateY(0deg); 
  }
  25% { 
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg); 
  }
  50% { 
    transform: translateY(-5px) rotateX(0deg) rotateY(10deg); 
  }
  75% { 
    transform: translateY(-15px) rotateX(-5deg) rotateY(5deg); 
  }
}

.animate-float-3d {
  animation: float3d 4s ease-in-out infinite;
}

/* 3D перспектива для контейнеров */
.perspective-3d {
  perspective: 1000px;
}

.perspective-3d-sm {
  perspective: 500px;
}

/* Стили для навбара */
nav {
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.nav-tab {
  padding: 8px 16px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: #9ca3af;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.nav-tab:hover {
  background: rgba(0, 255, 170, 0.1);
  border-color: rgba(0, 255, 170, 0.3);
  color: #00ffaa;
}

.nav-tab.active {
  background: linear-gradient(135deg, rgba(0, 255, 170, 0.2), rgba(0, 204, 255, 0.2));
  border-color: rgba(0, 255, 170, 0.5);
  color: #00ffaa;
  box-shadow: 0 0 20px rgba(0, 255, 170, 0.2);
}

/* ===== Цвета навбара по страницам ===== */
/* Главная */
body.page-home .nav-tab:hover {
  background: rgba(236, 72, 153, 0.10);
  border-color: rgba(236, 72, 153, 0.30);
  color: #ec4899;
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.15);
}
body.page-home .nav-tab.active {
  background: linear-gradient(135deg, rgba(0, 255, 170, 0.2), rgba(0, 204, 255, 0.2));
  border-color: rgba(0, 255, 170, 0.5);
  color: #00ffaa;
  box-shadow: 0 0 22px rgba(0, 204, 255, 0.25);
}

/* Страница VPN */
body.page-vpn .nav-tab:hover {
  background: rgba(20, 184, 166, 0.10);
  border-color: rgba(20, 184, 166, 0.30);
  color: #14b8a6;
  box-shadow: 0 0 18px rgba(20, 184, 166, 0.15);
}
body.page-vpn .nav-tab.active {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(59, 130, 246, 0.2));
  border-color: rgba(20, 184, 166, 0.5);
  color: #14b8a6;
  box-shadow: 0 0 22px rgba(59, 130, 246, 0.25);
}

/* Страница Mr.Peekerson */
body.page-peekerson .nav-tab:hover {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.30);
  color: #ef4444;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.15);
}
body.page-peekerson .nav-tab.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(245, 158, 11, 0.2));
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.25);
}

/* Активные цвета для вкладок на главной */
#peekerson-tab.nav-tab:hover {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.30);
  color: #ef4444;
}
#peekerson-tab.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(245, 158, 11, 0.2));
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.25);
}

/* ===== 5D Slogan Styles ===== */
.tagline-5d {
  display: inline-block;
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
  letter-spacing: 0.4px;
  text-shadow:
    0 1px 0 rgba(0,0,0,0.4),
    0 2px 4px rgba(0,0,0,0.35),
    0 8px 18px rgba(0,0,0,0.25);
  filter: drop-shadow(0 6px 16px rgba(0, 255, 170, 0.12));
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: depthPulse 3.2s ease-in-out infinite;
}

.tagline-5d:hover {
  transform: rotateY(-6deg) rotateX(3deg) translateZ(8px);
  filter: drop-shadow(0 12px 28px rgba(0, 204, 255, 0.22));
}

.tagline-5d::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  background-size: 200% 100%;
  mix-blend-mode: screen;
  animation: shimmer 2.4s linear infinite;
  transform: translateZ(2px);
  pointer-events: none;
}

@keyframes depthPulse {
  0%, 100% {
    transform: translateZ(0) rotateY(0) rotateX(0);
    text-shadow:
      0 1px 0 rgba(0,0,0,0.4),
      0 2px 4px rgba(0,0,0,0.35),
      0 8px 18px rgba(0,0,0,0.25);
  }
  50% {
    transform: translateZ(6px) rotateY(-3deg) rotateX(1deg);
    text-shadow:
      0 1px 0 rgba(0,0,0,0.45),
      0 4px 10px rgba(0,0,0,0.35),
      0 16px 36px rgba(0, 255, 170, 0.18);
  }
}

.tagline-emoji {
  position: relative;
  height: 0;
}

.tagline-emoji .emoji-float {
  position: absolute;
  font-size: 18px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  animation: floatEmoji 5s ease-in-out infinite;
}

.tagline-emoji .emoji-float:nth-child(1) { left: -28px; top: -6px; animation-delay: 0.1s; }
.tagline-emoji .emoji-float:nth-child(2) { right: -28px; top: -8px; animation-delay: 0.3s; }
.tagline-emoji .emoji-float:nth-child(3) { left: -14px; top: 22px; animation-delay: 0.6s; }
.tagline-emoji .emoji-float:nth-child(4) { right: -16px; top: 26px; animation-delay: 0.9s; }

@keyframes floatEmoji {
  0%, 100% { transform: translateY(0) translateX(0) rotate(0); opacity: 0.9; }
  50% { transform: translateY(-8px) translateX(2px) rotate(4deg); opacity: 1; }
}

/* ===== Navbar badge (compact slogan) ===== */
.nav-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), 0 0 12px rgba(0,255,170,0.08);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2px;
  color: #e5e7eb;
  position: relative;
  overflow: hidden;
}

.nav-badge .text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
  opacity: 0.6;
  pointer-events: none;
}

.nav-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #00ffaa, #00ccff);
  box-shadow: 0 0 10px rgba(0,255,170,0.6), 0 0 20px rgba(0,204,255,0.25);
  animation: pulseDot 2.2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.85; }
}

@media (max-width: 640px) {
  .nav-badge { display: none; }
}

/* ===== Mobile overflow & wrapping fixes ===== */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }
  /* Центрирование и отступы для VPN страницы */
  body.page-vpn header,
  body.page-vpn section {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  body.page-vpn .max-w-4xl,
  body.page-vpn .max-w-6xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  /* Отключаем фоновые эффекты на мобильных для VPN */
  body.page-vpn .spotlight,
  body.page-vpn .ambient-bg,
  body.page-vpn .glow {
    display: none !important;
  }
  /* Скрываем слоган на мобильных для всех страниц */
  .nav-badge.nav-badge--center {
    display: none !important;
  }
  
  /* Исправляем навбар на VPN странице */
  body.page-vpn nav {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  body.page-vpn nav .max-w-7xl {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  
  /* Исправляем масштабирование для VPN страницы */
  body.page-vpn {
    touch-action: pan-x pan-y;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
  }
  
  body.page-vpn * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
  
  /* Разрешаем выделение текста в input и textarea */
  body.page-vpn input,
  body.page-vpn textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
  }
  
  /* Исправляем переносы текста для всех блоков */
  body.page-vpn .feature-card-3d,
  body.page-vpn .tech-card,
  body.page-vpn .pricing-card-3d,
  body.page-vpn .bg-card,
  body.page-vpn .faq-item {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    -webkit-hyphens: auto !important;
    -ms-hyphens: auto !important;
  }
  
  /* Специально для заголовков и описаний */
  body.page-vpn h1,
  body.page-vpn h2,
  body.page-vpn h3,
  body.page-vpn p,
  body.page-vpn .text-lg,
  body.page-vpn .text-base {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    -webkit-hyphens: auto !important;
    -ms-hyphens: auto !important;
  }
  .nav-tab,
  .nav-tab span,
  .nav-tab span span {
    white-space: nowrap;
  }
  /* Не ломаем бренды/заголовки */
  h1, h2, h3, .title-3d, .logo-3d, .nav-badge, .navbar-center, nav span {
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: manual;
  }
  
  /* Общие правила переноса текста для всех страниц */
  .feature-card-3d,
  .tech-card,
  .pricing-card-3d,
  .bg-card,
  .faq-item,
  .card,
  .block {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
  }
  
  /* Исправляем наложение карточек приложений */
  .grid.grid-cols-1.sm\\:grid-cols-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  
  @media (min-width: 640px) {
    .grid.grid-cols-1.sm\\:grid-cols-2 {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  .grid.grid-cols-1.sm\\:grid-cols-2 > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-shrink: 1;
  }
  
  /* VLESS приложения в 4 колонки */
  .grid.grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  
  @media (min-width: 640px) {
    .grid.grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-4 {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (min-width: 1024px) {
    .grid.grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-4 {
      grid-template-columns: repeat(4, 1fr);
    }
  }
  
  .grid.grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-4 > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    flex-shrink: 1;
  }
  
  /* Переносы для текстового контента */
  p, .text-lg, .text-base, .text-sm, .description, .content {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
  }
  
  /* Специальные правила для длинных русских слов */
  .feature-card-3d h3,
  .tech-card h3,
  .pricing-card-3d h3 {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    line-height: 1.2;
  }
    white-space: nowrap;
  }
  /* Разрешаем безопасные переносы в контенте */
  .card-hover-effect,
  .pricing-card-3d,
  .tech-card,
  .faq-item,
  .chat-bubble,
  .bot-info-block,
  .feature-card,
  .feature-card-3d,
  .faq-content,
  p, .text-sm, .text-base, .leading-relaxed {
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
  }
  .container, .max-w-7xl, .mx-auto {
    min-width: 0;
  }
  /* Сдвиг контента ниже мобильного меню, чтобы оно не перекрывало клики вверху */
  .mobile-menu ~ .relative, .mobile-menu ~ .perspective-3d { padding-top: 0; }
}

/* ===== Navbar center badge positioning ===== */
.navbar-rel { position: relative; }
.navbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
}
.nav-badge.nav-badge--center {
  padding: 6px 14px;
}
@media (max-width: 1024px) {
  .nav-badge.nav-badge--center { font-size: 11px; gap: 4px; padding: 4px 10px; }
  .nav-badge.nav-badge--center .emoji-pack { display: none; }
}
@media (max-width: 768px) {
  .nav-badge.nav-badge--center { opacity: 0.7; transform: scale(0.9); }
}
@media (max-width: 640px) {
  .nav-badge { display: none; }
}

/* Mobile menu button styles */
.mobile-menu-btn {
  display: block;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

.mobile-menu-btn:focus {
  outline: none;
  ring: 2px;
  ring-color: var(--primary);
  ring-opacity: 40%;
}

/* Anchor mobile dropdown to actual navbar height */
.mobile-menu { 
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0; 
  z-index: 9998;
  transform: translateY(var(--nav-height, 64px));
}

/* Peekerson (red theme) overrides for center badge */
body.page-peekerson .nav-badge .text-gradient {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.page-peekerson .nav-badge .dot {
  background: radial-gradient(circle at 30% 30%, #ef4444, #fb7185);
  box-shadow: 0 0 10px rgba(239,68,68,0.6), 0 0 20px rgba(248,113,113,0.25);
}

/* ===== Pricing underline emphasis ===== */
.price-underline {
  height: 4px;
  border-radius: 9999px;
  opacity: 1 !important;
  box-shadow: 0 0 14px rgba(0,255,170,0.5), 0 0 26px rgba(0,204,255,0.25);
}

/* Prevent text overflow in feature/pricing cards */
.bg-card, .feature-card-3d, .tech-card, .pricing-card-3d { overflow: hidden; min-width: 0; }
.bg-card p, .feature-card-3d p, .tech-card p, .pricing-card-3d p {
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

/* Анимации для переключения контента */
#vpn-content, #peekerson-content {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.content-transition {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.content-hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.content-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Исправление прыжков навбара */
body {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

nav {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
  transform: translateZ(0) !important;
  -webkit-transform: translateZ(0) !important;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}