:root {
  --primary-color: #5b51e0;
  --secondary-color: #30b7ed;
  --gradient: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  --gradient-reverse: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
  --bg-dark: #0b0a13;
  --bg-darker: #0b0818;
  --bg-gradient: linear-gradient(135deg, var(--bg-dark), var(--bg-darker), #100453);
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.1);
  --bg-features: rgba(10, 10, 19, 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, #003cff, #00a2ff);
  --shadow-primary: 0 10px 20px rgba(155, 81, 224, 0.3);
  --shadow-card: 0 10px 25px rgba(155, 81, 224, 0.2);
  --shadow-card-gold: 0 10px 25px rgba(255, 215, 0, 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);
}

/* Стили скроллбара */
::-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;
}

html {
  scroll-behavior: smooth;
}

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.05;
}

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(224, 81, 81, 0.05) 0%, transparent 70%),
              repeating-radial-gradient(circle, rgba(224, 174, 81, 0.05), rgba(224, 145, 81, 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;
}

.header {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--padding-small) var(--padding-large);
  box-sizing: border-box;
  z-index: 1000;
  background: rgba(4, 0, 26, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 
      0 10px 20px rgba(81, 191, 224, 0.4);          /* Нижняя тень */
  transition: box-shadow 0.3s ease;
}

.header-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 32px;
    font-weight: bold;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    cursor: pointer;
    margin-right: auto;
}

.logo:hover {
  font-size: 33px;
}

.main-menu {
  display: flex;
    gap: var(--padding-medium);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.main-menu a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 18px;
  position: relative;
  transition: var(--transition);
  background-image: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  background-size: 0% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
}

.main-menu a:hover {
  -webkit-text-fill-color: transparent;
  background-size: 100% 100%;
}

.main-menu a:hover::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient);
}

.profile-page {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: var(--header-height);
}

.profile-cover-container {
  top: -4px;
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  border-radius: var(--border-radius); 
  box-shadow:
    0px 0px 15px -5px rgba(224, 81, 81, 0.5),
    0px 0px 10px -5px rgba(224, 81, 81, 0.5),
    0px 0px 10px 0px rgba(224, 81, 81, 0.5),
    0 10px 20px rgba(224, 81, 81, 0.4);
  transition: box-shadow 0.3s ease;
  --neon-reflection: linear-gradient(
    to bottom,
    transparent 60%,
    rgba(224, 162, 81, 0.1) 80%,
    rgba(224, 145, 81, 0.05) 90%,
    transparent 100%
  );
}

.profile-cover-container::before {
  content: '';
  position: absolute;
  bottom: 0; /* Зафиксировано внизу */
  left: 0;
  right: 0;
  height: 10px;
  background: var(--neon-reflection);
  z-index: 1;
  filter: blur(5px);
}

@keyframes neon-pulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(224, 81, 81, 0.5), 
                0 0 30px rgba(224, 81, 81, 0.3),
                0 0 45px rgba(224, 81, 81, 0.1);
  }
  50% {
    box-shadow: 0 0 20px rgba(224, 81, 81, 0.8), 
                0 0 40px rgba(224, 81, 81, 0.5),
                0 0 60px rgba(224, 81, 81, 0.3);
  }
}


.profile-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-cover-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: var(--transition);
  border: none;
}

.upload-cover-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.profile-content {
  padding: 0 var(--padding-medium);
  margin-top: var(--padding-medium);
}

.profile-info-container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  margin-bottom: var(--padding-large);
}

.profile-details {
  flex: 1;
  padding-top: 30px;
}

.username-container {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 10px;
}

.profile-username {
  font-size: 28px;
  margin: 0;
  color: var(--text-primary);
}

.tokens-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--border-radius-small);
  background: var(--bg-card);
  font-size: 14px;
}

.tokens-icon {
  font-size: 18px;
}

#tokens-count {
  font-weight: 500;
  color: var(--primary-color);
}


.profile-avatar-outer-container {
  position: relative;
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  margin-right: 30px; 
}

.profile-avatar-container {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: 
    linear-gradient(white, white) padding-box,
    var(--gradient) border-box;
  border: 4px solid transparent;
}


.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.premium-crown {
  position: absolute;
  top: -50px;
  right: 90px;
  width: 70px;
  height: 70px;
  background: transparent; 
  color: rgba(255, 215, 0, 0.8); 
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 65px; 
  transform: rotate(-30deg);
  z-index: 100;
  border: none; 
  animation: crownAppear 0.5s ease-out forwards;
}

.premium-crown span {
  display: inline-block;
  text-shadow: 
    0 0 8px rgba(255, 215, 0, 0.6),
    0 0 15px rgba(255, 215, 0, 0.3);
  transition: all 0.3s ease;
}


.premium-crown::before,
.premium-crown::after {
  display: none;
}



