
/* --- ВЕСНА (активна) --- */
:root {
  --season-primary:   #3ec049;
  --season-secondary: #30edae;
  --season-primary-rgb:   62, 192, 73;
  --season-secondary-rgb: 48, 237, 174;
  --season-orb1:      #2dba3c;
  --season-orb2:      #00e5aa;
  --season-orb3:      #b8ff6e;
  --season-bg-dark:   #0e180d;
  --season-bg-darker: #050f06;
  --season-bg-extra:  #042701;
}

/* --- ЛЕТО ---*/
/* :root {
  --season-primary:   #bf00ff;
  --season-secondary: #7b00ff;
  --season-primary-rgb:   191, 0, 255;
  --season-secondary-rgb: 123, 0, 255;
  --season-orb1:      #bf00ff;
  --season-orb2:      #6600cc;
  --season-orb3:      #ff66ff;
  --season-bg-dark:   #120018;
  --season-bg-darker: #07000d;
  --season-bg-extra:  #1a0028;
} */


/* --- ОСЕНЬ ---
:root {
  --season-primary:   #e05520;
  --season-secondary: #ffb347;
  --season-primary-rgb:   224, 85, 32;
  --season-secondary-rgb: 255, 179, 71;
  --season-orb1:      #cc3300;
  --season-orb2:      #ff6600;
  --season-orb3:      #ffcc00;
  --season-bg-dark:   #180a00;
  --season-bg-darker: #0d0500;
  --season-bg-extra:  #270e00;
}
*/

/* --- ЗИМА ---*/
/* :root {
  --season-primary:   #3081ed;
  --season-secondary: #45f3ff;
  --season-primary-rgb:   48, 129, 237;
  --season-secondary-rgb: 69, 243, 255;
  --season-orb1:      #0066cc;
  --season-orb2:      #00ccff;
  --season-orb3:      #99eeff;
  --season-bg-dark:   #050d18;
  --season-bg-darker: #020810;
  --season-bg-extra:  #001a2c;
} */


/* ============================================================
   ПРОИЗВОДНЫЕ ПЕРЕМЕННЫЕ — на основе сезонных
   ============================================================ */
:root {
  --primary-color:    var(--season-primary);
  --secondary-color:  var(--season-secondary);
  --primary-rgb:      var(--season-primary-rgb);
  --secondary-rgb:    var(--season-secondary-rgb);
  --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-extra:         var(--season-bg-extra);
  --bg-gradient:      linear-gradient(135deg, var(--season-bg-dark), var(--season-bg-darker), var(--season-bg-extra));

  --bg-card:          rgba(255, 255, 255, 0.05);
  --bg-card-hover:    rgba(255, 255, 255, 0.1);
  --bg-features:      rgba(0, 0, 0, 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, var(--primary-color), var(--secondary-color));
  --shadow-primary:   0 10px 20px rgba(var(--primary-rgb), 0.3);
  --shadow-card:      0 10px 25px rgba(var(--primary-rgb), 0.2);
  --shadow-card-gold: 0 10px 25px rgba(var(--secondary-rgb), 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);
}



/* ============================================================================
   БАЗОВЫЕ СТИЛИ СТРАНИЦЫ LORA
   ============================================================================ */

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(var(--primary-rgb), 0.05) 0%, transparent 70%),
              repeating-radial-gradient(circle, rgba(var(--primary-rgb), 0.05), rgba(var(--primary-rgb), 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;
}

.logo {
  font-size: 32px;
  font-weight: bold;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

/* Стили скроллбара */
::-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;
}

.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;
}

.main-menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s ease;
}

.main-menu a:hover::after {
  width: 100%;
}

.main-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-bottom: 100px;
  min-height: calc(100vh - 100px);
  margin-top: calc(var(--header-height) + 20px);
}

.gallery-header {
  text-align: center;
  margin-bottom: 40px;
}

.gallery-header h1 {
  font-size: 2.5rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gallery-controls {
  max-width: 800px;
  margin: 0 auto;
}

.gallery-item-placeholder {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #2a2a40, #1a1a2e);
  border-radius: 8px;
  overflow: hidden;
}

.gallery-item-placeholder::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.gallery-image.loading,
.gallery-video.loading {
  opacity: 0;
  position: absolute;
}

.gallery-image.loaded,
.gallery-video.loaded {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.gallery-image.loading {
  opacity: 0;
  position: absolute;
}

.gallery-image.loaded {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.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;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.filter-btn, .userhideandfav{
  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;
}

.gallery-grid {
  margin: 0 auto;
  max-width: 1400px; /* Ограничьте ширину контейнера */
  position: relative; /* Для корректной работы Masonry */
}

.lora-grid {
  margin: 0 auto;
  max-width: 1400px; /* Ограничьте ширину контейнера */
  position: relative; /* Для корректной работы Masonry */
}

.gallery-item {
  width: 18%; /* Можно оставить процентное значение */
  margin-bottom: 20px; /* Отступ между элементами */
  box-sizing: border-box;
  position: relative;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Сохраняет пропорции изображения */
  border-radius: 8px;
  transition: none;
  cursor: pointer;
}

.gallery-item:hover .gallery-video {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(var(--primary-rgb), 0.3);
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* Адаптивные стили */
@media (max-width: 1024px) {
  .gallery-item {
    width: 25%; /* 4 колонки */
  }
}

@media (max-width: 768px) {
  .gallery-item {
    width: 33.33%; /* 3 колонки */
  }
}

@media (max-width: 480px) {
  .gallery-item {
    width: 100%; /* 1 колонка */
  }
}

.fullscreen-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 2000;
  overflow-y: auto;
  justify-content: center;
  align-items: center;
  display: flex;
}

.fullscreen-loader .loader {
  width: 50px;
  height: 50px;
  justify-content: center;
  align-items: center;
  display: flex;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

/* Стили для кнопки "Наверх" */
.scroll-top-button {
  position: fixed;
  bottom: 90px; /* Располагаем выше кнопки помощи */
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  z-index: 998;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

.scroll-top-button.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}


@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


.post-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(2px);
  border: none;
  border-radius: 10px;
}

.gallery-item:hover .post-overlay {
  opacity: 1;
}

/* Стили для контейнера с информацией о пользователе */
.user-info-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-username {
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.post-boosts {
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #FFD700; /* Золотой цвет для бустов */
  background: rgba(255, 217, 0, 0.125);
  padding: 4px 8px;
  border-radius: 12px;
}

.post-boosts::before {
  font-size: 14px;
  margin-right: 2px;
}

/* Стили для кнопки меню */
.post-menu-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 20px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.post-menu-toggle:hover {
  background: var(--primary-color);
  opacity: 1;
  transform: scale(1.1);
}

/* Контекстное меню */
.post-context-menu {
  position: absolute;
  top: 100%; /* Change from top: -100% */
  right: 0; /* Change from right: 50% */
  background: var(--bg-darker);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  display: none;
  z-index: 2000;
  min-width: 160px;
  transform: none; /* Remove transform: translateX(50%) */
}

.post-context-menu button {
  display: block;
  width: 100%;
  padding: 10px 20px;
  text-align: left;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.post-context-menu button:hover {
  background: var(--bg-card-hover);
  color: var(--primary-color);
}


.hidden-users-list input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-color);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.hidden-users-list input[type="checkbox"]:checked {
  background: var(--gradient);
  border-color: transparent;
}

.hidden-users-list input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  color: white;
  font-weight: bold;
}

.hidden-users-list input[type="checkbox"]:hover {
  border-color: var(--secondary-color);
}

.hidden-users-list input[type="checkbox"]:focus {
  box-shadow: 0 0 8px rgba(var(--primary-rgb), 0.5);
}

/* Модальное окно избранных пользователей */
.favorite-users-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

.favorite-users-container {
  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;
}

.favorite-users-content {
  color: var(--text-primary);
}

.favorite-users-content h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

.favorite-users-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  max-height: 400px;
  overflow-y: auto;
}

.favorite-users-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-small);
  transition: var(--transition);
}

