:root {
  --primary-color: #3ec049;
  --secondary-color: #30edae;
  --gradient: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  --gradient-reverse: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
  --bg-dark: #0e180d;
  --bg-darker: #050f06;
  --bg-gradient: linear-gradient(135deg, var(--bg-dark), var(--bg-darker), #042701);
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.1);
  --bg-features: rgba(13, 19, 10, 0.7);
  --text-primary: white;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-gradient: linear-gradient(to right, #00ff80, #a6ff00);
  --shadow-primary: 0 10px 20px rgba(81, 224, 88, 0.3);
  --shadow-card: 0 10px 25px rgba(81, 224, 117, 0.2);
  --shadow-card-gold: 0 10px 25px rgba(0, 183, 255, 0.2);
  --header-height: 80px;
  --max-width: 1400px;
  --border-radius: 16px;
  --border-radius-small: 8px;
  --padding-large: 80px;
  --padding-medium: 40px;
  --padding-small: 20px;
  --transition: all 0.3s ease;
  --transition-slow: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}



.header {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 80px;
  box-sizing: border-box;
  z-index: 1000;
  background: val(--season-bg-dark);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.3s ease;
}

/* --- Шапка: добавляем "схематическую" линию снизу --- */
.header {
  background: val(--season-bg-dark);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid val(--season-bg-darker);
}

.header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--primary-color) 30%,
    var(--secondary-color) 70%,
    transparent 100%);
  opacity: 0.6;
  animation: scan-line 6s linear infinite;
}

@keyframes scan-line {
  0%   { transform: scaleX(0); transform-origin: left; }
  50%  { transform: scaleX(1); transform-origin: left; }
  51%  { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* Базовые стили */
html {
  scroll-behavior: smooth;
  background: var(--bg-gradient);
  position: relative;
  overflow-x: hidden;
  color: var(--text-primary);
  font-family: 'Arial', sans-serif;
  background-attachment: fixed;
  margin: 0;
}

body {
  background: var(--bg-gradient);
  position: relative;
  overflow-x: hidden;
  color: var(--text-primary);
  font-family: 'Arial', sans-serif;
  background-attachment: fixed;
  margin: 0;
}



body::before,
body::after {
  content: "";
  position: fixed;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  pointer-events: none;
  z-index: -3;
  background: radial-gradient(white 1px, transparent 1px);
  background-size: 20px 20px;
  animation: pan 60s linear infinite;
  opacity: 0.1;
}

body::after {
  background: radial-gradient(circle at 1px 1px, white 1px, transparent 0);
  background-size: 80px 80px;
  animation-duration: 120s;
  opacity: 0.03;
}

@keyframes pan {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-20%, -20%);
  }
}

.background-radar {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 400%;
  height: 400%;
  margin-left: -200%;
  margin-top: -200%;
  background: radial-gradient(circle, rgba(83, 81, 224, 0.05) 0%, transparent 70%),
              repeating-radial-gradient(circle, rgba(81, 95, 224, 0.05), rgba(112, 81, 224, 0.02) 10%, transparent 20%);
  z-index: -2;
  animation: radar-scan 10s linear infinite;
  pointer-events: none;
}

@keyframes radar-scan {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.background-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: transparent;
  overflow: hidden;
  pointer-events: none;
}

.background-particles span {
  position: absolute;
  border-radius: 50%;
  background: white;
  opacity: 0.1;
  animation: floatParticle linear infinite;
}

@keyframes floatParticle {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.1;
  }
  100% {
    transform: translateY(-100vh) scale(1.5);
    opacity: 0;
  }
}

.background-particles span:nth-child(1) {
  width: 2px;
  height: 2px;
  top: 10%;
  left: 20%;
  animation-duration: 8s;
}
.background-particles span:nth-child(2) {
  width: 1px;
  height: 1px;
  top: 30%;
  left: 60%;
  animation-duration: 10s;
}
.background-particles span:nth-child(3) {
  width: 3px;
  height: 3px;
  top: 70%;
  left: 40%;
  animation-duration: 12s;
}

/* Стили скроллбара */
::-webkit-scrollbar {
  width: 6px;
  background: var(--bg-darker);
}

::-webkit-scrollbar-track {
  background: var(--bg-card);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
    border-radius: 3px;
}


/* Шапка */

.header-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 32px;
  font-weight: bold;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  cursor: pointer;
  margin-right: auto;
  transition: var(--transition);
}

.logo:hover {
  font-size: 33px;
}

.main-menu {
  display: flex;
  gap: var(--padding-medium);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.main-menu a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 18px;
  position: relative;
  transition: var(--transition);
  background-image: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  background-size: 0% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: var(--text-primary);
}

.main-menu a:hover {
  -webkit-text-fill-color: transparent;
  background-size: 100% 100%;
}

.main-menu a:hover::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Основной контент */
.main-container {
  display: flex;
  flex-direction: column;
  padding-top: 50px;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  margin-top: calc(var(--header-height) + 50px);;
}

.main-container-news {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  margin-top: calc(var(--header-height) + 50px);;
}

.content-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  padding: 0 var(--padding-large);
  box-sizing: border-box;
  gap: 60px;
}

.content {
  flex: 1;
  max-width: 600px;
}

.main-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: var(--padding-small);
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

.subtitle {
  font-size: 20px;
  margin-bottom: var(--padding-medium);
  line-height: 1.6;
  opacity: 0.9;
  /* text-align: center; */
}

/* Кнопки */
.buttons {
  display: flex;
  gap: var(--padding-small);
  margin-top: 30px;
  flex-direction: column;
  align-items: center;
}

.btn {
  padding: 15px 30px;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  transition: var(--transition);
  
}

.btn-primary {
  background: var(--gradient);
  color: var(--text-primary);
  padding: 20px 30px;
  cursor: pointer;
  
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-primary);
}

.btn-secondary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 18px 30px;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(155, 81, 224, 0.1);
  transform: translateY(-3px);
}

/* Карточки */
.card {
  background: var(--bg-card);
  overflow: hidden;
  border-radius: var(--border-radius);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.content-wrapper .card:hover{
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-gold);
}

.main-container .content-wrapper .card {
  width: auto;
  max-width: 400px;
  margin-left: auto;
}

.image-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.info {
  padding: var(--padding-small);
}

.title-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.title {
  font-size: 20px;
  font-weight: bold;
  color: white;
}

.content-wrapper .title{
  font-size: 20px;
  font-weight: bold;
  background: linear-gradient(to right, #FFD700, #FFA500); 
  -webkit-background-clip: text;
  color: transparent; 
}

/* Стили для контейнера моделей */
.discover-section {
  
  padding: 0 var(--padding-large);
  margin: 40px 0;
}



.horizontal-scroll-wrapper {
  overflow-x: auto;
  display: flex;
  gap: 20px;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch; /* Для плавности на iOS */
}

.generations-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  min-width: max-content;
}

.generations-grid .model-image-container {
  height: 320px;
  width: 100%;
  overflow: hidden;
  position: relative;
}


.generations-grid .model-card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  flex: 0 0 auto;
  width: 420px;
  max-width: 420px;
  height: auto;
  scroll-snap-align: start;
  box-shadow: 0 8px 20px rgba(155, 81, 224, 0.1);
}




.generations-grid .model-card:hover::before {
  opacity: 1;
}

/* Контейнер изображения с эффектами */
.generations-grid .model-image-container {
  height: 320px;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.generations-grid .model-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s ease, filter 0.6s ease;
}

@media (max-width: 480px) {
  .generations-grid .model-card {
    width: 300px;
    max-width: 300px;
  }
  .generations-grid .model-image-container img {
    object-fit: cover;
  }
  
}


/* Информационная часть карточки */
.generations-grid .model-info {
  padding: 0px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

/* Заголовок модели */
.generations-grid .model-name {
  font-size: 22px;
  font-weight: bold;
  margin: 0 auto;
  color: white;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: color 0.3s ease;
  padding: 5px;
}

/* Описание модели */
.generations-grid .model-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  flex-grow: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
  .generations-grid {
    grid-template-columns: 1fr;
  }
  
  .generations-grid .model-card {
    height: auto;
    max-height: 400px;
  }
  
  .generations-grid .model-image-container {
    height: 200px;
  }
}

.likes {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #ff4081;
  font-size: 24px;
}

.likes-count {
  font-weight: bold;
}

.heart-icon {
  font-size: 32px;
}

.UserNameTop {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: bold;
  background: linear-gradient(to right, #FFD700, #FFA500); 
  -webkit-background-clip: text;
  color: transparent; 
}

/* Галерея элементов */
.wrap {
  width: 100%;
  padding: var(--padding-large) 0;
}

.items-wrap {
  position: relative;
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: var(--padding-small);
}

.name_items-wrap {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Старые градиенты с фиолетовым цветом удалены — теперь fade-mask в HTML и угловые скобки в новом стиле */

.items {
  flex-shrink: 0;
  display: flex;
  gap: var(--padding-small);
  counter-reset: item;
  justify-content: space-around;
  min-width: 100%;
}

/* Стили для контейнера элемента */
.item {
  position: relative;
  background: transparent;
  flex: 0 0 auto;
  width: 150px; /* Фиксированная ширина */
  height: 250px; /* Фиксированная высота */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 25px;
  font-weight: bold;
  color: #fff;
  margin: 10px 0;
  transition: all 0.1s ease-in-out;
  overflow: hidden;
  border-radius: var(--border-radius-small); 
}


/* Стили для изображений */
.item img {
  width: 100%; 
  height: 100%; 
  object-fit: cover;
  object-position: center;
  border-radius: var(--border-radius-small);
  transition: transform 0.3s ease; 
}

.item .user-name {
  font-size: 12px;
  color: var(--text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--gradient-reverse);
  border-radius: 1px;
}

.image-overlay {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.image-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-overlay::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  backdrop-filter: blur(5px);
}

.user-name {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--text-primary);
  font-size: 12px;
  z-index: 2;
  padding: 0 5px;
}

.marquee {
  animation: scroll 60s linear infinite;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 20px));
  }
}

