*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1117;
  --surface: #1a1d2e;
  --border: #2a2d3e;
  --accent: #5b6af0;
  --accent-hover: #4a59e0;
  --text: #e8eaf6;
  --muted: #8b8fa8;
  --green: #4caf82;
  --radius: 12px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

header {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-img {
  height: 36px;
  width: 36px;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}
.logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  transition: text-shadow 0.3s ease;
}
.logo-accent { color: var(--accent); }
.logo:hover .logo-text {
  text-shadow:
    0 0 8px rgba(91, 106, 240, 0.7),
    0 0 20px rgba(91, 106, 240, 0.4),
    0 0 40px rgba(91, 106, 240, 0.2);
}
.logo-tagline {
  font-size: 0.8rem;
  color: var(--muted);
  border-left: 1px solid var(--border);
  padding-left: 14px;
  margin-left: 4px;
  line-height: 1.3;
  max-width: 140px;
}
.header-cta {
  background: var(--accent);
  color: #fff;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.header-cta:hover { background: var(--accent-hover); color: #fff; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 64px 20px 48px;
}
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; margin-bottom: 16px; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 1.1rem; color: var(--muted); max-width: 600px; margin: 0 auto 32px; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.stat span { font-size: 0.85rem; color: var(--muted); }

/* ── Filters ── */
.filters-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.filter-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 160px; }
.filter-group label { font-size: 0.8rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.filter-group select,
.filter-group input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.filter-group select:focus,
.filter-group input:focus { border-color: var(--accent); }
.btn-filter,
.btn-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  text-decoration: none;
}
.btn-filter {
  background: var(--accent);
  color: #fff;
  border: none;
  transition: background 0.2s;
}
.btn-filter:hover { background: var(--accent-hover); }
.btn-reset {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  transition: color 0.2s, border-color 0.2s;
}
.btn-reset:hover { color: var(--text); border-color: var(--text); }

/* ── Channel cards ── */
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--muted);
}
.section-title strong { color: var(--text); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s, transform 0.15s;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }

.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-name {
  font-size: 1.05rem;
  font-weight: 700;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5rem;
}
.card-price {
  background: var(--accent);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.card-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--muted);
}

.card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.metric { background: var(--bg); border-radius: 8px; padding: 10px 12px; }
.metric span { display: block; font-size: 0.75rem; color: var(--muted); margin-bottom: 2px; }
.metric strong { font-size: 1rem; font-weight: 700; }

.card-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  margin-top: auto;
  display: flex;
  gap: 8px;
}
.btn-details {
  flex: 1;
  text-align: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: border-color 0.2s, color 0.2s;
}
.btn-details:hover { border-color: var(--accent); color: var(--accent); }
.btn-order {
  flex: 1;
  display: block;
  text-align: center;
  background: var(--accent);
  color: #fff;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.2s;
}
.btn-order:hover { background: var(--accent-hover); color: #fff; }

/* ── About page ── */
.about-page { max-width: 760px; padding: 60px 20px 80px; }

.about-hero { margin-bottom: 64px; }
.about-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; margin-bottom: 20px; line-height: 1.2; }
.about-hero h1 span { color: var(--accent); }
.about-hero p { font-size: 1.05rem; color: var(--muted); line-height: 1.7; }

.about-principles { margin-bottom: 64px; }
.about-principles h2,
.about-contacts h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 32px; }

.principles-list { display: flex; flex-direction: column; gap: 28px; }
.principle {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.principle-icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }
.principle h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.principle p { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-card h3 { font-size: 1rem; font-weight: 700; }
.contact-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.5; flex: 1; }

/* ── Channel page ── */
.channel-page { padding: 40px 20px 80px; max-width: 760px; }
.breadcrumb { margin-bottom: 28px; }
.breadcrumb a { color: var(--muted); font-size: 0.9rem; }
.breadcrumb a:hover { color: var(--text); }

.channel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.channel-title h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 6px; }
.channel-title h1 a { color: var(--text); }
.channel-title h1 a:hover { color: var(--accent); }
.channel-username { color: var(--muted); font-size: 0.95rem; }

.channel-price-block { text-align: right; }
.channel-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.channel-price-label { font-size: 0.8rem; color: var(--muted); }

.channel-tags { margin-bottom: 28px; }