.favorite-users-list li:hover {
  background: rgba(255, 255, 255, 0.1);
}

.favorite-users-list img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 15px;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

.favorite-users-list span {
  flex-grow: 1;
  font-size: 14px;
}

.remove-favorite {
  background: #ff4757;
  color: white;
  border: none;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  cursor: pointer;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.favorite-users-header {
  padding: 10px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
}

.favorite-posts-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.favorite-posts-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.favorite-posts-toggle span {
  font-size: 14px;
  color: var(--text-primary);
}

.user-profile-link {
  color: inherit;
  text-decoration: none;
  font-weight: bold;
}

.favorite-user-item {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-grow: 1; /* Добавлено */
}

.remove-favorite:hover {
  background: #ff6b81;
  transform: scale(1.1);
}

#show-favorite-posts {
  background: var(--gradient);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: var(--border-radius-small);
  cursor: pointer;
  font-weight: bold;
  width: 100%;
  margin-top: 20px;
  transition: var(--transition);
}

#show-favorite-posts:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary);
}

/* Добавим в stylesGallery.css */

.empty-message, .error-message {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
}

.empty-message::before {
  content: "😕";
  font-size: 24px;
  display: block;
  margin-bottom: 10px;
}

.error-message::before {
  content: "⚠️";
  font-size: 24px;
  display: block;
  margin-bottom: 10px;
}

.favorite-users-list img, .hidden-users-list img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
  background: var(--bg-card);
}

.hidden-users-container {
  max-width: 600px;
  width: 95%;
  background: var(--bg-dark);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin: 5% auto;
  border: 1px solid var(--border-color);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.hidden-users-content {
  padding: var(--padding-medium);
}

.hidden-users-list {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: var(--padding-medium);
  padding: 0;
}

.hidden-users-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--padding-small) 0;
  border-bottom: 1px solid var(--border-color);
}

.hidden-users-list img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

#show-selected-posts {
  width: 100%;
  padding: var(--padding-small);
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: var(--border-radius-small);
  font-size: 16px;
  cursor: pointer;
}

#show-selected-posts:hover {
  opacity: 0.9;
}

.hidden-users-content h2{
    font-size: 1.5rem;
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
  }

@media (max-width: 768px) {
  .filter-buttons {
    display: none;
  }
  
  .filter-buttons-mobile {
    display: flex;
    flex-direction: column;
  }
  
  .mobile-only {
    display: block;
  }

  .hidden-users-container{
    width: 80%;
    margin: 50% auto;
  }

  .hidden-users-list{
    list-style: none;
    padding: 0;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
  }

}

@media (max-width: 425px) {
  #show-selected-posts{
    position: relative;
    left: 10%;
  }
}

@media (max-width: 375px) {
  #show-selected-posts{
    position: relative;
    left: 4%;
  }
}

/* Адаптивные стили */
@media (max-width: 768px) {
  .favorite-users-container {
    width: 80%;
    margin: 50% auto;
  }
  
  .favorite-users-list {
    max-height: 300px;
  }
}

@media (max-width: 425px) {
  #show-favorite-posts{
    position: relative;
    left: 13%;
  }
}

@media (max-width: 375px) {
   #show-favorite-posts{
    position: relative;
    left: 8%;
  }
}

/* Кнопка закрытия */
#close-favorite-users {
  position: absolute;
  top: 15px;
  right: 15px;
  color: var(--text-secondary);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  background: none;
  border: none;
}

#close-favorite-users:hover {
  color: var(--primary-color);
}

.gallery-item:hover .post-overlay {
  opacity: 1;
}

.post-username {
  font-weight: bold;
  font-size: 14px;
}

/* Стили для кнопки помощи */
.help-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.help-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.help-dropdown {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 200px;
  background: var(--bg-darker);
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  padding: 15px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  display: none; /* Добавляем это свойство */
}

.help-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  display: block; /* Добавляем это свойство */
}


.help-button:hover .help-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.help-dropdown a {
  display: block;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 0;
  font-size: 14px;
  transition: color 0.3s ease;
}

.help-dropdown a:hover {
  color: var(--primary-color);
}

/* Удалены стили футера */

.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 10px 15px;
  border-radius: 8px;
  background-color: rgba(var(--primary-color-rgb), 0.1);
}

.social-link:hover {
  background-color: rgba(var(--primary-color-rgb), 0.2);
  transform: translateY(-2px);
}

.social-icon {
  width: 20px;
  height: 20px;
}

.legal-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal-link:hover {
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .header {
    padding: 15px 20px;
  }
  
  .main-menu {
    flex-direction: column;
    gap: 10px;
  }
  
  .masonry-gallery {
    columns: 2;
  }
  
}

@media (max-width: 480px) {
  .masonry-gallery {
    columns: 1;
  }
}

/* Модальное окно */
.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 {
  margin-top: 20px;
  width: 100%;
}

