/* ============================================
   AnotherLine.Music — UI (публичный сайт)
   «Острый современный»: плоские поверхности, резкие углы,
   левое выравнивание, дисплейный Unbounded, редкий teal-акцент.
   Без стекла, без градиентов, без центрирования.
   Подключается ПОСЛЕ site.css / styles.css / components.css.
   ============================================ */

/* ============================================
   Фон: фото с лёгким blur + зерно
   ============================================ */

.bg-blur,
.parallax {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(rgba(8, 8, 8, 0.82), rgba(8, 8, 8, 0.95)),
    url('/assets/images/bg.webp') center/cover no-repeat;
  filter: blur(3px) saturate(0.9);
  transform: scale(1.04);
}

:root[data-theme='light'] .bg-blur,
:root[data-theme='light'] .parallax {
  background:
    linear-gradient(rgba(246, 247, 248, 0.9), rgba(246, 247, 248, 0.98)),
    url('/assets/images/bg.webp') center/cover no-repeat;
}

/* Плёночное зерно поверх всего контента */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Частицы — выключены глобально */
#particles-canvas,
.particles {
  display: none !important;
}

/* ============================================
   Контейнер и заголовки страниц
   ============================================ */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}

/* ============================================
   Секции (левое выравнивание, резкая линия)
   ============================================ */

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-transform: none;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
  text-shadow: none;
}

.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  padding: 12px 22px;
  line-height: 1;
}

.section-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

:root[data-theme='light'] .section-link {
  color: #0f172a;
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.2);
}

:root[data-theme='light'] .section-link:hover {
  color: #008c93;
  border-color: #008c93;
  background: #f0f1f3;
}

/* ============================================
   Карточки (плоские, резкие)
   ============================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-light);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text);
}

/* ============================================
   Stat-карты (острые строки)
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  background: transparent;
  border: none;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  padding: 22px 24px;
  position: relative;
}

.stat-card:hover {
  background: var(--bg-card-hover);
}

.stat-icon {
  font-size: 20px;
  margin-bottom: 10px;
  display: block;
  color: var(--primary);
}

.stat-label {
  font-family: var(--font-display);
  color: var(--text-secondary);
  font-size: 11px;
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}

.stat-caption {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================
   Кнопки (плоские, острый угол, без градиентов)
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--btn-radius);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--text);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 13px;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 11px;
  border-radius: var(--radius-sm);
  min-height: 34px;
}

/* Унификация унаследованных кнопок */
.artist-btn,
.release-card-link,
.artist-card-btn,
.contact,
.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-radius: var(--btn-radius);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.artist-btn,
.release-card-link,
.artist-card-btn {
  background: var(--primary) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--btn-radius) !important;
}

.artist-btn:hover,
.release-card-link:hover,
.artist-card-btn:hover {
  background: var(--primary-dark) !important;
  color: #fff !important;
  transform: none !important;
}

.contact {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text);
  padding: 0.7rem 1.3rem;
}

.contact:hover {
  border-color: var(--text);
  color: var(--text);
}

.login-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text);
  padding: 0.55rem 1.2rem;
}

.login-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ============================================
   Бейджи
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 3px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.badge-gray {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.badge-green,
.badge-published {
  background: rgba(46, 213, 115, 0.14);
  color: var(--success);
}

.badge-moderation {
  background: rgba(52, 152, 255, 0.14);
  color: #5dade2;
}

/* ============================================
   Формы (резкие)
   ============================================ */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

/* ============================================
   Loading / Empty
   ============================================ */

.loading,
.empty {
  text-align: left;
  padding: 3rem 0;
  color: var(--text-muted);
}

.loading-spinner,
.spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(0, 176, 185, 0.2);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: ui-spin 0.8s linear infinite;
}

@keyframes ui-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   Hero (компактный, левое выравнивание)
   ============================================ */

.hero {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 0 1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--text);
  max-width: 16ch;
}

.hero-heading-accent {
  color: var(--text-secondary);
}