/* Секция Discover */
.discover-section {
  align-content: center;
  margin-left: auto;
  margin-right: auto;
  margin-top: 60px;
  width: 100%;
  padding: 0 var(--padding-large);
  box-sizing: border-box;
}

.discover-title {
  font-size: 32px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--padding-large);
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* (старое правило flex-wrap удалено — теперь в нижнем оптимизированном блоке) */

.discover-section .card {
  width: 230px;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
}

.discover-section .card-description {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  border-radius: var(--border-radius);
  padding: var(--padding-small);
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition-slow);
  pointer-events: none;
  border: 1px solid rgba(155, 81, 224, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}


.discover-section .card.active {
  transform: translateY(-50px) scale(1.05);
  z-index: 100;
}

.discover-section .card.active .card-description {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.discover-section .card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 30px rgba(155, 81, 224, 0.4);
}

.discover-section .description-content h3 {
  font-size: 24px;
  margin-bottom: 15px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.discover-section .description-content p {
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--padding-small);
}

.discover-section .description-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.discover-section .model-type {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 10px;
  border-radius: 20px;
}

.discover-section .use-model {
  background: var(--gradient);
  color: var(--text-primary);
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.discover-section .use-model:hover {
  transform: translateY(-2px);
}

.load-more-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 30px;
}

.load-more {
  background: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  text-align: center;
}

.load-more:hover {
  background: rgba(155, 81, 224, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(155, 81, 224, 0.3);
}

/* Подвал */
.footer {
  background: var(--bg-card);
  padding: 60px 20px;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-title {
  font-size: 24px;
  margin-bottom: 40px;
  line-height: 1.5;
  color: var(--text-primary);
}

.footer-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 40px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 12px 20px;
  border-radius: 8px;
  background-color: rgba(var(--primary-color-rgb), 0.1);
  color: #fff;
}

.social-link:hover {
  background-color: rgba(var(--primary-color-rgb), 0.2);
  transform: translateY(-2px);
  color: var(--primary-color);
}

.social-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.footer-legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.legal-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal-link:hover {
  color: var(--primary-color);
}

.footer-copyright {
  color: var(--text-secondary);
  font-size: 14px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animated {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Стили для PWA install prompt */
.pwa-install-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgb(10, 10, 19);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 30px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.pwa-install-modal h2 {
  font-size: 24px;
  margin-bottom: 20px;
  background: linear-gradient(45deg, #9B51E0, #3081ED);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pwa-install-modal p {
  font-size: 16px;
  margin-bottom: 30px;
  max-width: 400px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

.pwa-install-buttons {
  display: flex;
  gap: 15px;
}

.pwa-install-btn {
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pwa-install-confirm {
  background: linear-gradient(45deg, #9B51E0, #3081ED);
  color: white;
  border: none;
}

.pwa-install-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(155, 81, 224, 0.4);
}

.pwa-install-cancel {
  background: transparent;
  border: 2px solid #9B51E0;
  color: #9B51E0;
}

.pwa-install-cancel:hover {
  background: rgba(155, 81, 224, 0.1);
}


@media (max-width: 768px) {
  .footer {
    padding: 40px 20px;
  }
  
  .footer-title {
    font-size: 20px;
  }
  
  .footer-social {
    flex-direction: column;
    gap: 15px;
  }
  
  .social-link {
    justify-content: center;
  }
}

/* Секция Features */
.features-section {
  padding: var(--padding-large);
  background: var(--season-bg-dark);
}

.features-section .section-title {
  font-size: 32px;
  margin-bottom: var(--padding-large);
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  text-align: center;
  justify-content: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--padding-medium);
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.feature-header {
  display: flex;
  align-items: center;
  text-align: center;
  padding: var(--padding-small);
  gap: 15px;
  border-bottom: 1px solid var(--border-color);
  justify-content: center;
}

.feature-icon {
  font-size: 28px;
}

.feature-header h3 {
  margin: 0;
  font-size: 22px;
}

.feature-media {
  position: relative;
  height: 250px;
  overflow: hidden;
}



.feature-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feature-description {
  padding: var(--padding-small);
}

.feature-description p {
  margin-bottom: var(--padding-small);
  line-height: 1.5;
  color: var(--text-secondary);
}

.feature-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
}

.feature-link:hover {
  color: #b05cff;
}

.comparison-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 8px;
}

.comparison-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.comparison-container .before {
  z-index: 1;
}

.comparison-container .after {
  z-index: 2;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.comparison-slider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: white;
  left: 50%;
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 10;
  margin: 0;
}

.slider-button {
  position: absolute;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-button::before,
.slider-button::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  background: #333;
}

.slider-button::before {
  transform: translateX(-1px);
}

.slider-button::after {
  transform: translateX(1px);
}

.comparison-slider.dragging {
  background: rgba(255, 255, 255, 0.8);
}

/* Старые правила .right-image-container удалены — теперь в нижнем блоке */

/* Профиль пользователя */
.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: color-mix(in srgb, var(--primary-color), black 50%);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid white;
}

.logout-btn {
  color: white;
  margin-left: 10px;
  cursor: pointer;
  font-size: 14px;
}

.user_container {
  background: var(--container-background);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 8px 10px var(--shadow-color);
  margin: auto;
  width: 90%;
  max-width: 1200px;
  line-height: 1.8;
  font-weight: 600;
}

/* Галерея */
.gallery-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 0 20px;
}

.gallery-header h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gallery-controls {
  max-width: 800px;
  margin: 0 auto;
}

.search-box {
  display: flex;
  margin-bottom: 20px;
}

.search-box input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 30px 0 0 30px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-size: 16px;
}

.search-box button {
  padding: 12px 20px;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 0 30px 30px 0;
  cursor: pointer;
  transition: var(--transition);
}

.search-box button:hover {
  opacity: 0.9;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.filter-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn.active {
  background: var(--gradient);
  border-color: transparent;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Страница профиля */
.profile-page {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 80px;
}

.profile-cover-container {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: 0 0 16px 16px;
}

.profile-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-cover-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  border: none;
}

.upload-cover-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

.profile-content {
  padding: 0 20px;
  margin-top: 20px;
}

.profile-info-container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.profile-avatar-container {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  box-shadow: 0 8px 10px var(--shadow-color);
  background: 
    linear-gradient(white, white) padding-box,
    var(--border-gradient) border-box;
  border: 4px solid transparent;
  overflow: hidden;
  flex-shrink: 0;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-details {
  flex: 1;
  padding-top: 30px;
}

.profile-username {
  font-size: 28px;
  margin: 0 0 10px;
  color: var(--text-primary);
}

.bio-container {
  position: relative;
  display: inline-block;
}

.profile-bio {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 10px;
  border-radius: 8px;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
}

.profile-bio[contenteditable="true"] {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.edit-bio-btn {
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  padding: 5px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.edit-bio-btn:hover {
  opacity: 1;
}

.action-buttons {
  margin: 30px 0;
  text-align: center;
}
 

/* Галерея Masonry */
.masonry-gallery {
  columns: 3;
  column-gap: 20px;
  width: 100%;
  margin: 0 auto;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s ease;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-item-info {
  padding: 15px;
}

.gallery-item-title {
  font-weight: bold;
  margin-bottom: 5px;
  color: var(--text-primary);
}

.gallery-item-author {
  font-size: 14px;
  color: var(--text-secondary);
}



/* Секция токенов и премиума */
.token-section {
  margin-top: 60px;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.centered-content {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.token-grid, .premium-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--padding-medium);
  margin: var(--padding-large) 0;
  width: 100%;
  justify-items: center; 
}

.token-card, .premium-card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding: var(--padding-medium);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%; 
  max-width: 500px; 
  box-sizing: border-box; 
}

.token-card:hover, .premium-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.token-amount {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 5px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.token-price {
  font-size: 32px;
  font-weight: bold;
  margin: 10px 0;
}

.token-description {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.premium-title {
  margin-top: 60px;
  text-align: center;
}

.premium-card {
  position: relative;
  overflow: hidden;
  height: 100%; 
  min-height: 450px; 
  display: flex;
  flex-direction: column;
  justify-content: space-between; 
}

.premium-card .btn {
  margin-top: auto; 
  align-self: center; 
  width: 80%; 
}

.premium-badge {
  font-size: 40px;
  margin-bottom: 10px;
}

.premium-duration {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 5px;
}

.premium-price {
  font-size: 28px;
  font-weight: bold;
  margin: 15px 0;
  color: #FFD700;
}

.premium-features {
  flex-grow: 1; 
  display: flex;
  flex-direction: column;
  justify-content: center; 
}

.premium-features li {
  margin-bottom: 8px;
  color: var(--text-secondary);
  text-align: left;
  padding-left: 20px;
}

.payment-methods {
  margin: var(--padding-large) 0;
  text-align: center;
  width: 100%;
}

.payment-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--padding-small);
  margin-top: var(--padding-medium);
  width: 100%;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 12px 24px;
  border-radius: 30px;
  transition: var(--transition);
  margin: 5px;
  cursor: pointer;
}

.btn-outline:hover {
  background: rgba(155, 81, 224, 0.1);
  transform: translateY(-2px);
}

.highlight {
  animation: highlight-fade 2s ease-in-out;
  background-color: rgba(46, 204, 113, 0.2);
}

@keyframes highlight-fade {
  0% { background-color: rgba(46, 204, 113, 0.2); }
  100% { background-color: transparent; }
}

/* Модальное окно */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background: var(--bg-darker);
  margin: 5% auto;
  padding: 20px;
  border-radius: var(--border-radius);
  max-width: 500px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  position: relative;
  animation: slideDown 0.3s ease-out;
}

.auth-modal-content {
  text-align: center;
  padding: 40px;
}

.auth-modal-image {
  margin-bottom: 20px;
}

.auth-modal-image img {
  max-width: 200px;
  height: auto;
  border-radius: 50%;
  border: 3px solid var(--primary-color);
}

.auth-modal-text h2 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.auth-modal-text p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 25px;
  line-height: 1.5;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideDown {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Кнопка закрытия модального окна */
.close-modal {
  position: absolute;
  top: 15px;
  right: 50px;
  color: var(--text-secondary);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--primary-color);
}

.small-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 10px;
}

.modal .btn {
  width: 100%;
}

.modal .btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  align-self: center;
}

.modal .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Стили для модального окна оферты */
.offer-modal-content {
  text-align: center;
  padding: 40px;
  max-height: 70vh;
  overflow-y: auto;
}

.offer-text {
  text-align: left;
  margin: 20px 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.offer-text p, .offer-text li {
  margin-bottom: 15px;
}

.offer-text h3 {
  font-size: 1.5em;
  margin: 25px 0 15px;
  color: var(--text-primary);
}

.offer-text h4 {
  font-size: 1.3em;
  margin: 20px 0 12px;
  color: var(--text-primary);
}

.offer-text h5 {
  font-size: 1.1em;
  margin: 18px 0 10px;
  color: var(--text-primary);
}

.offer-text ol, .offer-text ul {
  margin-left: 20px;
  margin-bottom: 15px;
}

.modal-image {
  margin-bottom: 20px;
}

.modal-image img {
  max-width: 200px;
  height: auto;
  border-radius: 50%;
  border: 3px solid var(--primary-color);
}

.modal-text h2 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.main-menu.active {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--bg-darker);
  padding: 20px;
  z-index: 999;
}

@media (max-width: 768px) {
  /* Общие стили */
  :root {
    --padding-large: 40px;
    --padding-medium: 20px;
    --padding-small: 15px;
  }

  /* Шапка */
  .header {
    padding: 15px 20px;
    height: 60px;
  }

  .logo {
    font-size: 24px;
  }

  .main-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-darker);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    border-top: 1px solid var(--border-color);
  }

  .main-menu.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
  }

  /* Основной контент */
  .main-container {
    padding-top: 0px;
  }


  .main-container .content-wrapper .card {
    width: auto;
    max-width: 200px;
    margin-left: auto;
}

  .content-wrapper {
    padding: 0 20px;
    gap: 30px;
  }

  .content {
    max-width: 100%;
    text-align: center;
  }

  .main-title {
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 15px;
  }

  .subtitle {
    font-size: 16px;
    margin-bottom: 25px;
  }

  .buttons {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 14px;
  }

  /* Карточка с изображением */
  .content-wrapper .card {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .items-wrap {
    width: 730px;
    margin-top: 50px;
  }

  /* Секция моделей */

  .discover-section {
    overflow: auto;
  }

   .generations-grid {
    display: -webkit-inline-box;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--padding-small);
    justify-items: center;
  }

  .discover-section .card {
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
  }

  .description-content h3 {
    font-size: 18px;
  }

  .description-content p {
    font-size: 14px;
  }


  /* Особенности */
  .features-section {
    padding: 40px 20px;
  }

  .section-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-card {
    width: 100%;
  }

  .feature-media {
    height: 200px;
  }

  /* Подвал */
  .footer {
    padding: 40px 20px;
    margin-top: 40px;
  }

  .footer-title {
    font-size: 20px;
    margin-bottom: 30px;
  }

  .footer-social {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .social-link {
    width: 100%;
    max-width: 250px;
    justify-content: center;
  }

  .footer-legal {
    text-align: center;
  }

  .legal-link {
    margin-bottom: 10px;
    display: block;
  }

  /* Модальные окна */
  .modal-content {
    width: 90%;
    margin: 10% auto;
    padding: 15px;
  }

  .auth-modal-content,
  .offer-modal-content {
    padding: 20px;
  }

  /* Анимации */
  @keyframes scroll {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(-50%);
    }
  }

  /* Загрузчик */
  #gallery-loader {
    padding: 20px 0;
  }

  /* Адаптация для телефонов с очень маленьким экраном */
  @media (max-width: 480px) {
    .generations-grid {
      grid-template-columns: 1fr;
    }

    .main-title {
      font-size: 28px;
    }

    .discover-title,
    .section-title {
      font-size: 24px;
    }
  }

  .desktop-auth {
    display: none !important;
  }
}