.modal .btn-secondary {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 18px 30px;
  cursor: pointer;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  transition: var(--transition);
}

.modal .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
}

#auth-button-container {
  display: flex;
  align-items: center;
}

#auth-button {
  padding: 10px 20px;
  font-size: 16px;
}

/* Стили для модального окна оферты */
.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);
}

/* Адаптивные стили для модального окна */
@media (max-width: 768px) {
  .modal-content {
    margin: 20% auto;
    width: 80%;
  }
  
.close-modal {
    top: 35px;
    right: 30px;
}

  .offer-modal-content {
    padding: 20px;
  }
  
  .modal-image img {
    max-width: 150px;
  }
  
  .offer-text h3 {
    font-size: 1.3em;
  }
  
  .offer-text h4 {
    font-size: 1.1em;
  }
}

/* Адаптивные стили */
@media (max-width: 1024px) {
  .content-wrapper,
  .discover-section,
  .footer {
    padding: 0 var(--padding-medium);
  }
  
  .content-wrapper {
    gap: var(--padding-medium);
  }
  
  .footer-grid {
    gap: var(--padding-medium);
  }
}

/* Стили для отображения бустов */
.post-overlay .user-info-container {
  display: flex;
  align-items: center;
  gap: 8px;
}


/* В модальном окне стили для бустов */
.post-actions .like-btn .icon {
  color: #FFD700;
}

#post-likes-count {
  margin-left: 4px;
  display: flex;
  align-items: center;
}

/* Стили для контейнера чекбоксов */
.rating-checkbox-container {
  margin-left: 15px;
}

.rating-checkbox-group {
  display: flex;
  gap: 15px;
}

/* Кастомные чекбоксы */
.rating-checkbox-label {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 25px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 15px;
}

.rating-checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.rating-checkbox-label:hover input ~ .checkmark {
  background-color: rgba(255, 255, 255, 0.2);
}

.rating-checkbox-label input:checked ~ .checkmark {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.rating-checkbox-label input:checked ~ .checkmark:after {
  display: block;
}

.rating-checkbox-label .checkmark:after {
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Цвета для разных рейтингов */
.rating-checkbox-label[data-rating="safe"] {
  color: #4CAF50;
}

.rating-checkbox-label[data-rating="nsfw"] {
  color: #FF9800;
}

.rating-checkbox-label[data-rating="xxx"] {
  color: #F44336;
}

@media (max-width: 768px) {
  .rating-checkbox-group {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .gallery-controls {
    flex-direction: column;
  }
  
  .rating-selector {
    margin-top: 10px;
    width: 100%;
  }
}

.gallery-video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  aspect-ratio: auto; 
  background-color: #000; 
}

.gallery-video::before {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 24px;
  opacity: 0.8;
  z-index: 1;
  pointer-events: none;
}

.video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 12px;
  z-index: 2;
}

.gallery-video::-webkit-media-controls-volume-slider,
.gallery-video::-webkit-media-controls-mute-button {
  display: none !important;
}

.mobile-only {
  display: none;
}

.filter-buttons-mobile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.filter-buttons-mobile .filter-btn {
  width: 100%;
}

.rating-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-dark);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--primary-color);
  z-index: 3000;
  transition: opacity 0.5s ease;
  display: none;
}

.rating-modal.hidden {
  display: none;
}

.rating-modal-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rating-modal-content h3 {
  color: white;
  margin: 0 0 10px;
}

.rating-modal-content button {
  align-self: flex-end;
  padding: 10px 20px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
}

#rating-filter-btn {
  display: none;
}

/* Адаптивные стили для экрана 1024px */
@media (max-width: 1024px) {
  .gallery-grid {
        max-width: 90%;
        margin: 0 auto;
        margin-left: 9%;
    }

  .lora-grid {
        max-width: 90%;
        margin: 0 auto;
    }

  .gallery-item {
    width: 16.6%; /* 3 колонки вместо 4 */
    margin-bottom: 15px; /* Уменьшаем отступ между элементами */
  }

  .gallery-item img,
  .gallery-item video {
    border-radius: 6px; /* Слегка уменьшаем закругление углов */
  }

  .gallery-item:hover img {
    transform: scale(1.02); /* Уменьшаем эффект масштабирования при наведении */
  }
}

@media (max-width: 768px) {
  /* Общие стили */
  :root {
    --padding-large: 40px;
    --padding-medium: 20px;
    --padding-small: 15px;
  }

  .mobile-only {
    display: inline-block !important;
  }

  .post-overlay {
    opacity: 1 !important; /* Принудительно показываем оверлей */
    padding: 8px; /* Уменьшаем отступы для мобильных */
    background: rgba(0, 0, 0, 0.7); /* Делаем фон немного прозрачнее */
  }
  
  .post-username {
    font-size: 12px; /* Уменьшаем размер текста */
    max-width: 80px; /* Уменьшаем максимальную ширину */
  }
  
  .post-boosts {
    font-size: 11px; /* Уменьшаем размер текста */
    padding: 2px 6px; /* Уменьшаем отступы */
  }
  
  .post-menu-toggle {
    width: 25px; /* Уменьшаем размер кнопки меню */
    height: 25px;
    font-size: 16px;
  }

  /* Показываем кнопку "Фильтр рейтинга" только на мобильных */
  #rating-filter-mobile-btn {
    display: inline-block;
  }

  /* Шапка */
  .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 .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;
  }


  .gallery-grid {
        max-width: 90%;
        margin: 0 auto;
        margin-left: 10%;
    }

  .lora-grid {
        max-width: 90%;
        margin: 0 auto;
    }

  .gallery-item {
    width: 20%; /* 3 колонки вместо 4 */
    margin-bottom: 15px; /* Уменьшаем отступ между элементами */
  }

  .gallery-item img,
  .gallery-item video {
    border-radius: 6px; /* Слегка уменьшаем закругление углов */
  }

  .gallery-item:hover img {
    transform: scale(1.02); /* Уменьшаем эффект масштабирования при наведении */
  }

  .gallery-controls {
    max-width: 600px;
  }

  .filter-btn {
      padding: 4px 16px;
  }

  .mobile-only {
    display: inline-block;
  }

  /* Скрываем обычные кнопки фильтров */
  .filter-buttons {
    display: none;
  }
}



