* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* Новый фон с изображением */
  background-image: url('images/фон.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  
  /* Запасной цвет, если изображение не загрузится */
  background-color: #0f0e11;
  
  font-family: 'Georgia', 'Times New Roman', 'Book Antiqua', serif;
  min-height: 100vh;
  color: #d9d4dd;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  
  /* Затемнение фона для лучшей читаемости */
  position: relative;
}

/* Полупрозрачное затемнение поверх фона */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 14, 17, 0.7);
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

:root {
  --bg-card: rgba(22, 21, 26, 0.7);
  --border-light: #2b2733;
  --text-primary: #e0d9e8;
  --text-secondary: #9d91af;
  --accent-violet: #6d5b88;
  --accent-green: #6e8d5f;
  --glow-purple: rgba(109, 91, 136, 0.6);
}

.page-container {
  max-width: 950px;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 1.5rem 2.5rem;
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(60, 50, 80, 0.2);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-radius: 1.8rem;
  backdrop-filter: blur(3px); /* Оставляем только один общий blur для контейнера */
  animation: containerGlow 1.2s ease-out;
  min-height: 80vh;
}

/* Анимация появления контейнера */
@keyframes containerGlow {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid rgba(37, 34, 43, 0.8);
  padding-bottom: 0.9rem;
  transition: all 0.3s ease;
}

.logo h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #d4c8e6;
  line-height: 1.1;
  transition: text-shadow 0.3s ease, transform 0.2s;
  display: inline-block;
}

.logo h1:hover {
  text-shadow: 0 0 8px rgba(212, 200, 230, 0.6);
  transform: scale(1.01);
}

.logo .accent-dot {
  color: #b38ed1;
  font-size: 2.8rem;
  transition: color 0.2s;
}

.logo .sub {
  font-size: 0.9rem;
  color: #9d91af;
  margin-top: 0.1rem;
  font-style: italic;
  letter-spacing: 0.4px;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.author-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background-color: rgba(28, 26, 33, 0.6);
  padding: 0.5rem 1.3rem;
  border-radius: 2.5rem;
  color: #beb1d0;
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid #342e3f;
  transition: all 0.25s ease;
}