/* Стили для кнопки управления короной */
.crown-toggle-btn {
  position: absolute;
  top: 120px;
  right: 55px;
  width: 25px;
  height: 25px;
  background: transparent;
  border-radius: 50%;
  display: none; /* По умолчанию скрыта */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  border: none;
}

.crown-toggle-btn .crown-icon {
  font-size: 60px;
  transition: all 0.3s ease;
  color: var(--secondary-color);
}

.crown-toggle-btn:hover {
  transform: scale(1.1);
  color: var(--secondary-color);
}

.crown-toggle-btn:hover .crown-icon {
  transform: scale(1.2);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}


.crown-toggle-btn.active .crown-icon {
  color: gold;
  animation: crownBounce 0.5s ease;
}

@keyframes crownBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.crown-appear {
  animation: crownAppear 0.5s ease-out forwards;
}

.crown-disappear {
  animation: crownDisappear 0.5s ease-out forwards;
}

@keyframes crownAppear {
  0% { transform: rotate(-30deg) scale(0); opacity: 0; }
  100% { transform: rotate(-30deg) scale(1); opacity: 1; }
}

@keyframes crownDisappear {
  0% { transform: rotate(-30deg) scale(1); opacity: 1; }
  100% { transform: rotate(-30deg) scale(0); opacity: 0; }
}


.premium-toggle-btn:hover::after {
  opacity: 0.5;
}

.premium-toggle-btn.active::after {
  opacity: 0.7;
  animation: ripple 2s infinite;
}

@keyframes ripple {
  0% { transform: scale(0.8); opacity: 0.7; }
  70% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(0.8); opacity: 0; }
}

.profile-avatar-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
}


/* Основной контейнер био */
.bio-container {
  position: relative;
  display: inline-block;
  width: 100%;

  max-width: max-content;
  margin: 5px 0;
}

/* Текст био */
.profile-bio {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  min-height: 20px;
  width: max-content;
  max-width: 400px;
  word-break: break-word;
}

/* Режим редактирования */
.profile-bio[contenteditable="true"] {
  border: 1px dashed #9B51E0;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  padding: 8px 35px 8px 12px;
}

/* Кнопка редактирования */
.edit-bio-btn {
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  padding: 5px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.edit-bio-btn:hover {
  opacity: 1;
}

/* Контейнер кнопок действий */
.bio-actions {
  display: none;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
  align-items: center; 
}

/* Общие стили кнопок */
.action-button {
  padding: 4px 10px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

/* Кнопка Сохранить */
.save-btn {
  background: rgba(76, 175, 80, 0.25);
  color: #4CAF50;
}

.save-btn:hover {
  background: rgba(76, 175, 80, 0.35);
}

/* Кнопка Отмена */
.cancel-btn {
  background: rgba(244, 67, 54, 0.25);
  color: #f44336;
}

.cancel-btn:hover {
  background: rgba(244, 67, 54, 0.35);
}


.highlight {
  animation: highlight-fade 1.5s ease-out;
}

@keyframes highlight-fade {
  0% { background: rgba(76, 175, 80, 0.2); }
  100% { background: rgba(255, 255, 255, 0.05); }
}

.bio-counter {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.7;
  margin-top: 4px;
  margin-left: 2px;
  margin-right: 8px;
  transition: all 0.2s ease;
  display: none; 
}

.bio-container.editing .bio-counter {
  display: inline-block;
}

.bio-counter.error {
  color: #ff4444;
  font-weight: bold;
}

.bio-shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-3px); }
  40%, 80% { transform: translateX(3px); }
}

.profile-posts-section {
  margin-top: var(--padding-large);
}

.profile-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 16px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: var(--border-radius-small);
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--bg-card);
  color: var(--primary-color);
}

.rating-selector {
  margin-bottom: var(--padding-medium);
  display: flex;
  align-items: center;
  gap: 10px;
}

.rating-selector label {
  color: var(--text-secondary);
}

.rating-selector select {
  background: var(--bg-darker);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-small);
  padding: 8px 12px;
  cursor: pointer;
  transition: var(--transition);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--padding-small);
  margin-top: var(--padding-medium);
}

.post-card {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 0.75/1;
  transition: var(--transition);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.post-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  object-position: top;
}

.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(5px);
}

.modal-content {
  background-color: var(--bg-dark);
  margin: 5% auto;
  padding: 30px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  width: 80%;
  max-width: 800px;
  position: relative;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.close-btn {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 30px;
  color: var(--text-secondary);
  cursor: pointer;
  background: none;
  border: none;
  z-index: 10;
  transition: var(--transition);
}

.close-btn:hover {
  color: var(--text-primary);
  transform: rotate(90deg);
}

.post-details-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

@media (min-width: 768px) {
  .post-details-content {
    flex-direction: row;
    max-height: 80vh;
  }
}

.post-image-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  padding: 20px;
}

.post-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--border-radius-small);
}

.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

.author-name {
  font-weight: 600;
  color: var(--text-primary);
}