@media (max-width: 425px) {
  .gallery-grid {
    width: 100%; /* Используем 100% вместо max-width */
    margin: 0 auto;
    max-width: 100%;
    margin-left: 5px;
  }

  .lora-grid {
    width: 100%; /* Используем 100% вместо max-width */
    margin: 0 auto;
    max-width: 100%;
  }

  .gallery-item {
    width: 46%; /* 3 колонки вместо 4 */
    margin-bottom: 15px; /* Уменьшаем отступ между элементами */
  }

  .gallery-item img,
  .gallery-item video {
    border-radius: 6px;
    width: 100%;
  }

  .gallery-item:hover img {
    transform: scale(1.02); /* Уменьшаем эффект масштабирования при наведении */
  }

  .gallery-controls {
    max-width: 500px;
  }

  .filter-btn {
    padding: 4px 8px;
    font-size: 14px;
  }

  .gallery-header h1 {
    font-size: 2.0rem;
  }

  /* Общие стили */
  :root {
    --padding-large: 20px;
    --padding-medium: 15px;
    --padding-small: 10px;
    --header-height: 60px;
    --max-width: 100%;
  }

  /* Базовые стили */
  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;
  }

}

/* Бургер-меню */
.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;
  }
  
  /* Или просто через meta-тег динамически (через JS) */
  html {
    width: 1440px; /* Фиксированная ширина, как на ПК */
    margin: 0 auto;
    overflow-x: auto;
    transform: none !important;
  }
  body {
    min-width: 1440px; /* Чтобы контент не сжимался */
  }
}

.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(var(--secondary-rgb), 0.2);
  transform: scale(1.1);
}

.music-control-btn.active {
  color: var(--secondary-color);
  background: rgba(var(--primary-rgb), 0.3);
  box-shadow: 0 0 10px rgba(0, 0, 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); }
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
  .music-control-btn {
    margin-left: 5px;
    width: 35px;
    height: 35px;
    font-size: 20px;
  }
  
  #burger-music-control {
    width: 100%;
    height: auto;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 5px 0;
    font-size: 16px;
  }
}













































/* Дополнительные стили для LoRA галереи */
.lora-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.lora-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card);
}

.lora-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
}

.lora-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lora-item:hover .lora-image {
    transform: scale(1.05);
}

.lora-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 15px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lora-item:hover .lora-overlay {
    opacity: 1;
}

.lora-title {
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 8px 0;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lora-stats {
    display: flex;
    gap: 10px;
    font-size: 12px;
}

.lora-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nsfw-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(244, 67, 54, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

/* Стили для выпадающего списка фильтров */
.filter-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23ffffff' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    text-align: center;
    padding-right: 35px;
}

.filter-select:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

/* Стили для options */
.filter-select option {
    background: var(--bg-darker);
    color: var(--text-primary);
    border: none;
}

/* Модальное окно LoRA */
.lora-details-container {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-darker);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.lora-details-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-darker);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    z-index: 1001;
}

.lora-details-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
    padding: 20px;
}

.lora-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.lora-image-wrapper img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}

.lora-fullscreen-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
    opacity: 0;
}

.lora-image-wrapper:hover .lora-fullscreen-toggle {
    opacity: 1;
}

.lora-fullscreen-toggle:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.lora-header {
    margin-bottom: 20px;
}

.lora-header h2 {
    font-size: 1.5rem;
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.lora-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--text-secondary);
}

.lora-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.lora-base-model, .lora-type {
    background: rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

.lora-description, .lora-tags {
    margin-bottom: 25px;
}

.lora-description h3, .lora-tags h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.lora-description p {
    line-height: 1.5;
    color: var(--text-secondary);
    max-height: 200px;
    overflow-y: auto;
}

.tags-container {
    max-height: 150px;
    overflow-y: auto;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: rgba(var(--primary-rgb), 0.2);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    color: rgb(149, 134, 236);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.no-tags {
    color: var(--text-muted);
    font-style: italic;
}

.lora-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.lora-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    flex: 1;
    min-width: 140px;
    justify-content: center;
}

.lora-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.lora-nsfw-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 8px;
    color: #f44336;
}

.warning-icon {
    font-size: 16px;
}

/* Полноразмерное изображение */
.fullscreen-image-container {
    max-width: 95vw;
    max-height: 95vh;
    background: transparent;
    border: none;
    box-shadow: none;
}

.fullscreen-image {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.load-more-container {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
}

.no-results, .error-message {
    text-align: center;
    padding: 40px;
    grid-column: 1 / -1;
    color: var(--text-secondary);
}

.no-results h3, .error-message h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.no-results p, .error-message p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}


@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification {
    animation: slideIn 0.3s ease;
}

/* Скрытие элементов */
.hidden {
    display: none !important;
}

.lora-carousel {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lora-carousel img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: none;
}

.lora-carousel img.active {
    display: block;
}

.lora-carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding: 10px;
}

.carousel-prev, .carousel-next {
    background: var(--primary-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition);
}

.carousel-prev:hover, .carousel-next:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.carousel-counter {
    color: var(--text-primary);
    font-weight: bold;
    min-width: 60px;
    text-align: center;
}

.lora-item {
    width: calc(25% - 15px); 
    margin-bottom: 20px;
}

.lora-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 125%;
    overflow: hidden;
}

.lora-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.lora-details-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.lora-details-loading .loader {
    margin-bottom: 20px;
}


.lora-video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    z-index: 2;
    pointer-events: none;
}

.lora-item:hover .video-play-icon {
    display: flex;
}

/* Анимация для иконки воспроизведения */
.video-play-icon {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.lora-carousel .lora-media {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: none;
    border-radius: 8px;
}

.lora-carousel .lora-media.active {
    display: block;
}

.lora-carousel video.lora-media {
    background: #000;
}

.tag.lora-tag {
    background: rgba(var(--primary-rgb), 0.3);
    border-color: rgba(var(--primary-rgb), 0.5);
    color: var(--primary-color);
    font-weight: bold;
}

.load-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    padding: 20px;
    width: 100%;
}

#load-more-loras {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-primary);
    min-width: 200px; /* Фиксированная минимальная ширина */
}

#load-more-loras:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}

#load-more-loras:active {
    transform: translateY(0);
}

#load-more-loras:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Стили для состояния загрузки */
#load-more-loras.loading {
    position: relative;
    color: transparent;
}

#load-more-loras.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

h4 a,
h4 a:visited,
h4 a:hover,
h4 a:focus {
 color: #FFA500; 
 text-decoration: none;
}