@media (max-width: 1024px) {
  /* Шапка */
  .header {
    padding: 15px 20px;
  }
  .main-menu {
    gap: var(--padding-small);
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Главный контент */
  .content-wrapper {
    gap: var(--padding-medium);
  }
  .content {
    text-align: center;
    margin-bottom: var(--padding-medium);
    max-width: 500px;
  }
  .buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Галерея */
  .items-wrap {
    gap: var(--padding-small);
  }

  .card-description
  {
    overflow-y: auto;
  }

  /* Модели */
  .generations-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    flex-wrap: nowrap;
  }
  .discover-section .card {
    width: 100%;
    max-width: 250px;
  }

  /* Футер */
  .footer {
    padding: var(--padding-medium) var(--padding-small);
  }
  .footer-grid {
    flex-direction: column;
    gap: 30px;
    align-items: center;
    text-align: center;
  }
  .footer-title {
    font-size: 20px;
    margin-bottom: 30px;
  }
  .footer-subtitle {
    font-size: 18px;
  }

  /* Размеры текста */
  .main-title {
    font-size: 36px;
  }
  .subtitle {
    font-size: 18px;
  }
  .btn {
    padding: 15px 30px;
    font-size: 16px;
  }

  /* Бегущая лента */
  .items-wrap {
    gap: var(--padding-small); /* Уменьшите зазоры */
    scroll-snap-type: x mandatory; /* Добавляет snap points */
  }

  .item {
    flex-shrink: 0; /* Предотвращает сжатие элементов */
    margin-bottom: var(--padding-small); /* Добавьте вертикальные отступы */
  }

  .item img {
    width: 100%;
    height: auto;
    object-fit: cover; /* Обрезает изображение, сохраняя пропорции */
    object-position: center; /* Центрирует изображение */
  }

  .user-name {
    font-size: 12px; /* Уменьшите размер текста */
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Анимация прокрутки */
  @keyframes scroll {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(calc(-100% - 20px)); /* Уменьшите значение для более медленной прокрутки */
    }
  }

  .items-wrap:hover .marquee {
    animation-play-state: paused; /* При наведении останавливает прокрутку */
  }
}

@media (max-width: 425px) {
  /* Общие стили */
  :root {
    --padding-large: 20px;
    --padding-medium: 15px;
    --padding-small: 10px;
    --header-height: 60px;
  }

  /* Базовые стили */
  body::before,
  body::after {
    background-size: 30px 30px;
    animation-duration: 120s;
  }

  body::after {
    background-size: 60px 60px;
  }

  /* Шапка */
  .header {
    padding: 10px 15px;
    height: var(--header-height);
  }

  .logo {
    font-size: 20px;
  }

  .menu-toggle {
    font-size: 20px;
  }

  .main-menu {
    display: none;
    top: var(--header-height);
    padding: 15px;
  }

  .main-menu a {
    font-size: 16px;
  }

  .content {
    max-width: 100%;
  }

  .content-wrapper {
    flex-direction: column;
    padding: 0 15px;
    gap: 20px;
  }

  .main-title {
    font-size: 28px;
    margin-bottom: 10px;
  }

  .subtitle {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .buttons {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
  }

  .btn {
    width: 100%;
    max-width: 250px;
    padding: 12px 20px;
    font-size: 14px;
  }

  /* Карточка с изображением */
  .main-container .content-wrapper .card {
    display: none;
  }

  /* Галерея элементов */
  
  .wrap {
    padding: var(--padding-medium) 0;
  }

  .name_items-wrap {
    font-size: 20px;
    padding-left: 15px;
  }

  .items-wrap {
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
  }

  .item {
    width: 120px;
    height: 180px;
  }

  /* Секция моделей */
  .discover-section {
    overflow-x: auto;
    padding: 0 15px;
    margin-top: 30px;
  }

  .discover-title {
    font-size: 24px;
    margin-bottom: var(--padding-medium);
  }

  .generations-grid {
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .discover-section .card {
    flex: 0 0 auto;
    width: 180px;
    scroll-snap-align: start;
    margin-right: 10px;
  }

  .load-more {
    padding: 10px 20px;
    font-size: 14px;
  }

  /* Особенности */
  .features-section {
    padding: var(--padding-medium) 15px;
  }

  .features-section .section-title {
    font-size: 24px;
    margin-bottom: var(--padding-medium);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    width: 100%;
  }

  .feature-media {
    height: 180px;
  }

  /* Подвал */
  .footer {
    padding: var(--padding-medium) 15px;
    margin-top: 30px;
  }

  .footer-title {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .footer-social {
    gap: 10px;
  }

  .social-link {
    padding: 10px 15px;
    font-size: 14px;
  }

  /* Модальные окна */
  .modal-content {
    width: 80%;
    margin: 20% auto;
  }

  .auth-modal-content,
  .offer-modal-content {
    padding: 15px;
  }

  .auth-modal-image img {
    max-width: 150px;
  }

  .auth-modal-text h2 {
    font-size: 20px;
  }

  .auth-modal-text p {
    font-size: 14px;
  }

  /* Профиль пользователя */
  .profile-page {
    padding-top: 60px;
  }

  .profile-cover-container {
    height: 200px;
  }

  .profile-info-container {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .profile-avatar-container {
    width: 120px;
    height: 120px;
    margin-top: -60px;
  }

  .profile-details {
    padding-top: 0;
    text-align: center;
  }

  .profile-username {
    font-size: 22px;
  }

  .profile-bio {
    font-size: 14px;
    max-width: 100%;
  }

  /* Галерея Masonry */
  .masonry-gallery {
    columns: 2;
    column-gap: 10px;
  }

  .gallery-item {
    margin-bottom: 10px;
  }

  /* Токены и премиум */
  .token-grid, .premium-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .token-card, .premium-card {
    padding: 15px;
    min-height: auto;
  }

  .token-price {
    font-size: 28px;
  }

  .premium-price {
    font-size: 24px;
  }

  .premium-badge {
    font-size: 32px;
  }

  /* Улучшение скролла на iOS */
  .items-wrap {
    -webkit-overflow-scrolling: touch;
  }

}

/* Бургер-меню */
.burger-menu {
  display: none;
}

.burger-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.burger-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: white;
  margin: 5px 0;
  transition: all 0.3s ease;
}

.burger-content {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--bg-darker);
  padding: 20px;
  z-index: 1000;
  border-top: 1px solid var(--border-color);
}

.burger-nav {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.burger-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 18px;
  padding: 10px;
  border-radius: var(--border-radius-small);
  transition: var(--transition);
}

.burger-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Анимация бургера при открытии */
.burger-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger-toggle.active span:nth-child(2) {
  opacity: 0;
}

.burger-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}


/* Показываем бургер-меню на мобильных */
@media (max-width: 768px) {
  .burger-menu {
    display: block;
  }
  
  .burger-toggle {
    display: block;
  }
  
  .main-menu {
    display: none;
  }
  
  #auth-button-container {
    display: none;
  }
  
  #telegram-auth {
    display: none;
  }
  
  .burger-content.active {
    display: block;
  }
  
  #burger-auth {
    padding: 15px 0;
    margin-top: 10px;
  }
  
  #burger-auth .btn {
    width: 75%;
  }
}