.channel-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.metric-big {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.metric-big span { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.metric-big strong { font-size: 1.5rem; font-weight: 700; }

.channel-description {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}
.channel-description h2 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.channel-description p { font-size: 0.95rem; line-height: 1.7; color: var(--text); }

.channel-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Empty state ── */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text); }

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 32px 0 48px;
}
.page-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.page-btn:hover, .page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

/* ── Header nav ── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.header-nav a:not(.header-cta) {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.header-nav a:not(.header-cta):hover { color: var(--text); }
.header-nav a.nav-active:not(.header-cta) { color: var(--text); font-weight: 600; }
.header-nav a.nav-logout { color: var(--muted); font-size: 0.9rem; opacity: 0.6; }
.header-nav a.nav-logout:hover { color: var(--text); opacity: 1; }

/* ── Hero actions ── */
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ── How it works ── */
.how-it-works {
  padding: 64px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.how-it-works h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 48px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}
.step { text-align: center; }
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.step h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.step p { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

/* ── For whom ── */
.for-whom {
  padding: 64px 20px;
}
.for-whom h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 48px;
}
.for-whom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.for-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.for-icon { font-size: 2rem; }
.for-card h3 { font-size: 1.2rem; font-weight: 700; }
.for-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.for-card ul li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-left: 18px;
  position: relative;
}
.for-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}
.btn-outline {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--accent); color: #fff; }

/* ── Features grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.feature-icon { font-size: 1.8rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.feature-link { color: inherit; text-decoration: none; transition: color 0.2s; }
.feature-link:hover { color: var(--accent); }

/* ── FAQ ── */
.faq-section { padding: 64px 20px; }
.faq-section h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 40px;
}
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-item summary {
  padding: 18px 24px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 400;
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  padding: 0 24px 18px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}
.faq-item p a { color: var(--accent); }

/* ── CTA section ── */
.cta-section {
  padding: 80px 20px;
  text-align: center;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.cta-section h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 12px; }
.cta-section p { color: var(--muted); font-size: 1rem; margin-bottom: 32px; }

/* ── Burger button ── */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 20;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Responsive ── */

/* Планшеты и мобильные: бургер-меню вместо горизонтальной навигации */
@media (max-width: 900px) {
  .logo-tagline { display: none; }
  .burger { display: flex; }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 20px 20px;
    gap: 0;
  }
  .header-nav.open { display: flex; }
  .header-nav a:not(.header-cta) {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 1rem;
  }
  .header-nav .header-cta {
    margin-top: 16px;
    text-align: center;
    padding: 12px;
  }

  header { position: relative; }
}

/* ── Legal pages (terms, privacy) ── */
.legal-page { padding: 60px 20px 80px; }
.legal-wrap {
  max-width: 780px;
  margin: 0 auto;
}
.legal-wrap h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 8px;
}
.legal-updated {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 32px;
}
.legal-wrap h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 40px 0 12px;
  color: var(--text);
}
.legal-wrap p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 12px;
}
.legal-wrap ul {
  padding-left: 20px;
  margin-bottom: 12px;
}
.legal-wrap li {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 6px;
}
.legal-wrap strong { color: var(--text); }
.legal-wrap a { color: var(--accent); }
.legal-wrap hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 12px 0 0;
}

/* ── Status badges (shared across dashboard, campaign, publisher pages) ── */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.s-pending     { background: rgba(139,143,168,.15); color: #8b8fa8; }
.s-negotiating { background: rgba(255,193,7,.15);   color: #ffc107; }
.s-accepted    { background: rgba(91,106,240,.15);  color: #5b6af0; }
.s-published   { background: rgba(76,175,130,.20);  color: #4caf82; }
.s-confirmed   { background: rgba(76,175,130,.20);  color: #4caf82; }
.s-paid        { background: rgba(76,175,130,.20);  color: #4caf82; }
.s-declined    { background: rgba(239,83,80,.15);   color: #ef5350; }
.s-expired     { background: rgba(139,143,168,.15); color: #8b8fa8; }
.s-refunded    { background: rgba(139,143,168,.15); color: #8b8fa8; }
.s-disputed    { background: rgba(239,83,80,.15);   color: #ef5350; }

/* Мобильные: контентные правки */
@media (max-width: 600px) {
  .hero { padding: 40px 20px 32px; }
  .hero-stats { gap: 24px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .filters-bar { flex-direction: column; }
  .filter-group { min-width: 100%; }
  .cards-grid { grid-template-columns: 1fr; }
}