@media (max-width: 768px) {
    .lora-item {
        width: calc(50% - 10px) !important;
        margin-bottom: 15px;
        border-radius: 10px;
    }
    
    .lora-item:hover {
        transform: translateY(-3px);
    }
    
    .lora-image-container {
        padding-bottom: 100%;
    }
    
    .lora-overlay {
        padding: 10px;
        opacity: 1; /* Всегда показываем на мобильных */
        background: linear-gradient(transparent, rgba(0,0,0,0.9));
    }
    
    .lora-title {
        font-size: 12px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        margin: 0 0 5px 0;
    }
    
    .lora-stats {
        font-size: 10px;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .nsfw-badge {
        top: 8px;
        right: 8px;
        padding: 3px 6px;
        font-size: 10px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .lora-item {
        width: 100% !important;
        margin-bottom: 12px;
    }
    
    .lora-title {
        font-size: 13px;
    }
    
    .lora-stats {
        font-size: 11px;
        justify-content: space-between;
    }
    
    .lora-overlay {
        padding: 12px;
    }
}

/* Адаптация модального окна Lora */
@media (max-width: 768px) {
    .lora-details-container {
        width: 95% !important;
        max-height: 85vh !important;
        margin: 0 auto;
        border-radius: 12px;
    }
    
    .lora-details-content {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 15px !important;
    }
    
    .lora-header h2 {
        font-size: 1.3rem !important;
        margin-bottom: 8px !important;
    }
    
    .lora-stats {
        font-size: 12px !important;
        gap: 10px !important;
        flex-wrap: wrap;
    }
    
    .lora-meta {
        gap: 10px !important;
        margin-bottom: 15px !important;
    }
    
    .lora-base-model, 
    .lora-type {
        padding: 5px 10px !important;
        font-size: 11px !important;
    }
    
    .lora-description, 
    .lora-tags {
        margin-bottom: 20px !important;
    }
    
    .lora-description h3, 
    .lora-tags h3 {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
    }
    
    .lora-description p {
        font-size: 14px !important;
        max-height: 150px !important;
        line-height: 1.4 !important;
    }
    
    .tags-container {
        max-height: 120px !important;
    }
    
    .tag {
        padding: 5px 10px !important;
        font-size: 11px !important;
        max-width: 150px !important;
    }
    
    .lora-actions {
        flex-direction: column !important;
        gap: 8px !important;
        margin-bottom: 15px !important;
    }
    
    .lora-action-btn {
        min-width: auto !important;
        width: 100% !important;
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
    
    .lora-nsfw-warning {
        padding: 10px !important;
        font-size: 14px !important;
    }
    
    .lora-fullscreen-toggle {
        opacity: 1 !important; /* Всегда показываем на мобильных */
        width: 35px !important;
        height: 35px !important;
        font-size: 16px !important;
    }
}

@media (max-width: 425px) {
    .lora-details-container {
        width: 98% !important;
        max-height: 90vh !important;
    }
    
    .lora-details-content {
        padding: 12px !important;
        gap: 12px !important;
    }
    
    .lora-header h2 {
        font-size: 1.2rem !important;
    }
    
    .lora-stats {
        font-size: 11px !important;
    }
    
    .lora-action-btn {
        padding: 10px 14px !important;
        font-size: 13px !important;
    }
    
    .lora-description p {
        font-size: 13px !important;
    }
}

/* Адаптация карусели */
@media (max-width: 768px) {
    .lora-carousel {
        min-height: 300px !important;
        border-radius: 10px;
    }
    
    .lora-carousel img,
    .lora-carousel .lora-media {
        max-height: 400px !important;
    }
    
    .lora-carousel-controls {
        margin-top: 10px !important;
        padding: 8px !important;
        gap: 12px !important;
    }
    
    .carousel-prev, 
    .carousel-next {
        width: 35px !important;
        height: 35px !important;
        font-size: 16px !important;
    }
    
    .carousel-counter {
        font-size: 14px !important;
        min-width: 50px !important;
    }
}

/* Адаптация фильтров */
@media (max-width: 768px) {
    .filter-select {
        width: 100% !important;
        margin-bottom: 10px;
        padding: 10px 16px !important;
        font-size: 14px !important;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 13px;
        flex: 1;
        min-width: calc(33.333% - 8px);
        text-align: center;
    }
}

/* Адаптация кнопки "Загрузить еще" */
@media (max-width: 768px) {
    .load-more-container {
        margin: 30px 0 !important;
        padding: 15px !important;
    }
    
    #load-more-loras {
        padding: 12px 24px !important;
        font-size: 14px !important;
        min-width: 180px !important;
        width: 100%;
        max-width: 280px;
    }
}

/* Адаптация для ландшафтной ориентации */
@media (max-width: 900px) and (orientation: landscape) {
    .lora-details-container {
        max-height: 80vh !important;
    }
    
    .lora-carousel {
        min-height: 250px !important;
    }
    
    .lora-carousel img,
    .lora-carousel .lora-media {
        max-height: 300px !important;
    }
}

/* Улучшение касаний для мобильных */
@media (max-width: 768px) {
    .lora-item {
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
    }
    
    .lora-action-btn,
    .carousel-prev,
    .carousel-next,
    .lora-fullscreen-toggle {
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
    }
}

/* iOS Safari специфичные стили */
@supports (-webkit-touch-callout: none) {
    .lora-details-container {
        -webkit-overflow-scrolling: touch;
    }
    
    .tags-container,
    .lora-description p {
        -webkit-overflow-scrolling: touch;
    }
}

/* Улучшение читаемости на маленьких экранах */
@media (max-width: 375px) {
    .lora-title {
        font-size: 12px !important;
    }
    
    .lora-stats {
        font-size: 10px !important;
    }
    
    .lora-overlay {
        padding: 8px !important;
    }
}

.lora-fullscreen-toggle  {
display: none;}













































.gallery-item-placeholder {
  width: 100%;
  height: 300px;
  background: linear-gradient(90deg, #2a2a2a 25%, #333 50%, #2a2a2a 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.placeholder-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(var(--primary-rgb), 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

.placeholder-error {
  color: #ff4757;
  font-size: 14px;
  padding: 10px;
}

/* Анимации */
@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Плавное появление элементов */
.gallery-item {
  transition: opacity 0.3s ease, transform 0.3s ease !important;
  will-change: opacity, transform;
}

/* Оптимизация изображений */
.gallery-image,
.gallery-video {
  max-width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
  border-radius: 8px;
}

.gallery-image.loaded {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Оптимизация скролла */
.gallery-grid {
  contain: layout style paint;
}

/* Улучшение производительности для мобильных */
@media (max-width: 768px) {
  .gallery-item {
    transform: translateZ(0);
    backface-visibility: hidden;
  }
}

/* Оптимизация loader */
.gallery-loader {
  position: relative;
  min-height: 100px;
}

.gallery-loader.hidden {
  display: none !important;
}

/* ============================================================================
   ДОПОЛНИТЕЛЬНЫЕ СТИЛИ (canvas/orbs/auth-modal/scrollbar)
   ============================================================================ */

/* ============================================================
   CANVAS BACKGROUND
   ============================================================ */
html { background: var(--bg-gradient) !important; }
body { background: transparent !important; }

#canvas-bg {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 0 !important;
  opacity: 0.55 !important;
  pointer-events: none !important;
}

.bg-orbs {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  animation: lora-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 lora-orb-float {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, 50px) scale(1.15); }
}

/* Контент над canvas */

.main-container,
.footer,
.burger-menu {
  position: relative;
  z-index: 1;
}

.help-button,
.scroll-top-button {
  z-index: 999;
}

.header {
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  z-index: 1000;
  background: val(--season-bg-dark);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.3s ease;
}

.header {
  position: fixed !important;
  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; }
}

.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);
}