/* Управление видимостью auth элементов */
.desktop-auth {
  display: block;
}

.mobile-auth {
  display: flex;
  justify-content: center;
}

@media (max-width: 768px) {
  .desktop-auth {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .mobile-auth {
    display: none !important;
  }
}

@media (orientation: landscape) and (max-width: 900px) {
  @viewport {
    width: device-width;
    zoom: 1.0;
  }
  
  html {
    width: 1440px;
    margin: 0 auto;
    overflow-x: auto;
    transform: none !important;
  }
  body {
    min-width: 1440px;
  }
}

.news-page {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.news-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: var(--padding-small);
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

.news-subtitle {
  font-size: 20px;
  margin-bottom: var(--padding-large);
  line-height: 1.6;
  opacity: 0.9;
  text-align: center;
  color: var(--text-secondary);
}

.news-feed {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.news-article {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  opacity: 1;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease, background 0.3s ease;
  position: relative;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 4px 16px rgba(155, 81, 224, 0.1);
}

.news-article:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.3),
    0 8px 25px rgba(155, 81, 224, 0.2);
  background: rgba(255, 255, 255, 0.12);
}

.news-article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.news-article:hover::before {
  opacity: 1;
}

.news-date {
  padding: 15px 25px !important;
  background: linear-gradient(90deg, 
    rgba(155, 81, 224, 0.15) 0%, 
    rgba(48, 129, 237, 0.15) 100%);
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.news-image-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  min-height: 200px;
  max-height: 500px;
}

.news-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.7s ease;
}

.news-article:hover .news-image {
  transform: scale(1.05);
}

.news-content {
  padding: 30px;
}

.news-article-title {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--text-primary);
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  padding-bottom: 15px;
}

.news-article-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
}

.news-text {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 16px;
}

.news-text p {
  margin-bottom: 15px;
  position: relative;
  padding-left: 20px;
}

.news-text p::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-size: 20px;
  line-height: 1;
}

.news-text p:last-child {
  margin-bottom: 0;
}

.news-feed > * + * {
  margin-top: 10px;
}

@supports not (backdrop-filter: blur(20px)) {
  .news-article {
    background: rgba(10, 10, 19, 0.95);
  }
}

/* АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ */
@media (max-width: 1024px) {
  .news-page {
    padding: 0px var(--padding-medium) var(--padding-medium);
  }
  
  .news-title {
    font-size: 36px;
    margin-bottom: 15px;
  }
  
  .news-subtitle {
    font-size: 18px;
    margin-bottom: 30px;
  }
  
  .news-feed {
    gap: 30px;
  }
  
  .news-image-container {
    min-height: 180px;
    max-height: 400px;
  }
  
  .news-content {
    padding: 25px;
  }
  
  .news-article-title {
    font-size: 24px;
  }
  
  .news-text {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  :root {
    --padding-large: 40px;
    --padding-medium: 20px;
    --padding-small: 15px;
  }

  .news-page {
    padding: 0px var(--padding-small) var(--padding-medium);
  }
  
  .news-title {
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 12px;
  }
  
  .news-subtitle {
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.5;
  }
  
  .news-feed {
    gap: 25px;
  }
  
  .news-article {
    border-radius: 12px;
    margin: 0 auto;
    max-width: 100%;
  }
  
  .news-date {
    font-size: 13px;
  }
  
  .news-image-container {
    min-height: 150px;
    max-height: 300px;
  }
  
  .news-content {
    padding: 20px;
  }
  
  .news-article-title {
    font-size: 22px;
    margin-bottom: 15px;
    padding-bottom: 12px;
  }
  
  .news-article-title::after {
    width: 50px;
    height: 2px;
  }
  
  .news-text {
    font-size: 14px;
    line-height: 1.6;
  }
  
  .news-text p {
    padding-left: 18px;
    margin-bottom: 12px;
  }
  
  .news-text p::before {
    font-size: 18px;
  }
  
  /* Убираем сложные эффекты на мобильных для производительности */
  .news-article {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }
  
  .news-article:hover {
    transform: translateY(-3px);
    box-shadow: 
      0 10px 25px rgba(0, 0, 0, 0.25),
      0 5px 15px rgba(155, 81, 224, 0.15);
  }
}

@media (max-width: 480px) {
  :root {
    --padding-large: 20px;
    --padding-medium: 15px;
    --padding-small: 10px;
  }

  .news-page {
    padding: 0px 15px 30px;
  }
  
  .news-title {
    font-size: 28px;
    margin-bottom: 10px;
  }
  
  .news-subtitle {
    font-size: 14px;
    margin-bottom: 20px;
  }
  
  .news-feed {
    gap: 20px;
  }
  
  .news-article {
    border-radius: 10px;
    border-width: 1px;
  }
  
  .news-date {
    font-size: 12px;
  }
  
  .news-image-container {
    min-height: 120px;
    max-height: 250px;
  }
  
  .news-content {
    padding: 15px;
  }
  
  .news-article-title {
    font-size: 20px;
    margin-bottom: 12px;
    padding-bottom: 10px;
  }
  
  .news-article-title::after {
    width: 40px;
    height: 1.5px;
  }
  
  .news-text {
    font-size: 13px;
    line-height: 1.5;
  }
  
  .news-text p {
    padding-left: 15px;
    margin-bottom: 10px;
  }
  
  .news-text p::before {
    font-size: 16px;
    top: -1px;
  }
  
  /* Еще более простые эффекты для слабых устройств */
  .news-article {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  .news-article:hover {
    transform: translateY(-2px);
    box-shadow: 
      0 8px 20px rgba(0, 0, 0, 0.2),
      0 3px 10px rgba(155, 81, 224, 0.1);
  }
  
  .news-article:hover .news-image {
    transform: scale(1.03);
  }
}

@media (max-width: 375px) {
  .news-page {
    padding: 0px 12px 25px;
  }
  
  .news-title {
    font-size: 24px;
  }
  
  .news-subtitle {
    font-size: 13px;
  }
  
  .news-article-title {
    font-size: 18px;
  }
  
  .news-text {
    font-size: 12px;
  }
  
  .news-image-container {
    min-height: 100px;
    max-height: 200px;
  }
}

/* Для ландшафтной ориентации на мобильных */
@media (max-width: 900px) and (orientation: landscape) {
  .news-image-container {
    max-height: 250px;
  }
  
  .news-page {
    padding: 0px 20px 30px;
  }
}

/* Для iOS Safari */
@supports (-webkit-touch-callout: none) {
  .news-article {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
  }
  
  @media (max-width: 768px) {
    .news-article {
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }
  }
}

.music-control-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  margin-left: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-control-btn:hover {
  background: rgba(126, 255, 244, 0.2);
  transform: scale(1.1);
}

.music-control-btn.active {
  color: var(--season-secondary);
  background: var(--season-bg-dark);
  box-shadow: 0 0 10px rgba(35, 48, 0, 0.5);
}

.music-control-btn.muted {
  color: #666;
  opacity: 0.7;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Анимация пульсации при воспроизведении */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.music-control-btn.playing {
  animation: pulse 2s infinite;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
  .music-control-btn {
    margin-left: 5px;
    width: 35px;
    height: 35px;
    font-size: 20px;
  }
  
  #burger-music-control {
    width: 100%;
    height: auto;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 5px 0;
    font-size: 16px;
  }
}



.main-container-articles {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  margin-top: calc(var(--header-height) + 50px);;
}

.articles-page {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.articles-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: var(--padding-small);
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

.articles-subtitle {
  font-size: 20px;
  margin-bottom: var(--padding-large);
  line-height: 1.6;
  opacity: 0.9;
  text-align: center;
  color: var(--text-secondary);
}

.articles-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--gradient);
  border-color: transparent;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.article-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 4px 16px rgba(155, 81, 224, 0.1);
}

.article-card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.3),
    0 8px 25px rgba(155, 81, 224, 0.2);
  background: rgba(255, 255, 255, 0.12);
}

.article-image-container {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
}

.article-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.article-card:hover .article-image {
  transform: scale(1.05);
}

.article-content {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-category {
  display: inline-block;
  padding: 5px 12px;
  background: var(--gradient);
  color: white;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 15px;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
  line-height: 1.4;
  color: var(--text-primary);
}

.article-excerpt {
  margin-bottom: 20px;
  flex-grow: 1;
}

.article-excerpt p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 0.8;
}

.read-more-btn {
  align-self: center;
  margin-top: auto;
  text-align: center;
}

/* Стили для отдельной статьи */
.main-container-article {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  margin-top: calc(var(--header-height) + 50px);;
}