.post-rating {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.prompt-container:hover .copy-overlay {
  opacity: 1;
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.footer {
  background: var(--bg-card);
  padding: 60px 20px;
  margin-top: 80px;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-title {
  font-size: 24px;
  margin-bottom: 40px;
  line-height: 1.5;
  color: var(--text-primary);
}

.footer-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 40px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 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;
}

.footer-legal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.legal-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal-link:hover {
  color: var(--primary-color);
}

.footer-copyright {
  color: var(--text-secondary);
  font-size: 14px;
}

@media (max-width: 768px) {
   /* Общие стили */
  :root {
    --padding-large: 40px;
    --padding-medium: 20px;
    --padding-small: 15px;
  }

  /* Шапка */
  .header {
    padding: 15px 20px;
    height: 60px;
  }

  .logo {
    font-size: 24px;
  }

  .main-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-darker);
    flex-direction: column;
    padding: 20px;
    gap: 15px;
    border-top: 1px solid var(--border-color);
  }

  .main-menu.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
  }

  /* Основной контент */
  .main-container {
    padding-top: 60px;
  }


  .main-container .content-wrapper .card {
    width: auto;
    max-width: 200px;
    margin-left: auto;
}

  .profile-avatar-outer-container {
    display: flex;
    justify-content: center;
    margin-right: 0px;
  }

  .crown-toggle-btn {
    top: 80px;
    right: 63px;
  }
  

  .main-menu {
    flex-direction: column;
    gap: 10px;
  }
  
  .masonry-gallery {
    columns: 2;
  }
  
  .footer {
    padding: 40px 20px;
  }
  
  .footer-title {
    font-size: 20px;
  }
  
  .footer-social {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .masonry-gallery {
    columns: 1;
  }
}

.generation-card {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 1/1;
  transition: var(--transition);
  background: var(--bg-card);
  border: 1px solid rgba(155, 81, 224, 0.3); /* Фиолетовая рамка */
}

.generation-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(155, 81, 224, 0.3);
}

.generation-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.generation-card:hover .generation-hover-overlay {
  opacity: 1;
}

.generation-hover-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Сетка публикаций */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--padding-small);
  margin-top: var(--padding-medium);
}

.post-card {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  aspect-ratio: 0.75/1;
  transition: var(--transition);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.post-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  object-position: top;
}

.post-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.post-card:hover .post-hover-overlay {
  opacity: 1;
}

.post-hover-content {
  color: white;
  text-align: center;
}


/* Модальное окно */
.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;
}

@media (max-width: 768px) {
  .profile-info-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-avatar-container {
    width: 120px;
    height: 120px;
  }

  .profile-details {
    padding-top: 10px;
  }

  .username-container {
    flex-direction: column;
    gap: 10px;
  }

  .posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .post-details-content {
    flex-direction: column;
  }

  .post-info-wrapper {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .posts-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .profile-cover-container {
    height: 150px;
    margin-top: -20px;
  }

  .post-info-wrapper {
    padding: var(--padding-small);
  }
}

/* Стили для модального окна оферты */
.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);
}

.load-more-button {
  grid-column: 1 / -1;
  padding: 12px 24px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 16px;
  margin: 20px auto;
  transition: all 0.5s ease;
  opacity: 1;
  transform: translateY(0);
}

.load-more-button.hiding {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.load-more-button.appearing {
  opacity: 0;
  transform: translateY(-20px);
  animation: appear 0.5s ease forwards;
}

.post-video-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.post-video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* или cover, если нужно заполнить всю область */
}

@keyframes appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.load-more-button.loading {
  position: relative;
  color: transparent;
}

.load-more-button.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Адаптивные стили для модального окна */
@media (max-width: 768px) {
  .modal-content {
    margin: 20% auto;
    width: 80%;
  }
  
  .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;
  }
}


/* Бургер-меню */
.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(155, 81, 224, 0.2);
  transform: scale(1.1);
}

.music-control-btn.active {
  color: #d4efff;
  background: rgba(0, 89, 255, 0.3);
  box-shadow: 0 0 10px rgba(48, 33, 0, 0.5);
}

.music-control-btn.muted {
  color: #666;
  opacity: 0.7;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Анимация пульсации при воспроизведении */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.music-control-btn.playing {
  animation: pulse 2s infinite;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
  .music-control-btn {
    margin-left: 5px;
    width: 35px;
    height: 35px;
    font-size: 20px;
  }
  
  #burger-music-control {
    width: 100%;
    height: auto;
    justify-content: flex-start;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 5px 0;
    font-size: 16px;
  }
}


.post-action-btn.delete-btn {
  background: rgba(244, 67, 54, 0.2);
  border: 1px solid rgba(244, 67, 54, 0.3);
  color: #f44336;
}

.post-action-btn.delete-btn:hover {
  background: rgba(244, 67, 54, 0.3);
  border-color: rgba(244, 67, 54, 0.5);
}

.post-action-btn.delete-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(244, 67, 54, 0.1);
}