/* ============================================================
   ЗАГОЛОВОК ГАЛЕРЕИ
   ============================================================ */
.gallery-header h1 {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(var(--primary-rgb), 0.3);
  letter-spacing: -0.5px;
  font-size: 36px !important;
}

.gallery-header h1::before {
  content: '// ';
  font-family: 'Courier New', monospace;
  -webkit-text-fill-color: var(--primary-color);
  opacity: 0.5;
}

.gallery-header h5 {
  font-family: 'Courier New', monospace;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-size: 12px !important;
  color: var(--text-muted) !important;
  opacity: 0.85;
}

.gallery-header h4 {
  font-size: 13px !important;
  color: var(--text-secondary) !important;
}

.gallery-header h4 a {
  color: var(--primary-color) !important;
  text-decoration: none;
  border-bottom: 1px dashed var(--primary-color);
  padding-bottom: 1px;
  transition: all 0.25s;
}

.gallery-header h4 a:hover {
  color: var(--secondary-color) !important;
  border-bottom-color: var(--secondary-color);
  text-shadow: 0 0 8px rgba(var(--primary-rgb), 0.5);
}

/* ============================================================
   ПОИСК
   ============================================================ */
.search-box {
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-box:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.2);
}

.search-box input {
  border: none !important;
  background: transparent !important;
  color: var(--text-primary) !important;
  outline: none;
  border-radius: 0 !important;
}

.search-box input::placeholder {
  color: var(--text-muted);
  font-style: italic;
}

.search-box button {
  background: var(--gradient) !important;
  color: white !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 13px;
  transition: filter 0.2s, box-shadow 0.2s;
}

.search-box button:hover {
  filter: brightness(1.1);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.15);
}

/* ============================================================
   ФИЛЬТРЫ
   ============================================================ */
.filter-btn,
.userhideandfav {
  background: rgba(0, 0, 0, 0.5) !important;
  color: var(--text-secondary) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.15) !important;
  border-radius: 24px !important;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.25s ease !important;
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.filter-btn:hover,
.userhideandfav:hover {
  border-color: var(--primary-color) !important;
  color: var(--primary-color) !important;
  background: rgba(var(--primary-rgb), 0.08) !important;
  box-shadow: 0 0 16px rgba(var(--primary-rgb), 0.2);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--gradient) !important;
  color: white !important;
  border-color: transparent !important;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.35);
}

.filter-btn.active::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: lora-filter-shine 3s infinite;
}

@keyframes lora-filter-shine {
  0%, 60%, 100% { left: -100%; }
  80% { left: 100%; }
}

/* Селект моделей */
.filter-select {
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.15) !important;
  border-radius: 24px !important;
  color: var(--text-secondary) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.25s !important;
  backdrop-filter: blur(8px);
}

.filter-select:hover {
  border-color: var(--primary-color) !important;
  color: var(--primary-color) !important;
  box-shadow: 0 0 16px rgba(var(--primary-rgb), 0.2) !important;
  background-color: rgba(var(--primary-rgb), 0.08) !important;
}

.filter-select:focus {
  outline: none !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25) !important;
}

.filter-select option {
  background: var(--bg-darker) !important;
  color: var(--text-primary) !important;
}

/* ============================================================
   КАРТОЧКИ LORA
   ============================================================ */
.lora-item {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.15) !important;
  backdrop-filter: blur(8px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease !important;
}

.lora-item:hover {
  border-color: var(--primary-color) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5),
              0 0 24px rgba(var(--primary-rgb), 0.2) !important;
  transform: translateY(-4px) !important;
  z-index: 5;
}

/* Угловой индикатор зелёной точкой */
.lora-item::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.6);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 4;
  pointer-events: none;
}

.lora-item:hover::after { opacity: 1; }

/* Сканирующий эффект */
.lora-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(var(--primary-rgb), 0.15), transparent);
  pointer-events: none;
  transition: left 0.7s ease;
  z-index: 3;
}

.lora-item:hover::before { left: 100%; }

/* Оверлей с информацией */
.lora-overlay {
  background: linear-gradient(to top,
    rgba(0, 0, 0, 0.92) 0%,
    rgba(0, 0, 0, 0.6) 50%,
    transparent 100%) !important;
  backdrop-filter: blur(6px);
}

.lora-title {
  color: white !important;
  font-weight: 700 !important;
}

.lora-stats {
  color: var(--primary-color) !important;
  font-family: 'Courier New', monospace;
  font-size: 12px !important;
  letter-spacing: 0.3px;
}

/* ============================================================
   КНОПКА "ЗАГРУЗИТЬ ЕЩЁ"
   ============================================================ */
.load-more-container {
  text-align: center;
  padding: 30px 0;
}

#load-more-loras {
  background: var(--gradient) !important;
  color: white !important;
  border: none !important;
  padding: 13px 32px !important;
  border-radius: 30px !important;
  font-weight: 700 !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 13px !important;
  cursor: pointer;
  transition: all 0.3s ease !important;
  position: relative;
  overflow: hidden;
}

#load-more-loras::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;
}

#load-more-loras:hover::before { left: 100%; }