.article-page {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.article-header {
  margin-bottom: 40px;
  text-align: center;
}

.article-header .article-category {
  margin: 0 auto 20px;
}

.article-header .article-title {
  font-size: 42px;
  margin-bottom: 20px;
  line-height: 1.3;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.article-header .article-meta {
  justify-content: center;
  gap: 30px;
  margin-bottom: 30px;
}

.article-header .article-image-container {
  height: 400px;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 0;
}

.article-content {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 50px;
}

.article-content h2 {
  font-size: 28px;
  margin: 40px 0 20px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.article-content h3 {
  font-size: 22px;
  margin: 30px 0 15px;
  color: var(--text-primary);
}

.article-content ul, 
.article-content ol {
  margin-bottom: 20px;
  padding-left: 25px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 20px;
  margin: 25px 0;
  font-style: italic;
  color: var(--text-secondary);
  background: rgba(155, 81, 224, 0.05);
  padding: 20px;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.code-block {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  padding: 20px;
  margin: 25px 0;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  font-family: 'Courier New', monospace;
  font-size: 15px;
  line-height: 1.5;
  color: #e0e0e0;
}

.article-image-example {
  text-align: center;
}

.article-image-example img {
  max-width: 100%;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.image-caption {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 10px;
  font-style: italic;
}

.article-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.article-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  font-size: 13px;
  color: var(--text-secondary);
}

.article-actions {
  display: flex;
  gap: 15px;
}

/* Адаптивность */
@media (max-width: 768px) {
  .articles-title {
    font-size: 36px;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .article-header .article-title {
    font-size: 32px;
  }
  
  .article-header .article-image-container {
    height: 250px;
  }
  
  .article-content {
    font-size: 16px;
  }
  
  .article-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .article-actions {
    width: 100%;
    justify-content: center;
  }
}


/* Модальное окно для согласия на куки */
.cookie-modal {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  max-height: 30px;
  width: 90%;
  z-index: 10000;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: slideUpCookie 0.5s ease-out;
  align-self: flex-end;

}

.cookie-modal-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 15px;
}

.cookie-modal-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-secondary);
  flex: 1;
}

#cookie-ok-btn {
  background: var(--gradient);
  color: var(--text-primary);
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  max-width: 60px;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

#cookie-ok-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

@keyframes slideUpCookie {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .cookie-modal {
    bottom: 15px;
    padding: 15px;
    max-width: 350px;
  }
  
  .cookie-modal-content {
    text-align: center;
    gap: 12px;
  }
  
  .cookie-modal-content p {
    font-size: 13px;
  }
  
  #cookie-ok-btn {
    width: 100%;
    padding: 12px 20px;
  }
}

@media (max-width: 480px) {
  .cookie-modal {
    bottom: 10px;
    padding: 12px;
    max-width: 300px;
  }
  
  .cookie-modal-content p {
    font-size: 12px;
  }
  
  #cookie-ok-btn {
    font-size: 13px;
    padding: 10px 16px;
  }
}

/* Для очень маленьких экранов */
@media (max-width: 375px) {
  .cookie-modal {
    max-width: 280px;
  }
}


.auth-modal-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: center;
}

.auth-input {
  padding: 15px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.05);
  color: white;
  font-size: 16px;
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.auth-hint {
  font-size: 14px;
  color: var(--text-secondary);
}


/* --- ВЕСНА (активна) --- */

:root {
  --season-primary:   #3ec049;
  --season-secondary: #30edae;
  --season-orb1:      #2dba3c;
  --season-orb2:      #00e5aa;
  --season-orb3:      #b8ff6e;
  --season-bg-dark:   #0e180d;
  --season-bg-darker: #050f06;
}

/* --- ЛЕТО (раскомментировать при необходимости) ---*/


/* :root {
  --season-primary:   #bf00ff;
  --season-secondary: #7b00ff;
  --season-orb1:      #bf00ff;
  --season-orb2:      #6600cc;
  --season-orb3:      #ff66ff;
  --season-bg-dark:   #120018;
  --season-bg-darker: #07000d;
} */


/* --- ОСЕНЬ (раскомментировать при необходимости) ---*/

/* :root {
  --season-primary:   #e05520;
  --season-secondary: #ffb347;
  --season-orb1:      #cc3300;
  --season-orb2:      #ff6600;
  --season-orb3:      #ffcc00;
  --season-bg-dark:   #180a00;
  --season-bg-darker: #0d0500;
} */


/* --- ЗИМА (раскомментировать при необходимости) ---*/


/* :root {
  --season-primary:   #3081ed;
  --season-secondary: #45f3ff;
  --season-orb1:      #0066cc;
  --season-orb2:      #00ccff;
  --season-orb3:      #99eeff;
  --season-bg-dark:   #050d18;
  --season-bg-darker: #020810;
} */


/* Применяем сезонные переменные поверх базовых */
:root {
  --primary-color:    var(--season-primary);
  --secondary-color:  var(--season-secondary);
  --gradient:         linear-gradient(45deg, var(--season-primary), var(--season-secondary));
  --gradient-reverse: linear-gradient(45deg, var(--season-secondary), var(--season-primary));
  --bg-dark:          var(--season-bg-dark);
  --bg-darker:        var(--season-bg-darker);
  --bg-gradient:      linear-gradient(135deg, var(--season-bg-dark), var(--season-bg-darker));
}

/* ============================================================
   CANVAS BACKGROUND (demo_port стиль)
   ============================================================ */
#canvas-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  opacity: 0.35;
  pointer-events: none;
}

/* Цветные orb-области */
.bg-orbs {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  animation: orb-float 18s infinite ease-in-out alternate;
}

.orb-1 {
  width: 480px; height: 480px;
  background: var(--season-orb1);
  top: -120px; left: -120px;
}
.orb-2 {
  width: 560px; height: 560px;
  background: var(--season-orb2);
  bottom: -180px; right: -140px;
  animation-delay: -6s;
}
.orb-3 {
  width: 300px; height: 300px;
  background: var(--season-orb3);
  top: 40%; left: 45%;
  opacity: 0.1;
  animation-delay: -12s;
}

@keyframes orb-float {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 50px) scale(1.15); }
}

/* ============================================================
   МОДАЛЬНОЕ ОКНО АВТОРИЗАЦИИ — РЕДИЗАЙН
   ============================================================ */
.auth-modal-redesign {
  max-width: 440px;
  border: 1px solid rgba(255,255,255,0.08);
}

.auth-modal-logo {
  text-align: center;
  margin-bottom: 20px;
}

.auth-modal-logo img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--primary-color);
  margin-bottom: 10px;
}

.auth-modal-logo h2 {
  font-size: 22px;
  color: white;
  margin: 0 0 5px;
}

.logo-accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* Вкладки авторизации */
.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.04);
  border-radius: 30px;
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 9px 16px;
  border: none;
  border-radius: 26px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.auth-tab.active {
  background: var(--gradient);
  color: white;
}

.auth-tab-content {
  display: none;
  flex-direction: column;
  gap: 12px;
  animation: fadeInUp 0.25s ease;
  align-items: center;
}

.auth-tab-content.active {
  display: flex;
}

.auth-error {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #ff7070;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
}

/* ============================================================
   ИНТЕРАКТИВНЫЕ КАРТОЧКИ МОДЕЛЕЙ — стиль как у feature-card
   ============================================================ */
.model-card-interactive {
  cursor: pointer;
  position: relative;
}

.model-card-interactive:hover {
  border-color: var(--primary-color) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
              0 0 30px rgba(62, 192, 73, 0.15);
}

/* Старый оверлей "Подробнее" — убран */
.model-card-overlay { display: none !important; }

/* ============================================================
   МОДАЛЬНОЕ ОКНО МОДЕЛИ
   ============================================================ */
.model-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  text-align: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.model-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Сама модалка — в стиле уведомлений */
.model-modal-box {
  background: linear-gradient(135deg, var(--season-bg-dark), var(--season-bg-darker));
  border: 1px solid rgba(141, 141, 141, 0.25) !important;
  border-radius: 16px;
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
              0 0 60px rgba(87, 87, 87, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px) saturate(180%);
  animation: modelModalIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
}

@keyframes modelModalIn {
  from { transform: scale(0.92) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* Угловые "скобки" — как у уведомлений */
.model-modal-box::before,
.model-modal-box::after {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  border-color: var(--primary-color);
  border-style: solid;
  opacity: 0.7;
  pointer-events: none;
  z-index: 3;
}

.model-modal-box::before {
  top: 8px; left: 8px;
  border-width: 2px 0 0 2px;
  border-radius: 4px 0 0 0;
}

.model-modal-box::after {
  bottom: 8px; right: 8px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 4px 0;
}

/* Шапка модалки — в стиле уведомлений */
.model-modal-header {
  position: relative;
  padding: 18px 20px;
  background: var(--season-bg-dark);
  border-bottom: 1px solid var(--season-bg-darker);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

/* Сканирующая линия под шапкой */
.model-modal-header::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--primary-color) 30%,
    var(--secondary-color) 70%,
    transparent 100%);
  opacity: 0.7;
}

.model-modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-modal-header h2::before {
  content: '// ';
  font-family: 'Courier New', monospace;
  -webkit-text-fill-color: var(--primary-color);
  opacity: 0.7;
}

/* Кнопка закрытия */
.model-modal-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--season-primary);
  color: var(--text-muted);
  font-size: 18px;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.model-modal-close:hover {
  color: var(--primary-color);
  background: var(--season-bg-darker);
  transform: rotate(90deg);
}

/* Содержимое: galery + info */
.model-modal-inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

/* Галерея — основное изображение */
.model-modal-gallery {
  position: relative;
  background: #000;
  overflow: hidden;
  min-height: 380px;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.model-modal-main-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: opacity 0.25s ease;
  display: block;
}

/* Стрелки галереи */
.model-gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--season-bg-dark);
  border: 1px solid var(--season-primary);
  color: var(--text-primary);
  font-size: 24px;
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 5;
  backdrop-filter: blur(8px);
}

.model-gallery-btn:hover {
  background: rgba(62, 192, 73, 0.3);
  color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 16px rgba(62, 192, 73, 0.4);
}

.model-gallery-btn.prev { left: 12px; }
.model-gallery-btn.next { right: 12px; }

/* Счётчик "1 / 5" в углу галереи */
.model-gallery-counter {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--season-bg-dark);
  border: 1px solid var(--season-secondary);
  color: var(--primary-color);
  font-family: 'Courier New', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 12px;
  backdrop-filter: blur(8px);
  z-index: 4;
}

/* Информационная часть справа */
.model-modal-info {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  background: var(--season-bg-dark);
  border-left: 1px solid var(--season-secondary);
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) transparent;
}

.model-modal-info::-webkit-scrollbar { width: 4px; }
.model-modal-info::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 2px;
}

