@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ——— Переменные ——— */
:root {
  --white:        #ffffff;
  --gray-50:      #f9f9f9;
  --gray-100:     #f2f2f2;
  --gray-200:     #e5e5e5;
  --gray-400:     #a3a3a3;
  --gray-600:     #525252;
  --gray-800:     #1a1a1a;
  --gray-900:     #0f0f0f;

  --accent:       #2563eb;        /* один акцентный синий — только на кнопках */
  --accent-dark:  #1d4ed8;
  --tg-blue:      #229ED9;        /* цвет иконки Telegram */

  --font:         'Inter', system-ui, sans-serif;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;

  --shadow-card:  0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  --shadow-hover: 0 4px 8px rgba(0,0,0,.06), 0 12px 32px rgba(0,0,0,.10);
  --transition:   all .22s cubic-bezier(.4,0,.2,1);
}

/* ——— Сброс ——— */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
a  { color: inherit; text-decoration: none; }

/* ——— Возрастной шлюз (18+) ——— */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .25s ease;
}

.age-gate.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.age-gate-box {
  background: var(--white);
  border-radius: 20px;
  padding: 44px 40px 36px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  animation: slideUp .3s cubic-bezier(.16,1,.3,1);
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.age-badge {
  display: inline-block;
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  background: #dc2626;
  border-radius: 12px;
  padding: 6px 20px;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.age-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
  letter-spacing: -.3px;
}

.age-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--gray-600);
  margin-bottom: 16px;
}

.age-text strong {
  color: var(--gray-900);
  font-weight: 600;
}

.age-warning {
  font-size: 13px;
  font-weight: 500;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 24px;
}

.age-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.age-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: -.1px;
}

.age-btn--confirm {
  background: var(--accent);
  color: var(--white);
}

.age-btn--confirm:hover {
  background: var(--accent-dark);
}

.age-btn--deny {
  background: var(--gray-100);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}

.age-btn--deny:hover {
  background: var(--gray-200);
  color: var(--gray-900);
}

/* 18+ badge в шапке */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-18 {
  font-size: 11px;
  font-weight: 800;
  color: #dc2626;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 3px 8px;
  letter-spacing: .5px;
}

@media (max-width: 640px) {
  .age-gate-box {
    padding: 32px 24px 28px;
  }
  .age-title { font-size: 19px; }
}


/* ——— Тело ——— */
body {
  font-family: var(--font);
  background: var(--white);
  color: var(--gray-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ——— Контейнер ——— */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ——— Шапка ——— */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gray-200);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #ff4500 0%, #ff8c00 100%);
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.logo-icon svg {
  width: 17px;
  height: 17px;
}

.header-badge {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 30px;
  padding: 4px 12px;
}

/* ——— Hero ——— */
.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--gray-100);
}

.hero-inner {
  max-width: 560px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.8px;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.hero p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--gray-600);
  max-width: 480px;
}

/* ——— Счётчик ——— */
.stats-row {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-100);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--gray-900);
}

.stat-label {
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--gray-200);
}

/* ——— Заголовок секции каналов ——— */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 44px 0 24px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  letter-spacing: -.2px;
}

.section-count {
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 500;
}

/* ——— Сетка каналов ——— */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 60px;
}

/* ——— Карточка ——— */
.channel-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  cursor: default;
  overflow: hidden;
  position: relative;
}

.channel-card .card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Обложка карточки */
.card-cover {
  height: 120px;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--gray-200);
}

/* Сдвиг контента и аватара при наличии обложки */
.channel-card.has-cover .card-content {
  padding-top: 16px;
}

.channel-card.has-cover .card-top {
  margin-top: -46px; /* Накладываем аватарку поверх обложки */
  margin-bottom: 12px;
}

.channel-card.has-cover .channel-avatar,
.channel-card.has-cover .avatar-placeholder {
  border: 3px solid var(--white); /* Белая рамка вокруг аватарки на обложке */
  width: 60px;
  height: 60px;
  border-radius: 16px;
}

.channel-card.has-cover .avatar-wrap {
  width: 60px;
  height: 60px;
}


.channel-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--gray-300, #d4d4d4);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.channel-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--gray-100);
  background: var(--gray-100);
}

.avatar-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
}

.avatar-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff4500 0%, #ff8c00 100%);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
}

.channel-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  padding: 3px 9px;
  border-radius: 30px;
  white-space: nowrap;
  letter-spacing: .2px;
}

.channel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -.2px;
  margin-bottom: 6px;
  line-height: 1.3;
}

.channel-subs {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.channel-subs svg {
  width: 12px;
  height: 12px;
  fill: var(--gray-400);
}

.channel-description {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-600);
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ——— Кнопка ——— */
.join-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  background: var(--accent);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: -.1px;
}

.join-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

.join-btn:hover {
  background: var(--accent-dark);
  transform: none;
}

.join-btn:active {
  transform: scale(.98);
}

/* ——— SEO хештеги ——— */
.seo-section {
  border-top: 1px solid var(--gray-100);
  background: var(--gray-50);
  padding: 48px 0;
  margin-top: auto;
}

.seo-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-400);
  text-align: center;
  margin-bottom: 16px;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 720px;
  margin: 0 auto;
}

.seo-tag {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  padding: 5px 12px;
  border-radius: 30px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  transition: var(--transition);
  cursor: default;
}

.seo-tag:hover {
  border-color: var(--gray-400);
  color: var(--gray-900);
}

/* ——— Адаптивность ——— */
@media (max-width: 1024px) {
  .channels-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }

  .hero { padding: 48px 0 40px; }

  .hero h1 { font-size: 28px; letter-spacing: -.5px; }

  .hero p { font-size: 15px; }

  .stats-row { gap: 18px; }

  .channels-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .section-header { padding: 32px 0 18px; }

  .header-badge { display: none; }

  .seo-section { padding: 36px 0; }
}

@media (max-width: 400px) {
  .stats-row { flex-wrap: wrap; }
  .stat-divider { display: none; }
}