#load-more-loras:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.4),
              0 0 60px rgba(var(--secondary-rgb), 0.2) !important;
}

/* ============================================================
   МОДАЛКА LORA — нейро-стиль
   ============================================================ */
.lora-details-container {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.98)) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.25) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6),
              0 0 60px rgba(var(--primary-rgb), 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* Угловые скобки */
.lora-details-container::before,
.lora-details-container::after {
  content: '';
  position: absolute;
  width: 24px; height: 24px;
  border-color: var(--primary-color);
  border-style: solid;
  opacity: 0.7;
  pointer-events: none;
  z-index: 5;
}

.lora-details-container::before {
  top: 8px; left: 8px;
  border-width: 2px 0 0 2px;
  border-radius: 4px 0 0 0;
}

.lora-details-container::after {
  bottom: 8px; right: 8px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 4px 0;
}

/* Кнопка закрытия */
.close-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.2) !important;
  color: var(--text-muted) !important;
  border-radius: 50% !important;
  transition: all 0.25s ease !important;
}

.close-btn:hover {
  color: var(--primary-color) !important;
  background: rgba(var(--primary-rgb), 0.1) !important;
  transform: rotate(90deg) !important;
}

/* Заголовок модели */
.lora-header h2 {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700 !important;
  letter-spacing: 0.3px;
}

/* Статистика (downloads, rating) */
.lora-stats {
  display: flex;
  gap: 12px;
}

.downloads-count,
.lora-rating {
  background: rgba(0, 0, 0, 0.7) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.25) !important;
  color: var(--primary-color) !important;
  font-family: 'Courier New', monospace !important;
  font-size: 12px !important;
  letter-spacing: 0.5px;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
}

/* Мета: base model + type */
.lora-base-model,
.lora-type {
  background: rgba(0, 0, 0, 0.6) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.2) !important;
  color: var(--text-secondary) !important;
  font-family: 'Courier New', monospace !important;
  font-size: 11px !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px !important;
  border-radius: 4px !important;
}

.lora-type {
  color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.lora-base-model::before {
  content: '⚙ ';
  color: var(--primary-color);
  margin-right: 2px;
}

/* Описание и теги — заголовки */
.lora-description h3,
.lora-tags h3 {
  font-family: 'Courier New', monospace !important;
  font-size: 11px !important;
  letter-spacing: 2px;
  color: var(--primary-color) !important;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 10px !important;
}

.lora-description h3::before,
.lora-tags h3::before {
  content: '// ';
  opacity: 0.7;
}

.lora-description p {
  color: var(--text-secondary) !important;
  line-height: 1.6;
}

/* Контейнер тегов */
.tags-container {
  background: rgba(0, 0, 0, 0.5) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.15) !important;
  border-radius: 10px !important;
  padding: 12px !important;
}

/* Сами теги */
.tags-list .tag,
.tags-list span {
  background: rgba(var(--primary-rgb), 0.1) !important;
  color: var(--primary-color) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.3) !important;
  font-family: 'Courier New', monospace !important;
  font-size: 12px !important;
  letter-spacing: 0.3px;
  border-radius: 16px !important;
  transition: all 0.2s !important;
}

.tags-list .tag:hover,
.tags-list span:hover {
  background: rgba(var(--primary-rgb), 0.2) !important;
  box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.3);
}

/* Кнопки действий */
.lora-action-btn {
  background: rgba(0, 0, 0, 0.6) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.2) !important;
  color: var(--text-secondary) !important;
  border-radius: 22px !important;
  font-weight: 600 !important;
  transition: all 0.25s ease !important;
}

.lora-action-btn:hover {
  border-color: var(--primary-color) !important;
  color: var(--primary-color) !important;
  background: rgba(var(--primary-rgb), 0.08) !important;
  box-shadow: 0 0 14px rgba(var(--primary-rgb), 0.2) !important;
  transform: translateY(-1px);
}

.copy-tags-btn.copied {
  background: var(--gradient) !important;
  color: white !important;
  border-color: transparent !important;
}

/* NSFW предупреждение */
.lora-nsfw-warning {
  background: rgba(220, 38, 38, 0.1) !important;
  border: 1px solid rgba(220, 38, 38, 0.4) !important;
  color: #ff6b6b !important;
  border-radius: 10px !important;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Карусель в модалке */
.lora-image-wrapper {
  border: 1px solid rgba(var(--primary-rgb), 0.15) !important;
  border-radius: 12px !important;
}

.lora-fullscreen-toggle {
  background: rgba(0, 0, 0, 0.7) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.3) !important;
  color: var(--primary-color) !important;
  border-radius: 50% !important;
  backdrop-filter: blur(8px);
  transition: all 0.25s !important;
}

.lora-fullscreen-toggle:hover {
  background: rgba(var(--primary-rgb), 0.2) !important;
  box-shadow: 0 0 16px rgba(var(--primary-rgb), 0.4) !important;
}

.lora-carousel-controls {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.carousel-prev,
.carousel-next {
  background: transparent !important;
  border: none !important;
  color: var(--primary-color) !important;
  cursor: pointer;
  transition: all 0.25s !important;
  font-size: 22px !important;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-prev:hover,
.carousel-next:hover {
  color: var(--secondary-color) !important;
  text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.5);
  transform: scale(1.2);
}

.carousel-counter {
  font-family: 'Courier New', monospace !important;
  color: var(--text-muted) !important;
  font-size: 12px !important;
  letter-spacing: 1px;
}

/* Полноэкранная картинка */
.fullscreen-image-container {
  background: rgba(0, 0, 0, 0.95) !important;
}

/* ============================================================
   КНОПКА "НАВЕРХ"
   ============================================================ */
.scroll-top-button {
  background: rgba(0, 0, 0, 0.85) !important;
  border: 1px solid var(--primary-color) !important;
  color: var(--primary-color) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.25),
              0 0 30px rgba(var(--primary-rgb), 0.1);
  transition: all 0.3s ease !important;
}

.scroll-top-button:hover {
  background: var(--gradient) !important;
  color: white !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 28px rgba(var(--primary-rgb), 0.5);
}

/* ============================================================
   ФИЛЬТРЫ-МОДАЛКА (мобильная)
   ============================================================ */
#filters-modal .modal-content {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.98)) !important;
  border: 1px solid rgba(var(--primary-rgb), 0.25) !important;
  border-radius: 16px !important;
  backdrop-filter: blur(16px) saturate(180%);
  position: relative;
}

#filters-modal h3 {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}