/* Описание */
.model-modal-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.model-modal-desc::before {
  content: 'DESCRIPTION';
  display: block;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--primary-color);
  opacity: 0.5;
  margin-bottom: 6px;
}

/* Миниатюры */
.model-modal-thumbs-wrapper::before {
  content: 'GALLERY';
  display: block;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--primary-color);
  opacity: 0.5;
  margin-bottom: 8px;
}

.model-modal-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  gap: 6px;
}

.model-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(62, 192, 73, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.65;
  display: block;
}

.model-thumb:hover {
  opacity: 1;
  border-color: var(--primary-color);
  transform: scale(1.06);
}

.model-thumb.active {
  opacity: 1;
  border-color: var(--primary-color);
  box-shadow: 0 0 12px rgba(62, 192, 73, 0.5);
}

/* Футер модалки */
.model-modal-footer {
  padding: 14px 20px;
  background: rgba(0, 31, 9, 0.4);
  border-top: 1px solid rgba(62, 192, 73, 0.15);
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.model-modal-footer .btn-primary {
  width: 100%;
  text-align: center;
}

/* Адаптивность */
@media (max-width: 768px) {
  .model-modal-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .model-modal-info {
    border-left: none;
    border-top: 1px solid rgba(62, 192, 73, 0.15);
    max-height: 40vh;
  }
  .model-modal-gallery {
    min-height: 280px;
  }
  .model-modal-box::before,
  .model-modal-box::after { display: none; }
  .model-modal-header h2 { font-size: 16px; }
}

/* ============================================================
   УМНОЕ РЕДАКТИРОВАНИЕ — FEATURE CARD
   ============================================================ */
.smart-edit-preview {
  padding: 20px;
  background: rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  width: auto;
  height: auto;
}

.smart-edit-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.edit-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  transition: all 0.4s ease;
  min-width: 90px;
  opacity: 0.5;
}

.edit-step.active {
  border-color: var(--primary-color);
  background: rgba(62,192,73,0.08);
  box-shadow: 0 0 20px rgba(62,192,73,0.2);
  opacity: 1;
  transform: scale(1.07);
}

.edit-icon { font-size: 22px; }

.edit-step span {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}

.edit-arrow {
  font-size: 20px;
  color: var(--primary-color);
  opacity: 0.6;
}

.edit-features-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.edit-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.ef-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gradient);
  flex-shrink: 0;
}


/* ============================================================
   ИСПРАВЛЕНИЕ: canvas как настоящий фон
   ============================================================ */

/* Сам фон — на html, чтобы canvas мог поверх него рендериться */
html, body {
  background: var(--bg-gradient) !important;
}

body {
  background: transparent !important;
}

/* Canvas — фиксирован на весь viewport, под всем контентом */
#canvas-bg {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 0 !important;
  opacity: 0.55;
  pointer-events: none;
}

/* Orbs — за canvas */
.bg-orbs {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: -1 !important;
  overflow: hidden;
  pointer-events: none;
}

/* Радар — еще глубже */
.background-radar { z-index: -2 !important; }

/* Body::before/::after звёздная пыль — еще глубже */
body::before, body::after { z-index: -3 !important; }

/* Модалки и оверлеи остаются position: fixed (как в их собственных стилях) — только z-index */
.header { z-index: 1000 !important; }
.modal { z-index: 1500 !important; }
.modal-overlay { z-index: 1499 !important; }
.notifications-modal { z-index: 1600 !important; }
.model-modal-overlay { z-index: 2000 !important; }
.cookie-modal { z-index: 10000 !important; }
#page-loader { z-index: 9998 !important; }

/* ============================================================
   УСИЛЕННЫЙ "НЕЙРОСЕТЕВОЙ" ДИЗАЙН
   ============================================================ */

/* --- Эффект печатания для подзаголовка --- */
.subtitle.typing-effect .subtitle-typing-target::after {
  content: '|';
  display: inline-block;
  margin-left: 2px;
  color: var(--primary-color);
  font-weight: 400;
  animation: blink-caret 0.8s step-end infinite;
}

@keyframes blink-caret {
  from, to { opacity: 0; }
  50%      { opacity: 1; }
}

/* --- Glitch-эффект для главного заголовка --- */
.main-title {
  position: relative;
  letter-spacing: -1px;
  text-shadow: 0 0 30px rgba(62, 192, 73, 0.3);
}

.main-title::before,
.main-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  pointer-events: none;
}

.main-title::before {
  left: 2px;
  text-shadow: -1px 0 var(--secondary-color);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  animation: glitch-1 4s infinite linear alternate-reverse;
  opacity: 0.6;
}

.main-title::after {
  left: -2px;
  text-shadow: 1px 0 var(--primary-color);
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  animation: glitch-2 5s infinite linear alternate-reverse;
  opacity: 0.6;
}

@keyframes glitch-1 {
  0%, 92%, 100% { transform: translate(0); opacity: 0; }
  93%           { transform: translate(-2px, 1px); opacity: 0.8; }
  94%           { transform: translate(2px, -1px); opacity: 0.8; }
  95%           { transform: translate(-1px, 2px); opacity: 0.8; }
  96%           { transform: translate(1px, -2px); opacity: 0.8; }
  97%           { transform: translate(0); opacity: 0; }
}

@keyframes glitch-2 {
  0%, 88%, 100% { transform: translate(0); opacity: 0; }
  89%           { transform: translate(2px, -1px); opacity: 0.8; }
  90%           { transform: translate(-2px, 1px); opacity: 0.8; }
  91%           { transform: translate(1px, -2px); opacity: 0.8; }
  92%           { transform: translate(-1px, 2px); opacity: 0.8; }
  93%           { transform: translate(0); opacity: 0; }
}



/* --- Меню в шапке: подчеркивание точкой как в demo_port --- */
.main-menu a {
  position: relative;
  padding: 4px 2px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.main-menu a::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--primary-color);
  opacity: 0;
  transition: opacity 0.3s, width 0.3s;
}

.main-menu a:hover::before {
  opacity: 1;
  width: 24px;
  border-radius: 4px;
  box-shadow: 0 0 10px var(--primary-color);
}

/* Логотип — пульсирующее свечение */
.logo {
  position: relative;
  text-shadow: 0 0 20px rgba(201, 201, 201, 0.4);
  animation: logo-pulse 4s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%, 100% { text-shadow: 0 0 20px rgba(162, 162, 162, 0.3); }
  50%      { text-shadow: 0 0 30px rgba(111, 111, 111, 0.6),
                          0 0 50px rgba(57, 57, 57, 0.3); }
}

/* --- Кнопки в стиле demo_port (с свечением) --- */
.btn-primary {
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 14px;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent);
  transition: left 0.6s ease;
}

.btn-primary:hover::before { left: 100%; }

.btn-primary:hover {
  box-shadow: 0 10px 30px rgba(64, 64, 64, 0.5),
              0 0 60px rgba(83, 83, 83, 0.3);
  transform: translateY(-3px);
}

/* --- Карточки моделей: стиль как у feature-card --- */
.generations-grid .model-card {
  position: relative;
  background: var(--season-bg-dark) !important;
  backdrop-filter: blur(12px);
  border: 1px solid var(--season-primary) !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Угловые "скобки" по углам — как у feature-card */
.generations-grid .model-card::before,
.generations-grid .model-card::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border-color: var(--primary-color);
  border-style: solid;
  opacity: 0.6;
  transition: opacity 0.3s, width 0.3s, height 0.3s;
  pointer-events: none;
}

.generations-grid .model-card::before {
  top: 8px; left: 8px;
  border-width: 2px 0 0 2px;
  border-radius: 4px 0 0 0;
}

.generations-grid .model-card::after {
  bottom: 8px; right: 8px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 4px 0;
}

.generations-grid .model-card:hover::before,
.generations-grid .model-card:hover::after {
  opacity: 1;
  width: 30px; height: 30px;
}

/* --- Feature cards: технологичные --- */
.feature-card {
  position: relative;
  background: var(--season-bg-dark) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(141, 141, 141, 0.25) !important;
  transition: all 0.4s ease;
}

.feature-card:hover {
  border-color: var(--primary-color) !important;
  box-shadow: 0 20px 40px var(--season-bg-darker),
              0 0 30px var(--season-orb1);
}

/* "Скобки" по углам feature-card */
.feature-card::before,
.feature-card::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border-color: var(--primary-color);
  border-style: solid;
  opacity: 0.6;
  transition: opacity 0.3s, width 0.3s, height 0.3s;
}

.feature-card::before {
  top: 8px; left: 8px;
  border-width: 2px 0 0 2px;
  border-radius: 4px 0 0 0;
}

.feature-card::after {
  bottom: 8px; right: 8px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 4px 0;
}

.feature-card:hover::before,
.feature-card:hover::after {
  opacity: 1;
  width: 30px; height: 30px;
}

/* --- Заголовки секций — с префиксом --- */
.discover-title::before,
.features-section .section-title::before {
  content: '// ';
  font-family: 'Courier New', monospace;
  opacity: 0.5;
  -webkit-text-fill-color: var(--primary-color);
}

/* --- Скиллы с моноширным шрифтом для подписей --- */
.discover-section,
.features-section {
  position: relative;
}

.discover-section::before,
.features-section::before {
  content: 'SECTION';
  position: absolute;
  top: 20px;
  right: 40px;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--primary-color);
  opacity: 0.3;
}

/* --- Адаптивность для угловых эффектов --- */
@media (max-width: 768px) {
  .discover-section::before,
  .features-section::before { display: none; }

  .main-title::before,
  .main-title::after { display: none; }
}


/* ============================================================
   ШИРОКИЕ ЭКРАНЫ — расширения секций
   ============================================================ */

/* "Последние генерации" — на 30% шире на широких экранах */
@media (min-width: 1400px) {
  .wrap {
    width: 130%;
    margin-left: -15%;
    margin-right: -15%;
  }
}

/* "Модели" — на широких экранах увеличиваем размер карточек */
@media (min-width: 1920px) {
  .discover-section {
    max-width: 100%;
    padding: 0;
  }
  .generations-grid .model-card {
    width: 540px !important;
    max-width: 540px !important;
  }
  .generations-grid .model-image-container {
    height: 400px;
  }
}