.author-badge:hover {
  border-color: #8c79aa;
  background: rgba(40, 37, 48, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.welcome-banner {
  background-color: rgba(24, 23, 30, 0.7);
  border-radius: 1.2rem;
  padding: 1.2rem 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border: 1px solid #8764a3;
  transition: all 0.25s ease;
  animation: gentleAppear 0.9s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

.welcome-banner:hover {
  border-color: #a97fc9;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transform: translateY(-3px);
  background: rgba(30, 28, 38, 0.8);
}

@keyframes gentleAppear {
  0% {
    opacity: 0;
    transform: scale(0.97);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.welcome-text h2 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #d4c8e6;
  transition: letter-spacing 0.2s;
}

.welcome-text p {
  color: #8764a3;
  margin-top: 0.2rem;
  font-size: 0.95rem;
}

.telegram-note {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: #b3a8c2;
  font-size: 0.9rem;
  background: rgba(18, 17, 20, 0.8);
  padding: 0.2rem 1rem;
  border-radius: 2rem;
  border: 1px dashed #3b3447;
  margin-top: 0.4rem;
  transition: all 0.2s ease;
}

.telegram-note a {
  color: #d4c8e6;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dotted #6e8d5f;
  transition: color 0.2s, border-color 0.2s, transform 0.1s;
}

.telegram-note a:hover {
  color: #a5c994;
  border-bottom: 1px solid #8cb07a;
  transform: translateX(2px);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  background-color: rgba(24, 23, 29, 0.6);
  border-radius: 2.5rem;
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(38, 35, 45, 0.8);
  transition: all 0.2s;
}

.filter-label {
  color: #817193;
  margin-right: 0.2rem;
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.filter-btn {
  background: rgba(24, 23, 30, 0.4);
  color: #a99bbd;
  padding: 0.35rem 1.2rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  font-weight: 500;
  border: none;
  outline: none;
  font-family: inherit;
}

.filter-btn.active {
  background: rgba(109, 91, 136, 0.7);
  color: #f2ebff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(212, 200, 230, 0.5);
  transform: scale(1.02);
}

.filter-btn:hover:not(.active) {
  background: rgba(70, 60, 90, 0.6);
  color: #e2d5f5;
  transform: translateY(-2px);
}

.filter-btn:active {
  transform: scale(0.96);
}

.fanfic-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0.3rem 0 0.3rem;
  flex: 1;
}

/* Анимация для карточек (появление при рендере) */
.fic-card {
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 1.2rem;
  padding: 1.3rem 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  border: 1px solid rgba(36, 33, 41, 0.6);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.2);
  cursor: pointer;
  animation: cardFloatIn 0.5s ease-out forwards;
  opacity: 0;
  transform: translateY(12px);
}

/* Анимация появления карточек */
@keyframes cardFloatIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fic-card:hover {
  border-color: #a27fc9;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(170, 130, 200, 0.4);
  background-color: rgba(27, 26, 33, 0.92);
  transform: translateY(-5px);
}

.fic-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  pointer-events: none;
}

.fic-title {
  font-size: 1.55rem;
  font-weight: 600;
  color: #d4c8e6;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  transition: color 0.2s;
}

.fic-card:hover .fic-title {
  color: #ecdfff;
  text-shadow: 0 0 3px rgba(0,0,0,0.3);
}

.fandom-badge {
  background-color: rgba(225, 225, 225, 0.15);
  color: #d4c8e6;
  font-size: 0.7rem;
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  letter-spacing: 0.3px;
  font-weight: 600;
  text-transform: uppercase;
  transition: all 0.2s;
}

.fic-card:hover .fandom-badge {
  background-color: rgba(240, 235, 255, 0.3);
  transform: scale(1.02);
}

.fic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.85rem;
  color: #9d91af;
}

.pairing {
  color: #d4c8e6;
  font-weight: 600;
  background: rgba(33, 40, 27, 0.3);
  padding: 0.1rem 0.7rem;
  border-radius: 14px;
  transition: background 0.2s;
}

.description {
  color: #b38ed1;
  line-height: 1.5;
  margin: 0.2rem 0 0.1rem;
  font-size: 0.93rem;
  transition: color 0.2s;
}

.fic-card:hover .description {
  color: #cbade5;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.2rem;
}

.tag {
  background-color: rgba(31, 28, 38, 0.7);
  color: #a997b8;
  padding: 0.2rem 0.8rem;
  border-radius: 15px;
  font-size: 0.7rem;
  border: 1px solid #2f2a39;
  font-weight: 500;
  transition: all 0.2s;
}

.fic-card:hover .tag {
  background-color: rgba(80, 70, 100, 0.7);
  color: #e1ceff;
  border-color: #6a518a;
}

/* Стили для секции "Обо мне" */
.about-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  animation: gentleAppear 0.6s ease-out;
}

.about-image-strip {
  width: 100%;
  height: auto;
  border-radius: 0.8rem;
  object-fit: cover;
  aspect-ratio: 10 / 1;
  border: 1px solid rgba(110, 90, 140, 0.5);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  opacity: 0.9;
}

.about-image-strip:hover {
  border-color: #a27fc9;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7), 0 0 15px rgba(150, 120, 200, 0.3);
  opacity: 1;
  transform: scale(1.01);
}

.about-card {
  background-color: rgba(15, 14, 20, 0.8);
  border-radius: 1.2rem;
  padding: 2rem;
  border: 1px solid rgba(135, 100, 163, 0.6);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: all 0.3s ease;
  animation: cardFloatIn 0.5s ease-out 0.15s forwards;
  opacity: 0;
}

.about-card:hover {
  border-color: #b898e0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(160, 130, 210, 0.2);
  transform: translateY(-3px);
}

.about-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  border-bottom: 1px solid rgba(135, 100, 163, 0.4);
  padding-bottom: 1rem;
}