#filters-modal h3::before {
  content: '// ';
  font-family: 'Courier New', monospace;
  -webkit-text-fill-color: var(--primary-color);
  opacity: 0.7;
}

/* ============================================================
   AUTH-MODAL — РЕДИЗАЙН
   ============================================================ */
.auth-modal-redesign {
  max-width: 440px !important;
  border: 1px solid rgba(var(--primary-rgb), 0.25) !important;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.98)) !important;
  backdrop-filter: blur(16px) saturate(180%);
}

.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;
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.3);
}

.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; }
.auth-tab-content.active { display: flex; }

.auth-input {
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 15px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.auth-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 16px rgba(var(--primary-rgb), 0.2);
}

.auth-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 4px 0;
  text-align: center;
}

.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;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  padding: 14px 24px;
  border: none;
  border-radius: 30px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(var(--primary-rgb), 0.4),
              0 0 60px rgba(var(--secondary-rgb), 0.2);
}

.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-secondary {
  background: transparent;
  color: var(--primary-color);
  padding: 12px 24px;
  border: 1px solid var(--primary-color);
  border-radius: 30px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-secondary:hover {
  background: rgba(var(--primary-rgb), 0.1);
  box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.25);
}

/* ============================================================
   КОНТЕЙНЕР КОЛОКОЛЬЧИКА
   ============================================================ */
#notification-bell-container {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  display: flex;
  align-items: center;
}

.notification-bell {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  color: var(--primary-color);
  transition: all 0.25s ease;
  font-size: 20px !important;
  cursor: pointer;
}

.notification-bell:hover {
  background: rgba(var(--primary-rgb), 0.15) !important;
  border-color: var(--primary-color);
  box-shadow: 0 0 16px rgba(var(--primary-rgb), 0.3);
  transform: translateY(-1px);
}

/* ============================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ============================================================ */
@media (max-width: 768px) {
  .header {
    padding: 15px 20px;
  }
  .header::after { animation: none; }
  
  .lora-item::after { display: none; }
  
  .gallery-header h1 { font-size: 26px !important; }
  .gallery-header h5 { font-size: 11px !important; }
  
  .auth-modal-redesign {
    max-width: 92vw !important;
  }
}

@media (max-width: 480px) {
  .gallery-header h1 { font-size: 22px !important; }
  
  .lora-details-container::before,
  .lora-details-container::after {
    display: none !important;
  }
}


/* ============================================================================
   GRID-ПАТЧ — должен идти ПОСЛЕДНИМ, перекрывает старые .lora-grid правила
   ============================================================================ */
/* ==========================================================================
   LoRA Gallery — Grid Layout (patch)
   Подключать ПОСЛЕ stylesGallerylora.css. Перекрывает старые правила
   .lora-grid / .lora-item / .lora-image-container и т.д.
   ========================================================================== */

/* ---- Сетка ---- */
.lora-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 0 auto;
    max-width: 1400px;
    padding: 0 20px;
    box-sizing: border-box;
    /* Отменяем абсолютное позиционирование от Masonry */
    position: static;
    height: auto !important;
}

/* ---- Карточка ---- */
.lora-grid .lora-item {
    /* Сбрасываем width/margin от старых правил */
    width: auto !important;
    margin: 0 !important;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    /* Отменяем абсолютное позиционирование от Masonry */
    left: auto !important;
    top: auto !important;
}

.lora-grid .lora-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

/* ---- Контейнер изображения с фиксированной пропорцией ---- */
.lora-grid .lora-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;        /* фиксированная пропорция, без padding-bottom */
    padding-bottom: 0 !important;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
}

.lora-grid .lora-image,
.lora-grid .lora-video-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    border-radius: 0;             /* радиус — у карточки */
    display: block;
}

.lora-grid .lora-item:hover .lora-image,
.lora-grid .lora-item:hover .lora-video-preview {
    transform: scale(1.05);
}

/* ---- Скелетон во время загрузки картинки ---- */
.lora-grid .lora-image-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 200% 100%;
    animation: lora-skeleton 1.4s infinite;
    z-index: 0;
}

.lora-grid .lora-image,
.lora-grid .lora-video-preview {
    z-index: 1;
}

@keyframes lora-skeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Оверлей с инфой ---- */
.lora-grid .lora-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 12px 12px;
    color: white;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2;
    pointer-events: none;
}

.lora-grid .lora-item:hover .lora-overlay {
    opacity: 1;
    transform: translateY(0);
}

.lora-grid .lora-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.lora-grid .lora-overlay .lora-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

/* ---- NSFW badge ---- */
.lora-grid .nsfw-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    background: rgba(255, 65, 65, 0.85);
    color: white;
    font-size: 11px;
    border-radius: 12px;
    z-index: 3;
    backdrop-filter: blur(4px);
}

/* ---- Состояния "ничего не найдено" / ошибка / загрузка ---- */
.lora-grid .no-results,
.lora-grid .error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.lora-grid .no-results h3,
.lora-grid .error-message h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.lora-grid .error-message .btn {
    margin-top: 16px;
}

/* ---- Адаптив ---- */
@media (max-width: 768px) {
    .lora-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
        padding: 0 12px;
    }

    .lora-grid .lora-overlay {
        opacity: 1;                            /* на мобильных всегда показываем */
        transform: none;
        padding: 10px 8px 8px;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.92));
    }

    .lora-grid .lora-title { font-size: 12px; }
    .lora-grid .lora-overlay .lora-stats { font-size: 10px; gap: 8px; }

    .lora-grid .nsfw-badge {
        top: 6px;
        right: 6px;
        padding: 3px 6px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .lora-grid {
        grid-template-columns: repeat(2, 1fr);  /* строго 2 колонки на телефонах */
        gap: 10px;
    }
}

/* Широкие экраны (Full HD и больше) — карточки крупнее на ~25% */
@media (min-width: 1600px) {
    .lora-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
        max-width: 1700px;
    }

    .lora-grid .lora-title { font-size: 16px; }
    .lora-grid .lora-overlay .lora-stats { font-size: 13px; }
}

@media (min-width: 2200px) {
    .lora-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        max-width: 2000px;
    }
}

/* ---- Уведомления (slideIn) ---- */
@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ---- Полноэкранная иконка теперь видна ---- */
.lora-image-wrapper .lora-fullscreen-toggle {
    display: flex !important;
}


/* ФИКС ХУЙНИ НА ТЕЛЕФОНАЗ */
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;
}
}