/* ============================================================
   КАРТОЧКИ МОДЕЛЕЙ — убираем оверлей "Подробнее"
   ============================================================ */
.model-card-overlay { display: none !important; }

/* ============================================================
   FEATURE GRID — центрирование "Умного редактирования"
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: var(--padding-medium);
  max-width: 1100px;
  margin: 0 auto;
}

/* Третья карточка занимает всю ширину и центрируется */
.features-grid .feature-card:nth-child(3) {
  grid-column: 1 / -1;
  max-width: 540px;
  justify-self: center;
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr !important;
  }
  .features-grid .feature-card:nth-child(3) {
    grid-column: auto;
    max-width: 100%;
  }
}

/* ============================================================
   ПЛАВАЮЩАЯ РАМКА для главного изображения (стиль demo_port)
   ============================================================ */
.right-image-container {
  position: relative;
  flex-shrink: 0;
  width: 500px;
  height: 500px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.x-ray-effect {
  position: relative;
  width: 100%;
  background: linear-gradient(45deg, var(--season-primary), var(--season-secondary));
  animation: morph 8s ease-in-out infinite;
  box-shadow: 0 0 60px var(--season-secondary),
              0 0 120px var(--season-bg-dark);
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.x-ray-effect::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, var(--season-primary), var(--season-secondary));
  animation: morph 8s ease-in-out infinite;
  z-index: -1;
  filter: blur(20px);
  opacity: 0.5;
}

.x-ray-effect .right-image,
.x-ray-effect img.right-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  background-color: var(--bg-darker);
  /* Плавно следует за морфингом контейнера */
  animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
  0%   { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50%  { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

@media (max-width: 1024px) {
  .right-image-container { width: 340px; height: 340px; }
}

@media (max-width: 768px) {
  .right-image-container { width: 280px; height: 280px; margin: 0 auto; }
}


/* ============================================================
   ГОРИЗОНТАЛЬНЫЙ СКРОЛЛ МОДЕЛЕЙ — оптимизация
   ============================================================ */
.horizontal-scroll-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 20px 40px;
  margin: 0 -40px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) transparent;
}

.horizontal-scroll-wrapper::-webkit-scrollbar {
  height: 6px;
  background: rgba(255,255,255,0.04);
}

.horizontal-scroll-wrapper::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 3px;
  opacity: 0.6;
}

.horizontal-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* Делаем карточки не растягивающимися и не вылезающими */
.generations-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
  padding: 0;
  margin: 0;
  width: max-content;
  flex-direction: row;
  align-items: stretch;
}

/* На мобильных — карточки поменьше */
@media (max-width: 768px) {
  .generations-grid .model-card {
    width: 280px !important;
    max-width: 280px !important;
  }
  .generations-grid .model-image-container {
    height: 220px !important;
  }
  .horizontal-scroll-wrapper {
    padding: 20px;
    margin: 0 -20px;
  }
}

@media (max-width: 480px) {
  .generations-grid .model-card {
    width: 240px !important;
    max-width: 240px !important;
  }
  .generations-grid .model-image-container {
    height: 200px !important;
  }
}

/* Подсказка о скролле снизу */
.discover-section {
  position: relative;
}

.scroll-hint {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--primary-color);
  opacity: 0.5;
  text-transform: uppercase;
}

.scroll-hint .arrow {
  display: inline-block;
  animation: scroll-bounce 1.5s ease-in-out infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(6px); }
}


/* ============================================================
   ФИКС ОБРЕЗКИ МОДЕЛЕЙ В ГОРИЗОНТАЛЬНОМ СКРОЛЛЕ
   ============================================================ */

/* Контейнер discover-section — НЕ ограничиваем ширину родителем */
.discover-section {
  width: 100%;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 60px 0 !important;
  overflow: hidden; /* Прячем то что вылезает наружу */
  box-sizing: border-box;
}

/* Заголовок и подсказка центрируются с обычным паддингом */
.discover-title,
.scroll-hint {
  padding: 0 var(--padding-large);
  box-sizing: border-box;
}

/* Сам скролл-контейнер занимает всю ширину viewport */
.horizontal-scroll-wrapper {
  width: 100%;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  display: block !important;
  padding: 20px var(--padding-large) !important;
  margin: 0 !important;
  box-sizing: border-box;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) transparent;
}

/* Сетка внутри — ровно flex-row без всяких центрирований */
.generations-grid {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 24px !important;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
  min-width: max-content !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
}

/* Карточки — фиксированная ширина, не сжимаемые */
.generations-grid .model-card {
  flex: 0 0 auto !important;
}

/* Адаптация padding для разных экранов */
@media (max-width: 1024px) {
  .horizontal-scroll-wrapper {
    padding: 20px 40px !important;
  }
  .discover-title,
  .scroll-hint {
    padding: 0 40px;
  }
}

@media (max-width: 768px) {
  .horizontal-scroll-wrapper {
    padding: 20px !important;
  }
  .discover-title,
  .scroll-hint {
    padding: 0 20px;
  }
  .generations-grid .model-card {
    width: 280px !important;
    max-width: 280px !important;
  }
  .generations-grid .model-image-container {
    height: 220px !important;
  }
}

@media (max-width: 480px) {
  .generations-grid .model-card {
    width: 240px !important;
    max-width: 240px !important;
  }
  .generations-grid .model-image-container {
    height: 200px !important;
  }
}


/* ============================================================
   ПОСЛЕДНИЕ ГЕНЕРАЦИИ — стилизация под общий нейро-стиль
   ============================================================ */

/* Заголовок секции "Последние генерации" */
.wrap > p {
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 13px !important;
  color: var(--primary-color) !important;
  opacity: 0.7;
  margin-bottom: 25px;
  position: relative;
}

.wrap > p::before {
  content: '// ';
  -webkit-text-fill-color: var(--primary-color);
  opacity: 0.7;
}

.wrap > p i { font-style: normal; }

/* Контейнер бегущей строки */
.items-wrap {
  position: relative;
  border: 1px solid var(--season-primary);
  border-radius: 12px;
  background: var(--season-bg-dark);
  backdrop-filter: blur(10px);
  padding: 16px 0;
  overflow: hidden;
}

/* Угловые "скобки" по углам */
.items-wrap::before,
.items-wrap::after {
  content: '' !important;
  position: absolute;
  width: 18px !important;
  height: 18px !important;
  background: transparent !important;
  border-color: var(--primary-color);
  border-style: solid;
  opacity: 0.6;
  z-index: 5;
  border-radius: 0 !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
}

.items-wrap::before {
  top: 6px !important;
  left: 6px !important;
  border-width: 2px 0 0 2px !important;
  border-radius: 4px 0 0 0 !important;
}

.items-wrap::after {
  bottom: 6px !important;
  right: 6px !important;
  border-width: 0 2px 2px 0 !important;
  border-radius: 0 0 4px 0 !important;
}

/* Боковые fade-маски */
.items-wrap > .fade-mask-left,
.items-wrap > .fade-mask-right {
  position: absolute;
  top: 0;
  width: 80px;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.items-wrap > .fade-mask-left {
  left: 0;
  background: linear-gradient(90deg, var(--season-bg-dark) 0%, transparent 100%);
}

.items-wrap > .fade-mask-right {
  right: 0;
  background: linear-gradient(270deg, var(--season-bg-dark) 0%, transparent 100%);
}

/* Сами элементы */
.item {
  width: 160px !important;
  height: 220px !important;
  border-radius: 10px !important;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--season-secondary);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  cursor: pointer;
  margin: 0 !important;
}

/* Свечение на ховер */
.item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 8px 24px rgba(62, 192, 73, 0.25);
  transform: translateY(-3px);
  z-index: 4;
}

/* Зелёный сканирующий эффект на ховере */
.item::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(62, 192, 73, 0.2),
    transparent);
  pointer-events: none;
  transition: left 0.6s ease;
  z-index: 2;
}

.item:hover::after { left: 100%; }