.hero-desc {
  max-width: 52ch;
  margin: 18px 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}

/* ============================================
   Карусели — убираем градиентные маски
   ============================================ */

.news-scroll,
.releases-scroll,
.artists-scroll,
.history-scroll {
  mask-image: none;
  -webkit-mask-image: none;
}

/* ============================================
   Унификация карточек (плоская база + акцент)
   ============================================ */

.news-card,
.release-card,
.artist-card,
.artist-item,
.leaderboard-card,
.single-release-details,
.single-artist-card,
.plan-card,
.feature-card,
.faq-item,
.leaderboard-item {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: var(--transition);
}

.news-card:hover,
.release-card:hover,
.artist-card:hover,
.artist-item:hover,
.leaderboard-card:hover,
.plan-card:hover,
.feature-card:hover {
  transform: none !important;
  border-color: var(--border-light) !important;
  box-shadow: none !important;
}

/* Острые радиусы у точечных элементов */
.mood-tile {
  border-radius: var(--radius-md) !important;
}

.release-group-count,
.single-artist-role,
.single-artist-social,
.filter-clear,
.faq-q-arrow,
.al-trial-icon,
.plan-icon,
.feature-icon {
  border-radius: var(--radius-sm) !important;
}

.artist-image {
  border-radius: var(--radius-md) !important;
}

/* Фильтры и модалки — острые */
.filters {
  border-radius: var(--radius-lg) !important;
}

.filter-input,
.filter-select {
  border-radius: var(--radius-sm) !important;
  background: var(--bg-input) !important;
  border-color: var(--border) !important;
}

.artist-suggest {
  border-radius: var(--radius-md) !important;
}

.mood-pill {
  border-radius: var(--radius-sm) !important;
}

.al-modal {
  border-radius: var(--radius-lg) !important;
}

/* Подписка: hero и контент — центрирование */
.subscribe-page .hero,
.subscribe-page .hero-message,
.subscribe-page .hero-copy {
  text-align: center !important;
}

.hero-title {
  align-items: center;
}

.subscribe-page .section-header {
  justify-content: center;
}

/* Планы: акцент тонкой верхней линией вместо градиентных рамок */
.plan-card.is-premium {
  border-top: 3px solid var(--gold) !important;
}

.plan-card.is-pro {
  border-top: 3px solid var(--pro-start) !important;
}

/* Убираем неон/градиенты в унаследованных заголовках */
.hero-title-line {
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--text);
  text-shadow: none;
}

.hero-title-line.accent {
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
  color: var(--text-secondary);
  filter: none;
}

.hero-sub {
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.04em;
}

/* ============================================
   al-* компоненты: резкие, плоские, без градиентов
   ============================================ */

.al-btn {
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: none;
}

.al-btn-sm {
  border-radius: var(--radius-sm);
}

.al-btn-md,
.al-btn:not(.al-btn-sm):not(.al-btn-lg) {
  border-radius: var(--radius-sm);
}

.al-btn-lg {
  border-radius: var(--radius-sm);
}

.al-btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: none;
}

.al-btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: none;
  transform: none;
}

.al-btn-secondary {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text);
}

.al-btn-secondary:hover {
  background: transparent;
  border-color: var(--text);
  color: var(--text);
}

/* ============================================
   Светлая тема для унаследованных классов
   ============================================ */

:root[data-theme='light'] .hero-title-line,
:root[data-theme='light'] .hero-title-line.accent,
:root[data-theme='light'] .section-title,
:root[data-theme='light'] .page-title,
:root[data-theme='light'] .stat-num,
:root[data-theme='light'] .stat-value,
:root[data-theme='light'] .news-card-title,
:root[data-theme='light'] .release-card-title,
:root[data-theme='light'] .artist-card-name,
:root[data-theme='light'] .artist-name,
:root[data-theme='light'] .leaderboard-name,
:root[data-theme='light'] .card-title,
:root[data-theme='light'] .plan-name,
:root[data-theme='light'] .feature-title,
:root[data-theme='light'] .faq-q,
:root[data-theme='light'] .hero-heading {
  color: #0f172a;
}