.about-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #b898e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  background-color: #2a2435;
}

.about-avatar-placeholder {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6d5b88, #4a3d5c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border: 2px solid #b898e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  color: #d4c8e6;
  font-weight: bold;
}

.about-name {
  font-size: 1.8rem;
  font-weight: 700;
  color: #d4c8e6;
  letter-spacing: 0.5px;
}

.about-role {
  font-size: 0.9rem;
  color: #b38ed1;
  font-style: italic;
  margin-top: 0.1rem;
}

.about-content {
  color: #c8b9e0;
  line-height: 1.7;
  font-size: 0.95rem;
}

.about-content p {
  margin-bottom: 0.8rem;
}

/* Стили для инлайн-кнопок (бывшие статы) */
.about-stats {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.stat-btn {
  background: rgba(60, 50, 80, 0.4);
  padding: 0.6rem 1.2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(110, 90, 140, 0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  cursor: pointer;
  color: #d4c8e6;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  user-select: none;
  position: relative;
}

.stat-btn:hover {
  background: rgba(80, 65, 110, 0.7);
  border-color: #b898e0;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.stat-btn:active {
  transform: scale(0.95);
  background: rgba(100, 80, 140, 0.8);
}

.stat-btn.active-stat {
  background: rgba(109, 91, 136, 0.8);
  border-color: #d4c8e6;
  box-shadow: 0 0 10px rgba(180, 150, 220, 0.4);
}

.stat-label {
  font-size: 0.8rem;
  color: #a997b8;
  display: block;
}

.stat-value {
  font-weight: 700;
  color: #d4c8e6;
  font-size: 0.95rem;
}

/* Окошко с детальной информацией */
.stat-detail-panel {
  background: rgba(30, 25, 40, 0.8);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(160, 130, 200, 0.5);
  margin-top: 0.5rem;
  animation: slideDown 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  color: #d4c8e6;
  line-height: 1.6;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.stat-detail-panel:hover {
  border-color: #c8b0eb;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 12px rgba(150, 120, 200, 0.2);
}

@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    max-height: 300px;
  }
}

.footer-note {
  text-align: center;
  color: #5c4f6d;
  font-size: 0.8rem;
  margin-top: 0.8rem;
  border-top: 1px solid rgba(34, 32, 42, 0.6);
  padding-top: 1.2rem;
  letter-spacing: 0.3px;
  transition: color 0.2s;
}

.footer-note:hover {
  color: #9081a3;
}

/* Анимация загрузки для пустого состояния */
@keyframes pulseGlow {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Стили для красивой кастомной индикации клика */
.click-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(212, 200, 230, 0.4);
  transform: scale(0);
  animation: rippleEffect 0.5s linear;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@media (max-width: 550px) {
  .page-container {
    padding: 1.2rem;
  }
  .fic-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }
  .fic-title {
    font-size: 1.3rem;
  }
  .filter-btn {
    padding: 0.25rem 0.9rem;
    font-size: 0.75rem;
  }
  .about-card {
    padding: 1.2rem;
  }
  .about-name {
    font-size: 1.4rem;
  }
  .about-stats {
    gap: 0.6rem;
  }
  .stat-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
  }
}


/* Стили для ссылки на интерактив */
.welcome-links {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.interactive-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, rgba(109, 91, 136, 0.7), rgba(78, 61, 102, 0.7));
  color: #f2ebff;
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border-radius: 2.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid #b898e0;
  transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.interactive-badge:hover {
  background: linear-gradient(135deg, rgba(130, 110, 160, 0.8), rgba(100, 80, 130, 0.8));
  border-color: #d4c8e6;
  box-shadow: 0 0 20px rgba(180, 150, 220, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-3px);
  color: #fff;
}

.interactive-badge:active {
  transform: scale(0.96);
}

/* Стили для ссылки на сайт Мавалура */
.custom-link {
  color: #ffffff;
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px dotted #6e8d5f;
}

.custom-link:hover {
  color: #a5c994;
  border-bottom: 1px solid #8cb07a;
}