/* Лейбл с именем пользователя */
.item .user-name {
  position: absolute !important;
  bottom: 6px;
  left: 6px;
  right: 6px;
  font-family: 'Courier New', monospace !important;
  font-size: 10px !important;
  letter-spacing: 0.5px;
  background: var(--season-bg-dark) !important;
  color: var(--primary-color) !important;
  border: 1px solid var(--season-primary) !important;
  border-radius: 4px !important;
  padding: 4px 8px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 3;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

/* Удаляем старый items-wrap:before/:after с фиолетовым градиентом */
.items-wrap:before,
.items-wrap:after {
  height: 18px;
  width: 18px;
}

/* На мобильных — карточки поменьше */
@media (max-width: 768px) {
  .item {
    width: 120px !important;
    height: 170px !important;
  }
  .item .user-name {
    font-size: 9px !important;
    padding: 3px 5px;
  }
  .items-wrap > .fade-mask-left,
  .items-wrap > .fade-mask-right {
    width: 40px;
  }
  .wrap > p {
    font-size: 11px !important;
    letter-spacing: 1.5px;
  }
}

@media (max-width: 480px) {
  .item {
    width: 100px !important;
    height: 140px !important;
  }
}

/* ============================================================
   КОМПЛЕКСНАЯ МОБИЛЬНАЯ АДАПТАЦИЯ
   ============================================================ */

/* === Планшеты (1024px и ниже) === */
@media (max-width: 1024px) {
  /* Hero — изображение и текст центрируем */
  .content-wrapper {
    flex-direction: column !important;
    align-items: center !important;
    gap: 30px !important;
    padding: 0 30px !important;
  }
  
  .content {
    max-width: 100% !important;
    text-align: center;
  }
  
  /* Главное изображение */
  .right-image-container {
    width: 340px !important;
    height: 340px !important;
    margin: 0 auto !important;
    order: -1; /* Сверху на планшетах */
  }
  
  /* Заголовок поменьше */
  .main-title {
    font-size: 38px !important;
  }
  
  /* Шапка */
  .header {
    padding: 15px 30px !important;
  }
  
  /* Padding секций уменьшается */
  .features-section {
    padding: 60px 30px !important;
  }
}

/* === Мобильные (768px и ниже) === */
@media (max-width: 768px) {
  /* Скрываем угловые скобки на мобилках для чистоты */
  .feature-card::before,
  .feature-card::after,
  .generations-grid .model-card::before,
  .generations-grid .model-card::after,
  .items-wrap::before,
  .items-wrap::after {
    display: none !important;
  }

  /* Шапка */
  .header {
    padding: 12px 20px !important;
    height: auto;
    min-height: 60px;
  }
  
  .logo {
    font-size: 22px !important;
  }
  
  .logo:hover {
    font-size: 22px !important; /* убираем эффект увеличения на мобиле */
  }
  
  /* Главное изображение */
  .right-image-container {
    width: 240px !important;
    height: 240px !important;
  }
  
  /* Контент */
  .content-wrapper {
    padding: 0 16px !important;
    gap: 20px !important;
  }
    
  /* Hero text */
  .main-title {
    font-size: 28px !important;
    line-height: 1.2;
    margin-bottom: 15px !important;
  }
  
  .subtitle, .subtitle-typed {
    font-size: 16px !important;
    line-height: 1.5 !important;
    padding: 0 5px;
  }
  
  /* Кнопки */
  .buttons {
    margin-top: 20px !important;
  }
  
  .btn-primary, .btn-secondary {
    padding: 14px 24px !important;
    font-size: 14px !important;
    width: auto;
    text-align: center;
  }
  
  /* Заголовки секций */
  h2, .discover-title, .features-section .section-title {
    font-size: 24px !important;
    margin-top: 30px !important;
    margin-bottom: 20px !important;
  }
  
  /* Wrap (последние генерации) */
  .wrap {
    padding: 30px 0 !important;
  }
  
  /* Discover section */
  .discover-section {
    margin: 30px 0 !important;
  }
  
  /* Features section */
  .features-section {
    padding: 40px 16px !important;
  }
  
  .features-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .feature-card {
    border-radius: 12px;
  }
  
  /* Smart-edit demo на узких — вертикально */
  .smart-edit-demo {
    flex-direction: column !important;
    gap: 6px !important;
  }
  
  .smart-edit-demo .edit-arrow {
    transform: rotate(90deg);
  }
  
  .edit-step {
    width: 100%;
    flex-direction: row !important;
    justify-content: flex-start !important;
    padding: 10px 14px !important;
    min-width: auto !important;
  }
  
  .edit-step .edit-icon {
    margin-right: 10px;
  }
  
  .edit-step span {
    font-size: 13px !important;
    text-align: left !important;
  }
  
  /* Footer */
  .footer {
    padding: 40px 16px !important;
  }
  
  .footer-title {
    font-size: 18px !important;
    line-height: 1.4 !important;
  }
  
  /* Auth-modal */
  .auth-modal-redesign {
    max-width: 90vw !important;
    margin: 0 auto;
  }
  
  /* Модалка */
  .modal-content {
    width: 92% !important;
    max-width: 92% !important;
  }
    
  /* Cookie modal */
  .cookie-modal {
    max-width: calc(100vw - 30px) !important;
    bottom: 15px !important;
  }
  
  /* Page-loader */
  .page-loader {
    background: rgba(5, 15, 6, 0.95);
  }
  
  /* SECTION метка скрыта */
  .discover-section::before,
  .features-section::before {
    display: none !important;
  }
  
}

/* === Маленькие мобильные (480px и ниже) === */
@media (max-width: 480px) {
  .header {
    padding: 10px 14px !important;
  }
  
  .logo {
    font-size: 18px !important;
  }
  
  .right-image-container {
    width: 200px !important;
    height: 200px !important;
  }
  
  .main-title {
    font-size: 22px !important;
  }
  
  .subtitle, .subtitle-typed {
    font-size: 14px !important;
  }
  
  /* Скобки и угловые маркеры скрываем */
  .auth-modal-redesign::before,
  .auth-modal-redesign::after,
  .model-modal-box::before,
  .model-modal-box::after {
    display: none !important;
  }
  
  /* Заголовки */
  .discover-title, .features-section .section-title {
    font-size: 20px !important;
  }
  
  /* Уведомления полностью на экран */
  .notifications-modal {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
  }
}

/* === Очень маленькие (375px и ниже) === */
@media (max-width: 375px) {
  .right-image-container {
    width: 180px !important;
    height: 180px !important;
  }
  
  .main-title {
    font-size: 20px !important;
  }
  
  .footer-title {
    font-size: 16px !important;
  }
  
  .footer-social {
    gap: 10px !important;
  }
  
  .social-link {
    padding: 10px 14px !important;
    font-size: 13px;
  }
}

/* === Ландшафтная ориентация на мобильных === */
@media (max-height: 500px) and (orientation: landscape) {
  .header {
    padding: 6px 20px !important;
  }
    
  .right-image-container {
    width: 180px !important;
    height: 180px !important;
  }
  
  .main-title {
    font-size: 24px !important;
    margin-bottom: 10px !important;
  }
  
  .subtitle, .subtitle-typed {
    font-size: 14px !important;
  }
  
  .content-wrapper {
    flex-direction: row !important;
    align-items: center !important;
  }
}


/* ============================================================
   ============================================================
   НОВОСТИ — кибернетическая обводка в стиле feature-card
   ============================================================
   ============================================================ */

/* Заголовок страницы новостей */
.news-title {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(62, 192, 73, 0.3);
  letter-spacing: -0.5px;
}

.news-title::before {
  content: '// ';
  font-family: 'Courier New', monospace;
  -webkit-text-fill-color: var(--primary-color);
  opacity: 0.5;
}

.news-subtitle {
  font-family: 'Courier New', monospace;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 13px !important;
  color: var(--text-muted) !important;
  opacity: 0.85;
}

/* Карточки новостей — нейро-стиль */
.news-article {
  position: relative;
  background: var(--season-bg-dark) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid var(--season-secondary) !important;
  border-radius: 14px !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease !important;
  overflow: hidden;
}

/* Угловые "скобки" по углам — как у feature-card */
.news-article::before,
.news-article::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--primary-color);
  border-style: solid;
  opacity: 0.55;
  transition: opacity 0.3s, width 0.3s, height 0.3s;
  pointer-events: none;
  z-index: 3;
  background: transparent !important;
  border-radius: 0;
  inset: auto;
}

.news-article::before {
  top: 8px;
  left: 8px;
  border-width: 2px 0 0 2px !important;
  border-radius: 4px 0 0 0 !important;
  /* Убираем возможный градиент сверху */
  background: transparent !important;
}

.news-article::after {
  bottom: 8px;
  right: 8px;
  border-width: 0 2px 2px 0 !important;
  border-radius: 0 0 4px 0 !important;
  background: transparent !important;
}

.news-article:hover {
  border-color: var(--primary-color) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
              0 0 30px var(--season-bg-dark) !important;
  transform: translateY(-3px) !important;
}

.news-article:hover::before,
.news-article:hover::after {
  opacity: 1;
  width: 32px;
  height: 32px;
}

/* Сканирующий эффект на ховер */
.news-article {
  isolation: isolate; /* для корректной работы scan эффекта */
}

.news-article > .scan-overlay,
.news-article::after {
  pointer-events: none;
}

/* Дата — моноширинный лейбл */
.news-date {
  font-family: 'Courier New', monospace !important;
  font-size: 12px !important;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary-color) !important;
  background: var(--season-bg-darker);
  border: 1px solid var(--season-secondary);
  border-radius: 4px !important;
  display: inline-block;
  width: fit-content;
  margin-bottom: 14px !important;
  position: relative;
  z-index: 2;
}

.news-date b {
  font-weight: 700;
}

.news-date::before {
  content: '◆ ';
  color: var(--primary-color);
  margin-right: 4px;
  opacity: 0.7;
}

/* Заголовок статьи */
.news-article-title {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700 !important;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 2;
}

/* Подчеркивание заголовка */
.news-article-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  height: 2px;
  width: 40px;
  background: var(--gradient);
  border-radius: 2px;
  opacity: 0.6;
  transition: width 0.3s ease;
}

.news-article:hover .news-article-title::after {
  width: 80px;
}

/* Контейнер изображения */
.news-image-container {
  border-radius: 10px !important;
  border: 1px solid var(--season-primary) !important;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.news-image {
  transition: transform 0.5s ease !important;
}

.news-article:hover .news-image {
  transform: scale(1.04) !important;
}

/* Текст новости */
.news-text {
  position: relative;
  z-index: 2;
}

.news-text p {
  position: relative;
  padding-left: 18px !important;
  color: var(--text-secondary) !important;
  line-height: 1.7;
}

.news-text p::before {
  content: '▸';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary-color);
  opacity: 0.7;
}

.news-text i {
  display: block;
  padding-left: 18px;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.95em;
  border-left: 2px solid var(--season-secondary);
  margin: 6px 0;
  padding: 4px 0 4px 14px;
}

/* Контент */
.news-content {
  position: relative;
  z-index: 2;
}

/* На мобильных — компактнее */
@media (max-width: 768px) {
  .news-article::before,
  .news-article::after {
    width: 16px;
    height: 16px;
    top: 6px;
    left: 6px;
  }
  .news-article::after {
    bottom: 6px;
    right: 6px;
    top: auto;
    left: auto;
  }
  
  .news-date {
    font-size: 11px !important;
  }
}

@media (max-width: 480px) {
  .news-article::before,
  .news-article::after {
    display: none;
  }
}


/* ФИКС ХУЙНИ НА ТЕЛЕФОНАЗ */
html {
  background-color: var(--bg-darker);  /* solid подложка */
  background-image: var(--bg-gradient);
  color-scheme: dark;                   /* тёмный overscroll/scrollbar */
}

body {
  background-color: var(--bg-darker);  /* такая же подложка на body */
  background-image: var(--bg-gradient);
  min-height: 100vh;                    /* чтобы body всегда покрывал viewport */
  /* НЕТ background-attachment: fixed на мобильных */
}

@media (hover: hover) and (pointer: fine) {
  html, body {
    background-attachment: fixed;  /* возвращаем только для десктопа */
  }
}

@media (max-width: 768px) {
#canvas-bg {
display: none;
animation: none;
}
}