:root[data-theme='light'] .hero-heading-accent,
:root[data-theme='light'] .hero-title-line.accent {
  color: #46556b;
}

:root[data-theme='light'] .hero-eyebrow {
  color: var(--primary-dark);
}

:root[data-theme='light'] .hero-copy,
:root[data-theme='light'] .hero-desc,
:root[data-theme='light'] .artist-bio,
:root[data-theme='light'] .news-card-excerpt,
:root[data-theme='light'] .plan-desc,
:root[data-theme='light'] .feature-desc,
:root[data-theme='light'] .faq-a {
  color: #46556b;
}

:root[data-theme='light'] .stat-label,
:root[data-theme='light'] .stat-caption,
:root[data-theme='light'] .news-card-date,
:root[data-theme='light'] .release-card-date,
:root[data-theme='light'] .leaderboard-views,
:root[data-theme='light'] .artist-stats {
  color: #8a96a8;
}

:root[data-theme='light'] .release-card-artists,
:root[data-theme='light'] .artist-name {
  color: var(--primary-dark);
}

:root[data-theme='light'] .contact,
:root[data-theme='light'] .login-btn {
  color: #0f172a;
}

:root[data-theme='light'] .contact:hover,
:root[data-theme='light'] .login-btn:hover {
  color: #fff;
}

:root[data-theme='light'] .artist-item .artist-btn,
:root[data-theme='light'] .release-card-link {
  color: #fff;
}

/* ============================================
   Переключатель темы в навбаре (острый)
   ============================================ */

.site-navbar-theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-light);
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.site-navbar-theme-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ============================================
   Главная: левая раскладка и острая статистика
   ============================================ */

.content {
  text-align: left;
  align-items: stretch;
}

.section-title {
  text-align: left;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 0;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: none;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 20px 24px;
  background: var(--bg-card);
}

.stat-item:hover {
  background: var(--bg-card-hover);
}

.stat-divider {
  display: none;
}

.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
}

@media (max-width: 640px) {
  .stats-bar {
    grid-template-columns: 1fr;
  }
  /* Двухстрочный заголовок со ступенчатым смещением:
     «AnotherLine.» — правее, «Music» — левее */
  .hero-heading-main {
    display: block;
    margin-left: 4ch;
  }
  .hero-heading-accent {
    display: block;
    margin-left: 0;
  }
}

/* ============================================
   Light theme: страничные hardcoded-цвета → токены
   (news-all / artists / releases / moodboard)
   ============================================ */

:root[data-theme='light'] .stat-card {
  border-color: var(--border);
}

:root[data-theme='light'] .news-card-image,
:root[data-theme='light'] .release-card-cover {
  border-bottom-color: var(--border);
}

:root[data-theme='light'] .release-group-count {
  background: var(--bg-input);
  border-color: var(--border);
}

:root[data-theme='light'] .single-artist-bio {
  color: var(--text-secondary);
}

:root[data-theme='light'] .single-artist-social {
  border-color: var(--border);
}

:root[data-theme='light'] .artist-tooltip-content {
  border-color: var(--border);
}

:root[data-theme='light'] .mood-carousel__arrow {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text);
}

:root[data-theme='light'] .mood-sort-btn {
  background: var(--bg-input);
  border-color: var(--border);
}

:root[data-theme='light'] .mood-sort-btn:hover {
  border-color: var(--border-light);
}

:root[data-theme='light'] .mood-skeleton-tile,
:root[data-theme='light'] .mood-skeleton-card {
  background: rgba(15, 23, 42, 0.06);
}

.al-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  width: 100%;
  aspect-ratio: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.al-cover-placeholder::after {
  content: 'AnotherLine.Music';
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================
   Mobile: компактные контейнеры на телефонах
   ============================================ */

@media (max-width: 600px) {
  body .container {
    padding: 1rem 14px;
  }
}
