@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* ==========================================================================
   Базовые стили и переменные
   ========================================================================== */

:root {
  /* Основные цвета */
  --primary: #101010;
  --secondary: #333333;
  --accent: #9147ff;
  --accent-hover: #772ce8;
  --text: rgba(255, 255, 255, 0.9);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  
  /* Стеклянные эффекты */
  --glass-bg: rgba(16, 16, 16, 0.4);
  --glass-border: rgba(255, 255, 255, 0.1);
  
  /* Акцентные цвета с прозрачностью */
  --accent-bg-light: rgba(145, 71, 255, 0.05);
  --accent-bg-medium: rgba(145, 71, 255, 0.15);
  --accent-bg-strong: rgba(145, 71, 255, 0.25);
  --accent-border: rgba(145, 71, 255, 0.2);
  --accent-shadow: rgba(145, 71, 255, 0.4);
  
  /* Тени */
  --shadow-light: rgba(0, 0, 0, 0.2);
  --shadow-medium: rgba(0, 0, 0, 0.3);
  
  /* Статусные цвета */
  --success: #4CAF50;
  --success-bg: rgba(76, 175, 80, 0.2);
  --warning: #FFC107;
  --warning-bg: rgba(255, 193, 7, 0.2);
  --error: #F44336;
  --error-bg: rgba(244, 67, 54, 0.2);
  
  /* Элементы UI */
  --border-radius: 20px;
  --border-radius-small: 12px;
  --blur: blur(10px);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-Index система */
  --z-background: -1;
  --z-default: 1;
  --z-dropdown: 100;
  --z-nav: 1000;
  --z-modal: 10000;
  
  /* Spacing система */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Montserrat', sans-serif;

  -webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--primary);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==========================================================================
   Фоновая анимация
   ========================================================================== */

.glow-container {
  position: fixed;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: var(--z-background);
  mix-blend-mode: screen;
}

.glow {
  position: absolute;
  width: 150%;
  height: 150%;
  animation: glow-pulse 12s infinite;
  will-change: transform, opacity;
}

@keyframes glow-pulse {
  0%, 100% { 
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    opacity: 0.30;
  }
  50% { 
    transform: translate(-50%, -50%) scale(1.4) rotate(20deg);
    opacity: 0.15;
  }
}

.low-performance .glow {
  transform: translate(-50%, -50%) scale(1.3);
  opacity: 0.3;
  animation: none;
}

/* Оптимизация для пользователей с предпочтением уменьшенной анимации */
@media (prefers-reduced-motion: reduce) {
  .glow {
    animation: none;
    opacity: 0.2;
  }
}

/* ==========================================================================
   Навигация
   ========================================================================== */

.glass-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1200px;
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 32px var(--shadow-medium);
  z-index: var(--z-nav);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-menu a {
  color: var(--text);
  text-decoration: none;
  padding: 1rem;
  border-radius: 10px;
  transition: var(--transition);
  border: 1px solid transparent;
}

.nav-menu a:hover,
.dropdown-content a:hover {
  border: 1px solid var(--accent);
  background: var(--accent-bg-light);
  transform: translateY(-2px);
}

.nav-active {
  background: var(--accent) !important;
  color: white !important;
  border: 1px solid var(--accent) !important;
}

.login-btn {
  background: var(--accent) !important;
  color: white !important;
  border: 1px solid var(--accent) !important;
}

.login-btn:hover {
  background: var(--accent-hover) !important;
  border: 1px solid var(--accent-hover) !important;
  box-shadow: 0 4px 12px var(--accent-shadow);
}

/* Выпадающее меню */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  transform: translateX(-73%);
  min-width: 200px;
  background: rgba(16, 16, 16, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 10px;
  padding: 1rem 0;
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px var(--shadow-medium);
  visibility: hidden;
  opacity: 0;
  transition: var(--transition);
  z-index: var(--z-dropdown);
}

.dropdown:hover .dropdown-content {
  visibility: visible;
  opacity: 1;
  transform: translateX(-73%) translateY(10px);
}

.dropdown-content a {
  display: block;
  padding: 0.75rem 1.5rem;
  transition: var(--transition);
  border-radius: 0;
}

/* Общие элементы типографики - только для лендинга */
.hero h2,
.features h2,
.services-section h2,
.comparison-section h2,
.how-it-works h2,
.ping-section h2,
.pricing h2,
.testimonials h2,
.vpn-facts h2,
.faq h2 {
  text-align: center;
  margin-bottom: 4rem;
  font-size: 2.5rem;
}

.hero h4,
.features h4,
.services-section h4,
.comparison-section h4,
.how-it-works h4,
.ping-section h4,
.pricing h4,
.testimonials h4,
.vpn-facts h4,
.faq h4 {
  text-align: center;
  font-size: 1.2rem;
  margin-bottom: 5.75rem;
  margin-top: -2.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Общие компоненты */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 32px var(--shadow-medium);
}

.cta-button {
  background: linear-gradient(45deg, var(--accent), var(--accent-hover));
  color: white;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: var(--transition);
  cursor: pointer;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-shadow);
}

/* Burger Menu */
.burger-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  justify-content: space-around;
  z-index: var(--z-dropdown);
}

.burger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--text);
  border-radius: 3px;
  transition: var(--transition);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 300px;
    background: var(--primary);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 6rem 2rem 2rem;
    transition: var(--transition);
    border-left: 1px solid var(--glass-border);
    backdrop-filter: var(--blur);
  }

  .nav-menu.active {
    right: 0;
  }

  .burger-menu {
    display: flex;
  }

  .glass-nav {
    width: calc(100% - 20px);
    top: 10px;
  }

  .nav-container {
    padding: 0.75rem 1.5rem;
  }

  .dropdown-content {
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    background: transparent;
    box-shadow: none;
    border: none;
    backdrop-filter: none;
    padding: 0;
  }

  .dropdown-content a {
    padding: 0.5rem 0;
    border-left: 3px solid transparent;
    padding-left: 1rem;
  }

  .dropdown-content a:hover {
    border-left-color: var(--accent);
    background: var(--accent-bg-light);
  }
}

/* ==========================================================================
   Footer (Общий)
   ========================================================================== */

.glass-footer {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  border-top: 1px solid var(--glass-border);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.legal-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.legal-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.legal-links a:hover {
  color: var(--accent);
}

.contact-info {
  text-align: right;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .contact-info {
    text-align: center;
  }

  .glass-footer {
    margin-top: 2rem;
  }
}

/* ==========================================================================
   Уведомления (Общие)
   ========================================================================== */

.notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: var(--z-modal);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

.notification-content {
  background: var(--glass-bg);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-small);
  padding: 1rem 1.5rem;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 8px 32px var(--shadow-medium);
}

.notification.success .notification-content {
  border-left: 4px solid var(--success);
}

.notification.error .notification-content {
  border-left: 4px solid var(--error);
}

.notification.warning .notification-content {
  border-left: 4px solid var(--warning);
}

.notification-icon {
  font-size: 1.2rem;
}

.notification.success .notification-icon {
  color: var(--success);
}

.notification.error .notification-icon {
  color: var(--error);
}

.notification.warning .notification-icon {
  color: var(--warning);
}

.notification-text {
  flex: 1;
  color: var(--text-primary);
  font-weight: 500;
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.notification-close:hover {
  background: var(--accent-bg-light);
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .notification {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    transform: translateY(-100%);
  }

  .notification.show {
    transform: translateY(0);
  }
}
