/* YouLinks — премиум палитра: глубина из 1012/4791/4727/4648 + кислотный акцент #00F5D4 */
:root {
  /* Основа: глубокий фиолетово-синий (общее из палитр 4791, 4727, 4648) */
  --color-base: #0d0818;
  --color-deep: #080512;
  --color-surface: #1a1535;
  --color-surface-elevated: #252042;
  /* Кислотная изюминка: электрический циан-тил (контраст на тёмном фиолетовом) */
  --color-accent: #00F5D4;
  --color-accent-dim: #00c4a8;
  /* Богатый фиолет/фуксия из палитры 4791 */
  --color-accent2: #8C0286;
  --color-accent3: #7D57BF;
  /* Текст: мягкий лавандовый белый (4727 #D8B2FE, 4648 #9EAACF) */
  --color-text: #E8E4F4;
  --color-highlight: #E8E4F4;
  --color-muted: #9EAACF;
  /* Семантика */
  --premium-black: #0d0818;
  --premium-charcoal: #080512;
  --premium-slate: #1a1535;
  --premium-surface: rgba(30, 21, 53, 0.9);
  --premium-surface-hover: rgba(37, 32, 66, 0.95);
  --premium-border: rgba(216, 178, 254, 0.08);
  --premium-border-light: rgba(0, 245, 212, 0.12);
  --premium-gold: #C9A227;
  --premium-gold-dim: #a8841f;
  --premium-accent: #00F5D4;
  --premium-accent-hover: #2dffe0;
  --premium-success: #00F5D4;
  --premium-danger: #E84A5F;
  --premium-muted: rgba(232, 228, 244, 0.5);
  --premium-muted-light: rgba(232, 228, 244, 0.88);
  --header-purple: rgba(13, 8, 24, 0.94);
  --header-purple-dark: #0d0818;
  --olinks-green: #00F5D4;
  /* Градиенты: глубина + лёгкий кислотный glow */
  --gradient-dark: linear-gradient(180deg, #0d0818 0%, #080512 50%, #1a1535 100%);
  --gradient-bg: radial-gradient(ellipse 85% 55% at 50% -15%, rgba(0, 245, 212, 0.06), transparent 45%),
    radial-gradient(ellipse 70% 50% at 95% 40%, rgba(140, 2, 134, 0.05), transparent 45%),
    radial-gradient(ellipse 60% 40% at 5% 70%, rgba(125, 87, 191, 0.04), transparent 45%),
    linear-gradient(180deg, #0d0818 0%, #0f0a1f 25%, #1a1535 100%);
  --gradient-accent: linear-gradient(135deg, #00F5D4 0%, #00c4a8 100%);
  --gradient-card: linear-gradient(145deg, rgba(26, 21, 53, 0.92) 0%, rgba(37, 32, 66, 0.5) 100%);
  --gradient-card-light: linear-gradient(145deg, rgba(216, 178, 254, 0.04) 0%, rgba(0, 245, 212, 0.03) 100%);
  /* Тени: мягкие + кислотный glow только на акцентах */
  --shadow-glow: 0 0 50px -10px rgba(0, 245, 212, 0.2);
  --shadow-glow-highlight: 0 0 35px -8px rgba(201, 162, 39, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(216, 178, 254, 0.06);
  --shadow-card-hover: 0 20px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 245, 212, 0.15),
    0 0 40px -12px rgba(0, 245, 212, 0.08);
  --shadow-btn-primary: 0 4px 20px -2px rgba(0, 245, 212, 0.4);
  --shadow-btn-primary-hover: 0 8px 28px -4px rgba(0, 245, 212, 0.5), 0 0 30px -8px rgba(0, 245, 212, 0.25);
  /* Шрифты: Unbounded (заголовки, запоминающийся display) + Onest (текст, отличная кириллица) */
  --font-heading: "Unbounded", sans-serif;
  --font-body: "Onest", system-ui, sans-serif;
  --font-sans: var(--font-body);
  /* Усиление: плавность и форма */
  --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-lg: 1.25rem;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--color-base);
  color: var(--color-text);
  overflow-x: hidden;
  letter-spacing: 0.01em;
}

/* Типографика: заголовки с характером */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-highlight);
  margin: 0 0 0.5em 0;
  line-height: 1.2;
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

@media (min-width: 640px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
}

/* Градиентный текст (акцент) — для ключевых фраз */
.text-gradient {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--premium-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Background layers */
.bg-layers {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-layers .layer1 {
  position: absolute;
  inset: 0;
  background: var(--gradient-bg);
  background-size: cover;
  background-repeat: no-repeat;
  animation: bgBreath 18s ease-in-out infinite;
}

.bg-layers .layer2 {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 120% 80% at 50% -30%,
    rgba(0, 245, 212, 0.08) 0%,
    transparent 50%
  );
  animation: layer2Pulse 8s ease-in-out infinite;
}

.bg-layers .layer3 {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(13, 8, 24, 0.75) 100%);
}

@keyframes bgBreath {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.88; }
}

@keyframes layer2Pulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 4px 20px -2px rgba(0, 245, 212, 0.4), 0 0 20px -4px rgba(0, 245, 212, 0.15); }
  50% { box-shadow: 0 6px 28px -2px rgba(0, 245, 212, 0.5), 0 0 32px -4px rgba(0, 245, 212, 0.25); }
}

@keyframes shimmer {
  0%, 100% { opacity: 0.5; transform: scaleX(0.8); }
  50% { opacity: 1; transform: scaleX(1); }
}

@keyframes lineGlow {
  0%, 100% { opacity: 0.7; box-shadow: 0 0 12px rgba(0, 245, 212, 0.3); }
  50% { opacity: 1; box-shadow: 0 0 20px rgba(0, 245, 212, 0.5); }
}

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

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes logoNameGlow {
  0%, 100% { text-shadow: 0 0 12px rgba(0, 245, 212, 0.15); }
  50% { text-shadow: 0 0 24px rgba(0, 245, 212, 0.4), 0 0 36px rgba(0, 245, 212, 0.2); }
}

/* Плавное переливание названия сайта */
@keyframes logoShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Премиальная анимация только для иконки логотипа */
@keyframes logoPremium {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 245, 212, 0.25), var(--shadow-btn-primary);
  }
  50% {
    box-shadow: 0 0 20px 2px rgba(0, 245, 212, 0.35), 0 0 40px -4px rgba(0, 245, 212, 0.2), var(--shadow-btn-primary);
  }
}

@keyframes shine {
  0% { transform: translateX(-100%) skewX(-12deg); }
  100% { transform: translateX(200%) skewX(-12deg); }
}

@keyframes underlineIn {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Пульсирующее свечение вокруг карточки «Топ» */
@keyframes topCardGlow {
  0%, 100% {
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 245, 212, 0.3), 0 0 24px -4px rgba(0, 245, 212, 0.2);
    border-color: rgba(0, 245, 212, 0.45);
  }
  50% {
    box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(0, 245, 212, 0.6), 0 0 36px -2px rgba(0, 245, 212, 0.4);
    border-color: rgba(0, 245, 212, 0.7);
  }
}

/* Layout */
.container {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

@media (min-width: 640px) {
  .container {
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(216, 178, 254, 0.1);
  background: var(--header-purple);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.3);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.site-header .container {
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

@media (min-width: 640px) {
  .site-header .container {
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }
}

.site-header::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 2 * max(1rem, env(safe-area-inset-left))), 80rem);
  bottom: 4px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--color-accent) 20%, var(--color-accent) 80%, transparent 100%);
  opacity: 0.6;
  pointer-events: none;
}

@media (min-width: 640px) {
  .site-header::after {
    width: min(calc(100% - 2 * max(1.5rem, env(safe-area-inset-left))), 80rem);
  }
}

.site-header .header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem 1.25rem;
  padding: 0.875rem 0;
  min-height: 3rem;
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-highlight);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  transition: color 0.2s ease;
  line-height: 1;
}

.site-header .logo:hover {
  text-shadow: 0 0 20px rgba(0, 245, 212, 0.25);
}

.site-header .logo:focus-visible {
  outline: none;
  border-radius: 2rem;
  box-shadow: 0 0 0 2px var(--color-accent);
}

/* Название YouLinks в хедере — плавное переливание */
.site-header .logo > span:last-child {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  background: linear-gradient(
    90deg,
    var(--color-highlight) 0%,
    var(--color-accent) 25%,
    var(--color-highlight) 50%,
    rgba(216, 178, 254, 0.95) 75%,
    var(--color-highlight) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: logoShimmer 4s linear infinite;
}

.site-header .logo:hover > span:last-child {
  animation-duration: 3s;
}

.site-header .logo-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  width: 1.75rem;
  height: 1.75rem;
  overflow: visible;
}

.site-header .logo-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.75rem;
  color: var(--color-accent);
  display: block;
  line-height: 1;
  border: none;
  outline: none;
  background: none;
  box-shadow: none;
  filter: none;
  transition: transform 0.25s ease;
}

.site-header .logo-icon-eye {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2em;
  color: rgba(13, 8, 24, 0.95);
  pointer-events: none;
  transition: opacity 0.25s ease;
  font-style: normal;
  display: block;
  text-align: center;
}

.site-header .logo:hover .logo-icon {
  transform: translate(-50%, -50%) scale(1.08);
}

.site-header .logo:hover .logo-icon-wrap .logo-icon-eye {
  opacity: 1;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  border-top: 1px solid rgba(216, 178, 254, 0.08);
  padding: 0.375rem 0 0.625rem;
  width: 100%;
  order: 10;
  margin-top: 0;
}

@media (min-width: 768px) {
  .header-nav {
    width: auto;
    order: 0;
    margin-left: auto;
    border-top: none;
    padding: 0.5rem 0;
    margin-top: 0;
  }
}

.header-nav a {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--premium-muted-light);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: color 0.25s ease, background 0.25s ease;
}

.header-nav a:hover {
  color: var(--color-highlight);
  background: rgba(255, 255, 255, 0.05);
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem 0.75rem;
  margin-left: auto;
}

.header-actions a,
.header-actions button {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: 0.5rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  color: var(--premium-muted-light);
  white-space: nowrap;
}

.header-actions a:hover,
.header-actions button:hover {
  background: rgba(125, 87, 191, 0.1);
  color: var(--color-highlight);
}

.header-actions .btn-register {
  position: relative;
  overflow: hidden;
  font-weight: 600;
  background: var(--gradient-accent);
  color: var(--color-base);
  box-shadow: var(--shadow-btn-primary);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.header-actions .btn-register::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.25) 45%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 55%
  );
  transform: translateX(-100%) skewX(-12deg);
  pointer-events: none;
}

.header-actions .btn-register:hover::after {
  /* анимация отключена — переливание только у логотипа */
  animation: none;
}

.header-actions .btn-register:hover {
  box-shadow: var(--shadow-btn-primary-hover);
  animation: none;
}

.header-actions .btn-register:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-base), 0 0 0 4px var(--color-accent);
}

/* Кнопка бургер-меню (только на мобильных) */
.header-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--premium-border-light);
  border-radius: 0.5rem;
  color: var(--color-highlight);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.header-burger:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 245, 212, 0.3);
}

.header-burger:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-accent);
}

.header-burger-line {
  display: block;
  width: 1.125rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-header.has-menu-open .header-burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.has-menu-open .header-burger-line:nth-child(2) {
  opacity: 0;
}

.site-header.has-menu-open .header-burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 767px) {
  .header-burger {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    margin-left: auto;
  }

  .site-header .header-inner {
    position: relative;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  /* Спейсер слева той же ширины, что и бургер — чтобы центр был визуально по центру */
  .site-header .header-inner::before {
    content: "";
    display: block;
    width: 44px;
    min-width: 44px;
    flex-shrink: 0;
  }

  .site-header .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .header-actions,
  .header-nav {
    display: none;
    width: 100%;
  }

  .header-nav {
    order: 9;
  }

  .header-actions {
    order: 10;
  }

  /* Логотип остаётся на той же высоте, что при закрытом меню (не поднимается) */
  .site-header.has-menu-open .logo {
    top: 1.25rem;
    transform: translateX(-50%) translateY(0);
  }

  /* Убираем зазор между первой строкой и меню, чтобы nav не «прыгал» */
  .site-header.has-menu-open .header-inner {
    gap: 0 1.25rem;
  }

  .site-header.has-menu-open .header-actions,
  .site-header.has-menu-open .header-nav {
    display: flex;
  }

  .site-header.has-menu-open .header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.375rem;
    padding: 0.375rem 0 0.5rem;
    padding-left: 0;
    padding-right: 0;
    border-top: 1px solid rgba(216, 178, 254, 0.1);
  }

  .site-header.has-menu-open .header-actions a,
  .site-header.has-menu-open .header-actions button {
    padding: 0.75rem 1rem;
    text-align: left;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border-radius: 0.5rem;
  }

  .site-header.has-menu-open .header-nav {
    flex-direction: column;
    align-items: stretch;
    border-top: 1px solid rgba(216, 178, 254, 0.08);
    padding: 0;
    margin: 0;
  }

  .site-header.has-menu-open .header-nav a {
    padding: 0.75rem 1rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    border-radius: 0.5rem;
  }

  /* Нижний блок (Реклама / Админка, Профиль, Выход) — выравнивание по левому краю */
  .site-header.has-menu-open .header-actions .header-advert-wrap,
  .site-header.has-menu-open .header-actions #header-auth {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
  }

  .site-header.has-menu-open .header-actions .header-advert-wrap button,
  .site-header.has-menu-open .header-actions #header-auth a,
  .site-header.has-menu-open .header-actions #header-auth button {
    margin: 0;
  }
}

@media (min-width: 768px) {
  .header-burger {
    display: none;
  }
}

/* Main */
main {
  position: relative;
  padding: 2rem 0;
  min-height: 60vh;
  animation: pageFadeIn 0.6s ease-out;
}

main a:not(.btn):not(.card):not(.project-card):not(.category-card):not(.banner-card) {
  position: relative;
  color: var(--premium-muted-light);
  text-decoration: none;
  transition: color var(--transition-smooth), box-shadow 0.2s ease;
}

main a:not(.btn):not(.card):not(.project-card):not(.category-card):not(.banner-card)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

main a:not(.btn):not(.card):not(.project-card):not(.category-card):not(.banner-card):hover {
  color: var(--color-accent);
}

main a:not(.btn):not(.card):not(.project-card):not(.category-card):not(.banner-card):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (min-width: 640px) {
  main {
    padding: 3rem 0;
  }
}

/* Footer */
.site-footer {
  position: relative;
  margin-top: 4rem;
  border-top: 1px solid rgba(216, 178, 254, 0.08);
  background: linear-gradient(180deg, rgba(13, 8, 24, 0.97) 0%, rgba(8, 5, 18, 0.98) 100%);
  backdrop-filter: blur(24px);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

.site-footer .container {
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

@media (min-width: 640px) {
  .site-footer .container {
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }
}

.footer-accent-line {
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-accent) 20%,
    var(--color-accent2) 50%,
    var(--color-accent) 80%,
    transparent 100%
  );
  opacity: 0.7;
}

.site-footer .footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2.5rem;
  padding: 2.5rem 0 2rem;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}

.footer-brand {
  flex-shrink: 0;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.2s ease;
}

.footer-logo-text {
  background: linear-gradient(
    90deg,
    var(--premium-muted-light) 0%,
    var(--color-accent) 30%,
    var(--premium-muted-light) 55%,
    rgba(216, 178, 254, 0.95) 80%,
    var(--premium-muted-light) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: logoShimmer 4s linear infinite;
}

.footer-logo-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  width: 1.5rem;
  height: 1.5rem;
  overflow: visible;
}

.footer-logo-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  color: var(--color-accent);
  display: block;
  line-height: 1;
  border: none;
  outline: none;
  background: none;
  -webkit-text-fill-color: initial;
  box-shadow: none;
}

.footer-logo-icon-eye {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.9em;
  color: rgba(13, 8, 24, 0.95);
  pointer-events: none;
  font-style: normal;
  display: block;
  line-height: 1;
  text-align: center;
}

.footer-logo:hover {
  opacity: 0.95;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-tagline {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: var(--premium-muted);
  line-height: 1.4;
  max-width: 14rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 10rem;
}

.footer-nav-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--premium-muted);
  margin-bottom: 0.25rem;
  opacity: 0.85;
}

.site-footer .footer-link {
  color: var(--premium-muted-light);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.2s ease, transform 0.15s ease;
}

.site-footer .footer-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer .footer-link:focus-visible {
  outline: none;
  color: var(--color-highlight);
  text-decoration: underline;
}

.footer-link--btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
  color: var(--premium-muted-light);
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}

.footer-link--btn:hover {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-link--btn:focus-visible {
  outline: none;
  color: var(--color-highlight);
  text-decoration: underline;
}

.footer-bottom {
  padding: 1.25rem 0;
  border-top: 1px solid rgba(216, 178, 254, 0.06);
}

.footer-copy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--premium-muted);
  opacity: 0.8;
}

/* About page */
.about-page {
  max-width: 52rem;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.about-header {
  margin-bottom: 2.5rem;
}

.about-title {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--premium-muted-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.about-lead {
  font-size: 1.125rem;
  color: var(--premium-muted-light);
  line-height: 1.5;
  margin: 0;
}

.about-block {
  background: var(--gradient-card);
  border: 1px solid var(--premium-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
}

.about-block h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--color-highlight);
}

.about-block p {
  margin: 0 0 0.75rem 0;
  line-height: 1.6;
  color: var(--premium-muted-light);
}

.about-block p:last-child {
  margin-bottom: 0;
}

.about-list {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--premium-muted-light);
  line-height: 1.65;
}

.about-list li {
  margin-bottom: 0.75rem;
}

.about-list li:last-child {
  margin-bottom: 0;
}

.about-block--cta {
  border-color: var(--premium-border-light);
  background: linear-gradient(145deg, rgba(26, 21, 53, 0.95) 0%, rgba(0, 245, 212, 0.04) 100%);
}

.about-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.about-actions .btn {
  margin: 0;
}

@media (min-width: 640px) {
  .about-title {
    font-size: 2.25rem;
  }
}

@media (max-width: 767px) {
  .footer-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .about-block {
    padding: 1.25rem 1.5rem;
  }

  .about-actions {
    flex-direction: column;
  }

  .about-actions .btn {
    width: 100%;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-base), 0 0 0 4px var(--color-accent);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--gradient-accent);
  color: var(--color-base);
  font-weight: 600;
  box-shadow: var(--shadow-btn-primary);
  animation: glowPulse 3s ease-in-out infinite;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.25) 45%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 55%
  );
  transform: translateX(-100%) skewX(-12deg);
  pointer-events: none;
}

.btn-primary:hover:not(:disabled)::after {
  animation: shine 0.6s ease-out;
}

.btn-primary:hover:not(:disabled) {
  box-shadow: var(--shadow-btn-primary-hover);
  animation: none;
}

.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-secondary {
  background: var(--premium-surface);
  color: var(--color-highlight);
  border: 1px solid var(--premium-border-light);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--premium-surface-hover);
  border-color: rgba(0, 245, 212, 0.35);
}

.btn-secondary:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-danger {
  background: var(--premium-danger);
  color: var(--color-highlight);
}

/* Страницы ошибок 401 / 404 */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.error-page .error-card {
  max-width: 28rem;
  width: 100%;
  text-align: center;
}

.error-page .error-card-body {
  padding: 2rem 1.5rem;
}

@media (min-width: 640px) {
  .error-page .error-card-body {
    padding: 2.5rem 2rem;
  }
}

.error-page .error-code {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-muted);
  margin: 0 0 0.5rem 0;
  opacity: 0.6;
}

@media (min-width: 480px) {
  .error-page .error-code {
    font-size: 4rem;
  }
}

.error-page .error-message {
  color: var(--premium-muted-light);
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
  font-size: 0.9375rem;
}

.error-page .error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.error-page .error-actions .btn {
  min-width: 10rem;
}

/* Forms */
.input,
.input-premium,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="date"],
input[type="checkbox"],
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--color-highlight);
  background: var(--premium-surface);
  border: 1px solid var(--premium-border-light);
  border-radius: 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="checkbox"].input {
  width: auto;
  min-width: 1.25rem;
  min-height: 1.25rem;
}

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

.input:focus,
.input-premium:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(0, 245, 212, 0.3);
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--premium-muted-light);
  margin-bottom: 0.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

/* Cards */
.card {
  border-radius: 1rem;
  background: var(--gradient-card);
  border: 1px solid var(--premium-border-light);
  border-left: 3px solid transparent;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  transition-property: transform, box-shadow, border-color, border-left-color;
}

.card:hover {
  border-color: rgba(0, 245, 212, 0.25);
  border-left-color: var(--color-accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.card-body {
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .card-body {
    padding: 2rem;
  }
}

/* Страницы входа и регистрации */
.auth-page {
  padding-bottom: 3rem;
}

.auth-card {
  padding: 1.5rem 1.25rem;
}

@media (min-width: 640px) {
  .auth-card {
    padding: 2rem 2.5rem;
  }
}

.auth-card h1 {
  margin-bottom: 0.25rem;
}

.auth-card .text-muted.mb-8 {
  margin-bottom: 1.5rem;
}

.auth-card .form-group {
  margin-bottom: 1.25rem;
}

.auth-card .captcha-block {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}

.auth-card .btn.btn-primary.w-full {
  margin-top: 0.5rem;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

.auth-card .mt-8.text-center {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--premium-border);
}

.auth-card .mt-8.text-center a {
  font-weight: 500;
}

/* Личный кабинет */
.profile-page {
  padding-bottom: 2rem;
}

.profile-page h1 {
  margin-bottom: 0.25rem;
}

.profile-page > p.text-muted {
  margin-bottom: 2rem;
}

.profile-page > section.mb-12 {
  margin-bottom: 2.5rem;
}

.profile-page > section.mb-12 h2 {
  margin-bottom: 1rem;
}

.profile-form-card {
  padding: 1.5rem 1.25rem;
}

@media (min-width: 640px) {
  .profile-form-card {
    padding: 2rem 2.5rem;
  }
}

.profile-form-card h2 {
  margin-bottom: 1.5rem;
}

.profile-form-card .form-group {
  margin-bottom: 1.25rem;
}

/* Кнопка «+ Ссылка» в форме профиля — вид как у ссылки с отступами и акцентом */
.profile-add-link-btn {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
  background: transparent;
  border: 1px solid rgba(0, 245, 212, 0.4);
  border-radius: 0.5rem;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.profile-add-link-btn:hover,
.profile-add-link-btn:focus {
  color: var(--color-highlight);
  background: rgba(0, 245, 212, 0.08);
  border-color: var(--color-accent);
  outline: none;
}

.profile-form-card .flex.flex-wrap.gap-2 {
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.profile-form-card .flex.flex-wrap.gap-2 .btn {
  min-height: 44px;
}

/* Project card */
.project-card {
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: var(--transition-smooth);
  transition-property: transform, box-shadow, border-color, border-left-color;
  background: var(--gradient-card);
  border: 1px solid var(--premium-border-light);
  border-left: 3px solid transparent;
  box-shadow: var(--shadow-card);
}

.project-card:hover {
  transform: translateY(-8px) scale(1.01);
  border-color: rgba(0, 245, 212, 0.35);
  border-left-color: var(--color-accent);
  box-shadow: var(--shadow-card-hover);
}

.project-card.top,
.project-card.vip {
  border-width: 2px;
  border-color: rgba(0, 245, 212, 0.45);
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 245, 212, 0.3), 0 0 24px -4px rgba(0, 245, 212, 0.2);
  animation: topCardGlow 2.5s ease-in-out infinite;
}

.project-card.top:hover,
.project-card.vip:hover {
  animation-play-state: paused;
  opacity: 1;
  box-shadow: var(--shadow-card-hover);
}

/* VIP-значок: звезда в том же стиле, что и топ (коронка) */
.project-card .card-image .badge-vip {
  background: rgba(13, 8, 24, 0.92);
  color: var(--color-accent);
  border: 1px solid rgba(0, 245, 212, 0.5);
  box-shadow: 0 0 12px -2px rgba(0, 245, 212, 0.25);
}
.project-card .card-image .badge-vip i {
  font-size: 1rem;
}

.project-card .card-image {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.project-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease-out;
}

.project-card:hover .card-image img {
  transform: scale(1.1);
}

.project-card .card-image .badge-top {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-base);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-btn-primary);
}

/* У топ-карточек иконки в цвет анимации (бирюзовый glow) */
.project-card.top .card-image .badge-top {
  background: rgba(13, 8, 24, 0.92);
  color: var(--color-accent);
  border: 1px solid rgba(0, 245, 212, 0.5);
  box-shadow: 0 0 12px -2px rgba(0, 245, 212, 0.25);
}

.project-card.top .card-actions a,
.project-card.vip .card-actions a {
  color: var(--color-accent);
}

.project-card.top .card-actions a:hover,
.project-card.vip .card-actions a:hover {
  background: rgba(0, 245, 212, 0.18);
  color: var(--color-accent);
}

.project-card .card-content {
  padding: 1rem;
  flex: 1;
}

.project-card .card-title {
  font-weight: 600;
  color: var(--color-highlight);
  margin: 0 0 0.25rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card .card-title-link {
  color: inherit;
  text-decoration: none;
}

.project-card .card-title-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.project-card .card-category {
  font-size: 0.75rem;
  color: var(--premium-muted);
}

.project-card .card-actions {
  padding: 0 1rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.project-card .card-actions a {
  flex: 1;
  min-width: 0;
  height: 2.25rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--premium-muted-light);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s;
}

.project-card .card-actions a i {
  font-size: 1rem;
}

.project-card .card-actions a:hover {
  background: rgba(0, 245, 212, 0.12);
  color: var(--color-accent);
}

.project-card .card-actions a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-accent);
}

/* Одна кнопка на всю ширину карточки (только onion или только clear) */
.project-card .card-actions a.card-link-btn-full {
  flex: 1 1 100%;
  width: 100%;
}

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1280px) {
  .category-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}

.category-grid .category-card {
  opacity: 0;
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.category-grid .category-card:nth-child(1) { animation-delay: 0.02s; }
.category-grid .category-card:nth-child(2) { animation-delay: 0.06s; }
.category-grid .category-card:nth-child(3) { animation-delay: 0.1s; }
.category-grid .category-card:nth-child(4) { animation-delay: 0.14s; }
.category-grid .category-card:nth-child(5) { animation-delay: 0.18s; }
.category-grid .category-card:nth-child(6) { animation-delay: 0.22s; }
.category-grid .category-card:nth-child(7) { animation-delay: 0.26s; }
.category-grid .category-card:nth-child(8) { animation-delay: 0.3s; }
.category-grid .category-card:nth-child(n+9) { animation-delay: 0.34s; }

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  border-radius: 1rem;
  background: var(--gradient-card);
  border: 1px solid var(--premium-border-light);
  border-left: 3px solid transparent;
  text-decoration: none;
  color: var(--color-highlight);
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  transition-property: transform, box-shadow, border-color, border-left-color, background;
}

.category-card:hover {
  border-color: rgba(0, 245, 212, 0.35);
  border-left-color: var(--color-accent);
  background: var(--premium-surface-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-6px);
}

.category-card .icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: rgba(216, 178, 254, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  transition: transform 0.3s ease, background 0.3s ease;
}

.category-card:hover .icon {
  background: rgba(0, 245, 212, 0.2);
  transform: scale(1.1);
}

.category-card span {
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  transition: color 0.2s ease;
}

.category-card:hover span {
  color: var(--color-highlight);
}

.category-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-highlight);
}

/* Текст по центру плейсхолдера баннера — те же стили, что были у нижней подписи */
.banner-card .banner-placeholder,
.banner-card--skeleton .banner-placeholder {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-highlight);
  letter-spacing: 0.02em;
}

/* Banner grid: пропорции 540×380 (гифки загружаются 540×380), отображение адаптивное */
.banner-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .banner-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .banner-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.banner-card {
  position: relative;
  display: block;
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--premium-surface);
  border: 1px solid var(--premium-border-light);
  border-left: 3px solid transparent;
  width: 100%;
  aspect-ratio: 540 / 380;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  transition-property: transform, box-shadow, border-color, border-left-color;
  text-decoration: none;
  color: inherit;
}

.banner-card--skeleton {
  position: relative;
  width: 100%;
  aspect-ratio: 540 / 380;
}

.banner-card:hover {
  border-color: rgba(0, 245, 212, 0.35);
  border-left-color: var(--color-accent);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-6px);
}

.banner-card .banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease-out;
}

.banner-card:hover .banner-img {
  transform: scale(1.1);
}

/* Кнопка «Купить» на баннере (только для авторизованных) */
.banner-card-wrap {
  position: relative;
  display: block;
}
.banner-card-wrap .banner-card {
  display: block;
}
.banner-buy-btn {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  z-index: 2;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--color-accent);
  color: var(--color-base);
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-btn-primary);
  transition: background 0.2s, transform 0.2s;
}
.banner-buy-btn:hover {
  background: var(--premium-accent-hover);
  transform: translateY(-1px);
}

/* Кнопка «Реклама» в хедере */
.btn-header-advert {
  padding: 0.4rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-accent);
  background: transparent;
  border: 1px solid rgba(0, 245, 212, 0.4);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.btn-header-advert:hover {
  background: rgba(0, 245, 212, 0.1);
  border-color: var(--color-accent);
}

/* Модальное окно обращения (тикет) */
.ticket-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  padding-top: max(1rem, env(safe-area-inset-top));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ticket-modal.hidden {
  display: none !important;
}
.ticket-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}
.ticket-modal-box {
  position: relative;
  width: 100%;
  max-width: 28rem;
  max-height: min(90vh, 90dvh);
  overflow-y: auto;
  background: var(--color-surface);
  border: 1px solid var(--premium-border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  -webkit-overflow-scrolling: touch;
}
.ticket-modal-box--wide {
  max-width: 36rem;
}

@media (max-width: 767px) {
  .ticket-modal {
    align-items: flex-end;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .ticket-modal-box,
  .ticket-modal-box--wide {
    max-width: 100%;
    max-height: 85dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 1.25rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
    margin-top: auto;
  }

  .ticket-modal-title {
    font-size: 1.125rem;
    margin-bottom: 0.875rem;
  }

  .ticket-form .flex.gap-2.mt-4 {
    flex-direction: column;
    gap: 0.75rem;
  }

  .ticket-form .flex.gap-2.mt-4 .btn {
    width: 100%;
    min-height: 44px;
  }

  .ticket-modal-reply-bar .flex.gap-2.mt-3 {
    flex-direction: column;
  }

  .ticket-modal-reply-bar .flex.gap-2.mt-3 .btn {
    width: 100%;
    min-height: 44px;
  }

  .ticket-modal-box--scrollable {
    max-height: 80dvh;
  }

  .ticket-modal-box--scrollable .ticket-modal-body-scroll {
    min-height: 120px;
  }
}
.ticket-modal-box--scrollable {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ticket-modal-box--scrollable .ticket-modal-body-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
}
.ticket-modal-box--scrollable .ticket-modal-reply-bar {
  flex-shrink: 0;
}
.ticket-modal-title {
  margin: 0 0 1rem 0;
  font-size: 1.25rem;
}

/* Модальное окно подтверждения действия */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  padding-top: max(1rem, env(safe-area-inset-top));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.confirm-modal.hidden {
  display: none !important;
}
.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}
.confirm-modal-box {
  position: relative;
  width: 100%;
  max-width: 22rem;
  background: var(--color-surface);
  border: 1px solid var(--premium-border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card), 0 0 40px -10px rgba(0, 0, 0, 0.4);
  text-align: center;
}
.confirm-modal-icon-wrap {
  margin-bottom: 1rem;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--color-muted);
}
.confirm-modal.confirm-modal--danger .confirm-modal-icon-wrap {
  color: var(--premium-danger);
}
.confirm-modal-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-highlight);
}
.confirm-modal-message {
  margin: 0 0 1.25rem 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--color-muted);
}
.confirm-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.confirm-modal-actions .btn {
  min-width: 6rem;
}
.confirm-modal.confirm-modal--danger .confirm-modal-confirm-btn {
  background: var(--premium-danger);
  color: var(--color-highlight);
  border-color: var(--premium-danger);
}
.confirm-modal.confirm-modal--danger .confirm-modal-confirm-btn:hover,
.confirm-modal.confirm-modal--danger .confirm-modal-confirm-btn:focus {
  background: #f05a6e;
  border-color: #f05a6e;
  color: var(--color-highlight);
}

@media (max-width: 767px) {
  .confirm-modal-box {
    padding: 1.25rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  }
  .confirm-modal-actions {
    flex-direction: column;
  }
  .confirm-modal-actions .btn {
    width: 100%;
    min-height: 44px;
  }
}

.ticket-form .form-group {
  margin-bottom: 1rem;
}
.ticket-form .form-group label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
  color: var(--color-text);
}
.text-success {
  color: var(--premium-success);
}

.banner-placeholder-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-deep), var(--color-surface));
  color: var(--premium-muted-light);
  font-size: 0.875rem;
  padding: 1rem;
  text-align: center;
}

.banner-card .banner-placeholder,
.banner-card--skeleton .banner-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-deep), var(--color-surface));
  padding: 1rem;
  text-align: center;
}

.banner-card .banner-placeholder {
  min-height: 100%;
}

/* Плейсхолдер изображения в карточке проекта (без фона, крупный символ) */
.project-card .card-image .banner-placeholder-inner {
  background: transparent;
  font-size: 2rem;
  color: var(--premium-muted);
}

.search-result-link {
  text-decoration: none;
  color: inherit;
}

.search-result-link:hover {
  color: var(--color-highlight);
}

/* Страница проекта: блок фото|описание, затем Onion|Clear, затем Telegram */
.project-detail {
  padding: 0;
  overflow: hidden;
  border-radius: 1rem;
}

.project-detail-hero {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
}

@media (min-width: 768px) {
  .project-detail-hero {
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    padding: 1.5rem 2rem;
  }
}

.project-detail-photo {
  flex-shrink: 0;
  width: 100%;
  max-width: 11rem;
  aspect-ratio: 1;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--premium-border-light);
  background: var(--premium-surface);
}

@media (min-width: 768px) {
  .project-detail-photo {
    max-width: 13rem;
  }
}

.project-detail-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-detail-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--premium-muted);
}

.project-detail-desc {
  flex: 1;
  min-width: 0;
}

.project-detail-desc-inner {
  /* обёртка для ограничения высоты в свёрнутом виде */
  display: block;
}

.project-detail-desc--collapsible .project-detail-desc-inner {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-detail-desc--collapsible.project-detail-desc--expanded .project-detail-desc-inner {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
}

.project-detail-desc-toggle {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent);
  background: transparent;
  border: 1px solid rgba(0, 245, 212, 0.4);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.project-detail-desc-toggle:hover {
  background: rgba(0, 245, 212, 0.1);
}

.project-detail-desc-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-accent);
}

.project-detail-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .project-detail-heading {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
}

.project-detail-title {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-highlight);
  margin: 0;
  line-height: 1.3;
}

@media (min-width: 640px) {
  .project-detail-title {
    font-size: 1.75rem;
  }
}

.project-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-detail-vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-highlight);
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.35);
}

.project-detail-vip-badge i {
  color: var(--color-accent);
}

.project-detail-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(0, 245, 212, 0.12);
  border: 1px solid rgba(0, 245, 212, 0.35);
}

.project-detail-top-badge i {
  color: var(--color-accent);
}

.project-detail-desc-short {
  font-size: 1rem;
  color: var(--premium-muted-light);
  margin: 0 0 0.75rem 0;
  line-height: 1.55;
}

.project-detail-desc-full {
  font-size: 0.9375rem;
  color: var(--premium-muted-light);
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.6;
}

.project-detail-links-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 0 1.25rem 1.25rem;
}

@media (min-width: 640px) {
  .project-detail-links-row {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    padding: 0 1.5rem 1.5rem;
  }
}

@media (min-width: 768px) {
  .project-detail-links-row {
    padding: 0 2rem 1.5rem;
    gap: 1.5rem;
  }
}

.project-detail-telegram {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--premium-border-light);
  padding-top: 1.25rem;
}

@media (min-width: 768px) {
  .project-detail-telegram {
    padding: 0 2rem 1.5rem;
    padding-top: 1.5rem;
  }
}

.project-links-block {
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: rgba(13, 8, 24, 0.92);
  border: 1px solid var(--premium-border-light);
}

.project-links-block-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-highlight);
  margin: 0 0 0.75rem 0;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.project-links-block-title i {
  color: var(--color-accent);
  font-size: 1rem;
}

.project-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-link-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.project-link-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.project-link-row:first-child {
  padding-top: 0;
}

.project-link-btn {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.project-link-btn i {
  font-size: 1rem;
  opacity: 0.9;
}

.project-link-url {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.8125rem;
  color: var(--premium-muted-light);
  word-break: break-all;
  user-select: text;
  cursor: text;
}

.project-link-url-link {
  flex: 1;
  min-width: 0;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.8125rem;
  color: var(--color-accent);
  text-decoration: none;
  word-break: break-all;
}

.project-link-url-link:hover {
  text-decoration: underline;
}

.project-link-copy {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--premium-muted-light);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.project-link-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-highlight);
}

.project-link-copy i.fa-check {
  color: var(--color-accent);
}

/* Заголовок секции проектов на странице категории */
/* Главная страница */
.home-page {
  padding-bottom: 0.25rem;
}

.home-page .section-title {
  margin-bottom: 1.25rem;
}

.home-page #categories {
  padding-bottom: 0.5rem;
}

/* Страница категории */
.category-page {
  padding-bottom: 2rem;
}

.category-page .breadcrumb {
  margin-bottom: 1.5rem;
}

/* Блок «Похожие проекты» на странице проекта — ниже и компактнее */
.similar-projects {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.similar-projects-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--premium-muted-light);
  margin: 0 0 1.25rem 0;
}

/* Мобилка: 2 колонки — карточки крупнее по ширине */
.similar-projects .similar-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
}

@media (min-width: 640px) {
  .similar-projects .similar-projects-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 768px) {
  .similar-projects .similar-projects-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
  }
}

/* Если 3 или меньше проектов — центрируем по ширине блока */
.similar-projects .similar-projects-grid.similar-projects-grid--count-1,
.similar-projects .similar-projects-grid.similar-projects-grid--count-2,
.similar-projects .similar-projects-grid.similar-projects-grid--count-3 {
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Одна карточка — та же ширина, что и одна ячейка при нескольких (не растягивать) */
.similar-projects .similar-projects-grid.similar-projects-grid--count-1 {
  grid-template-columns: 1fr;
  max-width: calc((100% - 0.875rem) / 2);
}
@media (min-width: 640px) {
  .similar-projects .similar-projects-grid.similar-projects-grid--count-1 {
    max-width: calc((100% - 3rem) / 4);
  }
}
@media (min-width: 768px) {
  .similar-projects .similar-projects-grid.similar-projects-grid--count-1 {
    max-width: calc((100% - 5rem) / 5);
  }
}

.similar-projects .similar-projects-grid.similar-projects-grid--count-2 {
  grid-template-columns: repeat(2, 1fr);
}

.similar-projects .similar-projects-grid.similar-projects-grid--count-3 {
  grid-template-columns: repeat(3, 1fr);
}

.similar-projects .similar-projects-grid .project-card .card-image {
  aspect-ratio: 4 / 3;
}

.similar-projects .similar-projects-grid .project-card .card-content {
  padding: 0.75rem 1rem;
}

.similar-projects .similar-projects-grid .project-card .card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
}

@media (max-width: 639px) {
  .similar-projects .similar-projects-grid .project-card .card-content {
    padding: 0.875rem 0.75rem;
  }
  .similar-projects .similar-projects-grid .project-card .card-title {
    font-size: 1rem;
  }
  .similar-projects .similar-projects-grid .project-card .card-category {
    font-size: 0.8125rem;
  }
}

.similar-projects .similar-projects-grid .project-card .card-title-link {
  color: var(--color-highlight);
  text-decoration: none;
}

.similar-projects .similar-projects-grid .project-card .card-title-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.similar-projects .similar-projects-grid .project-card .card-category {
  font-size: 0.8125rem;
}

.similar-projects .similar-projects-grid .project-card .card-image .badge-top {
  width: 1.5rem;
  height: 1.5rem;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 0.5625rem;
}

.category-projects-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-highlight);
  margin: 0 0 1rem 0;
}

/* Search */
.search-wrap {
  position: relative;
}

.search-wrap--narrow {
  max-width: 28rem;
}

.search-wrap .search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--premium-muted);
  pointer-events: none;
}

.search-wrap input {
  padding-left: 2.5rem;
}

@media (max-width: 767px) {
  .search-wrap input {
    min-height: 44px;
    font-size: 16px;
  }

  .input-premium,
  .auth-card input[type="text"],
  .auth-card input[type="email"],
  .auth-card input[type="password"],
  .profile-form-card input,
  .profile-form-card select,
  .profile-form-card textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .profile-form-card textarea {
    min-height: 100px;
  }
}

/* Sections */
.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.section-title h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-highlight);
  margin: 0;
  letter-spacing: 0.03em;
}

.section-title .line {
  flex: 1;
  max-width: 8rem;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  border-radius: 9999px;
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.4);
  animation: lineGlow 2.5s ease-in-out infinite;
}

/* Заголовок страницы (H1) */
.page-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-highlight);
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.03em;
}
.page-title--hero {
  margin-bottom: 0.25rem;
}
@media (min-width: 768px) {
  .page-title { font-size: 2rem; }
}

/* Hero / intro text */
.hero-desc {
  font-size: 1.125rem;
  max-width: 42rem;
  color: var(--premium-muted-light);
  line-height: 1.65;
  letter-spacing: 0.01em;
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.projects-grid .project-card {
  opacity: 0;
  animation: slideUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.projects-grid .project-card:nth-child(1) { animation-delay: 0.03s; }
.projects-grid .project-card:nth-child(2) { animation-delay: 0.08s; }
.projects-grid .project-card:nth-child(3) { animation-delay: 0.13s; }
.projects-grid .project-card:nth-child(4) { animation-delay: 0.18s; }
.projects-grid .project-card:nth-child(5) { animation-delay: 0.23s; }
.projects-grid .project-card:nth-child(6) { animation-delay: 0.28s; }
.projects-grid .project-card:nth-child(7) { animation-delay: 0.33s; }
.projects-grid .project-card:nth-child(8) { animation-delay: 0.38s; }
.projects-grid .project-card:nth-child(9) { animation-delay: 0.43s; }
.projects-grid .project-card:nth-child(10) { animation-delay: 0.48s; }
.projects-grid .project-card:nth-child(11) { animation-delay: 0.53s; }
.projects-grid .project-card:nth-child(12) { animation-delay: 0.58s; }
.projects-grid .project-card:nth-child(n+13) { animation-delay: 0.63s; }

@media (min-width: 640px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Раздел VIP: на телефонах по 2 в ряд, с 640px — 5 в ряд */
#top-projects {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) {
  #top-projects {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Category page — карточки как в примере: 2–4 в ряд, аккуратный размер */
.category-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .category-projects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .category-projects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media (min-width: 1280px) {
  .category-projects-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Карточки в категории — читаемый размер, картинка 4:3 как в примере */
.category-projects-grid .project-card {
  border-radius: 0.75rem;
}

.category-projects-grid .project-card .card-image {
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
}

.category-projects-grid .project-card .card-image img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.category-projects-grid .project-card .card-content {
  padding: 0.75rem 1rem;
}

.category-projects-grid .project-card .card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.category-projects-grid .project-card .card-title-link {
  color: inherit;
  text-decoration: none;
}

.category-projects-grid .project-card .card-title-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.category-projects-grid .project-card .card-category {
  font-size: 0.8125rem;
  color: var(--premium-muted-light);
}

.category-projects-grid .project-card .card-actions {
  padding: 0 1rem 0.75rem;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.category-projects-grid .project-card .card-actions a {
  flex: 1;
  min-width: 0;
  height: 2rem;
  border-radius: 0.5rem;
}

.category-projects-grid .project-card .card-actions a i {
  font-size: 0.875rem;
}

.category-projects-grid .project-card .card-actions a.card-link-btn-full {
  flex: 1 1 100%;
  width: 100%;
}

.category-projects-grid .project-card .card-image .badge-top {
  width: 1.75rem;
  height: 1.75rem;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 0.625rem;
}

.category-projects-grid .project-card.top .card-image .badge-top,
.category-projects-grid .project-card .card-image .badge-vip {
  background: rgba(13, 8, 24, 0.92);
  color: var(--color-accent);
  border: 1px solid rgba(0, 245, 212, 0.5);
  box-shadow: 0 0 10px -2px rgba(0, 245, 212, 0.25);
}

.category-projects-grid .project-card .card-image .badge-vip i {
  font-size: 0.75rem;
}

.category-projects-grid .project-card.top .card-actions a,
.category-projects-grid .project-card.vip .card-actions a {
  color: var(--color-accent);
}

.category-projects-grid .project-card.top .card-actions a:hover,
.category-projects-grid .project-card.vip .card-actions a:hover {
  background: rgba(0, 245, 212, 0.18);
  color: var(--color-accent);
}

/* Pagination */
.pagination {
  display: none;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.pagination.pagination--visible {
  display: flex;
}

.pagination .btn {
  min-width: 2.5rem;
}

/* Состояния загрузки и пустые состояния страницы проекта */
.project-loading-state {
  padding: 3rem 1rem;
  min-height: 12rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-loading-state p {
  margin: 0;
  font-size: 1rem;
}

#project-content.project-loaded {
  display: block;
  padding: 0;
  min-height: 0;
}

.project-empty-state {
  padding: 2rem 0;
}

.project-empty-card {
  max-width: 24rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
}

.project-empty-card p {
  margin: 0;
  line-height: 1.5;
}

.project-empty-card .btn.mt-4 {
  margin-top: 1rem;
}

/* Alerts */
.alert {
  padding: 0.875rem 1.125rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--premium-danger);
}

.alert-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--premium-success);
}

/* Профиль: уведомления об одобрении/отклонении заявок */
.profile-notifications {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-notification {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  line-height: 1.45;
  background: var(--gradient-card);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--premium-border);
  transition: box-shadow var(--transition-smooth), opacity var(--transition-smooth);
}

.profile-notification:hover {
  box-shadow: var(--shadow-card-hover);
}

.profile-notification--approved {
  border-left: 4px solid var(--premium-success);
}

.profile-notification--approved .profile-notification-text {
  color: var(--color-text);
}

.profile-notification--rejected {
  border-left: 4px solid var(--premium-danger);
}

.profile-notification--rejected .profile-notification-text {
  color: var(--color-text);
}

.profile-notification-text {
  flex: 1;
  min-width: 0;
}

.profile-notification-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-muted);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.profile-notification-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--color-text);
}

.profile-notification-close:focus-visible {
  outline: 2px solid var(--premium-accent);
  outline-offset: 2px;
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up:nth-child(1) { animation-delay: 0s; }
.animate-slide-up:nth-child(2) { animation-delay: 0.08s; }
.animate-slide-up:nth-child(3) { animation-delay: 0.16s; }
.animate-slide-up:nth-child(4) { animation-delay: 0.24s; }
.animate-slide-up:nth-child(5) { animation-delay: 0.32s; }
.animate-slide-up:nth-child(6) { animation-delay: 0.4s; }

.animate-scale-in {
  animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.8125rem;
  color: var(--premium-muted);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--premium-muted);
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}

.breadcrumb a:hover {
  color: var(--color-highlight);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.breadcrumb span {
  color: var(--premium-muted);
}

.breadcrumb .breadcrumb-sep {
  pointer-events: none;
  user-select: none;
}

/* Admin nav */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.admin-nav a {
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  background: var(--premium-surface);
  border: 1px solid var(--premium-border);
  color: var(--premium-muted-light);
  text-decoration: none;
  font-size: 0.875rem;
}

.admin-nav a:hover {
  color: var(--color-highlight);
  border-color: var(--premium-border-light);
}

.admin-nav a.active {
  color: var(--color-highlight);
  font-weight: 500;
  border-color: var(--premium-border-light);
}

/* Admin page: блоки и контейнеры */
.admin-page {
  padding-bottom: 2rem;
}

.admin-page h1 {
  margin-bottom: 1.5rem;
}

.admin-page .card {
  overflow: hidden;
}

.admin-page .card.p-4 {
  padding: 1.25rem;
}

.admin-page .overflow-x-auto {
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  -webkit-overflow-scrolling: touch;
  overflow-x: auto;
  overflow-y: visible;
}

.admin-page .overflow-x-auto table {
  min-width: 600px;
}

@media (max-width: 767px) {
  .admin-page .overflow-x-auto {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .admin-page #visits-filters,
  .admin-page #project-views-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .admin-page #visits-filters .btn,
  .admin-page #project-views-filters .btn {
    min-height: 44px;
  }

  .admin-page #visits-stats-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-page #visits-stats-table-wrap table {
    min-width: 280px;
  }

  .admin-page .input:not([type="checkbox"]) {
    min-height: 44px;
    font-size: 16px;
  }
}

.admin-page table th,
.admin-page table td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  vertical-align: top;
}

.admin-page table th {
  white-space: nowrap;
  font-size: 0.8125rem;
}

.admin-page table td {
  font-size: 0.875rem;
}

/* Фильтры в админке: форма в одну колонку на узком экране */
.admin-page form.flex.flex-wrap {
  gap: 0.75rem;
}

.admin-page form.flex label {
  min-width: 0;
}

.admin-page form.flex .input,
.admin-page form.flex input,
.admin-page form.flex select {
  min-width: 0;
  width: 100%;
}

/* Страница «Права»: карточка и отступы */
.admin-permissions-card {
  padding: 1.75rem 1.5rem;
}

@media (min-width: 640px) {
  .admin-permissions-card {
    padding: 2rem 2rem;
  }
}

.admin-permissions-card-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.admin-permissions-field {
  margin-bottom: 1.25rem;
}

.admin-permissions-label-top {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-highlight);
  margin-bottom: 0.5rem;
}

.admin-permissions-user-info {
  font-size: 0.875rem;
  color: var(--premium-muted);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.admin-permissions-list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 1.25rem 0 1rem;
  margin-bottom: 0.5rem;
}

.admin-permissions-heading {
  margin: 0 0 0.875rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-highlight);
}

.admin-permissions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem 0.5rem 0;
  margin: 0;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.admin-permissions-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.admin-permissions-row .admin-perm-cb {
  width: auto;
  min-width: 1.25rem;
  min-height: 1.25rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.admin-permissions-label {
  font-size: 0.9375rem;
  color: var(--color-highlight);
  font-weight: 500;
}

.admin-permissions-actions {
  padding-top: 0.75rem;
}

.admin-permissions-actions .btn {
  min-height: 2.75rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

#admin-permissions-page .card select.input {
  max-width: 100%;
}

/* Сводка в админке: каждый показатель — отдельный блок */
.admin-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .admin-summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.admin-summary-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--premium-border);
}

.admin-summary-label {
  display: block;
  font-size: 0.875rem;
  color: var(--premium-muted);
  line-height: 1.3;
}

.admin-summary-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-highlight);
  margin: 0;
  line-height: 1.2;
}

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-card .value {
    font-size: 1.25rem;
  }
}

.stat-card {
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--gradient-card);
  border: 1px solid var(--premium-border);
  box-shadow: var(--shadow-card);
}

.stat-card .label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--premium-muted);
  margin-bottom: 0.25rem;
}

.stat-card .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-highlight);
}

.stat-card .value.gold {
  color: var(--color-highlight);
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.badge-approved {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--premium-success);
}

.badge-rejected {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--premium-danger);
}

/* Captcha block */
.captcha-block {
  margin-bottom: 1.25rem;
}

.captcha-block label {
  margin-bottom: 0.5rem;
}

.captcha-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: var(--premium-surface);
  border: 1px solid var(--premium-border);
}

.captcha-inner img {
  width: 160px;
  height: 60px;
  object-fit: contain;
  border-radius: 0.75rem;
  border: 1px solid var(--premium-border);
  background: var(--premium-charcoal);
}

.captcha-inner input {
  width: 10rem;
  max-width: 100%;
}

.captcha-refresh {
  font-size: 0.875rem;
  color: var(--premium-gold);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.captcha-refresh:hover {
  color: var(--premium-gold-dim);
}

.captcha-refresh:focus-visible {
  outline: none;
  color: var(--color-highlight);
}

.captcha-hint {
  margin-top: 0.375rem;
  font-size: 0.75rem;
  color: var(--premium-muted);
}

/* Gate page: крупная капча при входе на сайт */
.gate-page .gate-card {
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.gate-page .gate-title {
  text-align: center;
}

.gate-page .gate-captcha-block {
  margin-bottom: 1.5rem;
}

.gate-page .gate-captcha-block label,
.gate-page .gate-captcha-label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.gate-page .gate-captcha-inner {
  padding: 1.5rem;
  gap: 1rem;
}

.gate-page .gate-captcha-inner img.gate-captcha-img,
.gate-page .captcha-inner img {
  width: 320px;
  height: 120px;
  max-width: 100%;
  object-fit: contain;
}

.gate-page .gate-captcha-input,
.gate-page .captcha-inner input[name="captcha_answer"] {
  width: 14rem;
  max-width: 100%;
  font-size: 1.25rem;
  padding: 0.75rem 1rem;
}

.gate-page .gate-captcha-refresh,
.gate-page .captcha-refresh {
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
}

.gate-page .captcha-hint {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Max width for forms */
.max-w-form {
  max-width: 32rem;
}

/* Utility */
.text-muted {
  color: var(--premium-muted);
}

.text-muted-light {
  color: var(--premium-muted-light);
}

.whitespace-pre-wrap {
  white-space: pre-wrap;
}

.text-danger {
  color: var(--premium-danger);
}

.mb-0 {
  margin-bottom: 0;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.justify-between {
  justify-content: space-between;
}

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

.gap-2 {
  gap: 0.5rem;
}

.gap-8 {
  gap: 2rem;
}

.mr-2 {
  margin-right: 0.5rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.p-5 {
  padding: 1.25rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Visibility utilities (CSP: no inline style) */
.hidden {
  display: none !important;
}

.invisible {
  visibility: hidden;
}

.block {
  display: block;
}

/* Layout / typography utilities */
.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: 1.875rem;
}

.text-sm {
  font-size: 0.875rem;
}

.text-white {
  color: var(--color-highlight);
}

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

.w-full {
  width: 100%;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.p-8 {
  padding: 2rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mb-10 {
  margin-bottom: 2.5rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.pb-4 {
  padding-bottom: 1rem;
}

.text-premium-gold {
  color: var(--color-highlight);
}

.text-premium-gold:hover {
  color: var(--premium-gold-dim);
}

/* ——— Адаптив: мобильные и планшеты ——— */

/* Очень маленькие экраны: меньше отступы */
@media (max-width: 479px) {
  .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  main {
    padding: 1.25rem 0;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .page-title--hero {
    font-size: 1.375rem;
  }

  .section-title h2 {
    font-size: 1.25rem;
  }

  .hero-desc {
    font-size: 1rem;
    line-height: 1.5;
  }
}

/* === Адаптив для телефонов: каждая страница === */

/* Телефоны и планшеты (до 767px) */
@media (max-width: 767px) {
  /* Главная */
  .home-page {
    padding-bottom: 0.5rem;
  }

  .home-page .mb-6 {
    margin-bottom: 1.5rem;
  }

  .home-page .mb-10 {
    margin-bottom: 2rem;
  }

  .home-page .mb-12 {
    margin-bottom: 2rem;
  }

  .home-page .search-wrap {
    margin-bottom: 1rem;
  }

  .home-page #search-results {
    margin-bottom: 1rem;
  }

  .banner-grid {
    gap: 0.875rem;
  }

  .banner-card,
  .banner-card--skeleton {
    min-height: 140px;
  }

  /* Категория */
  .category-page .breadcrumb {
    margin-bottom: 1.25rem;
  }

  .category-page .category-banners.mb-10 {
    margin-bottom: 1.5rem;
  }

  .category-projects-title {
    font-size: 1.125rem;
    margin-bottom: 0.875rem;
  }

  .category-projects-grid {
    gap: 0.875rem;
  }

  .category-page .pagination {
    margin-top: 1.5rem;
  }

  /* Проект: загрузка и пустое состояние */
  .project-loading-state {
    padding: 2rem 0.75rem;
    min-height: 10rem;
  }

  .project-loading-state p {
    font-size: 0.9375rem;
  }

  .project-empty-state {
    padding: 1.5rem 0;
  }

  .project-empty-card {
    padding: 1.5rem 1rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }

  .project-empty-card .btn.mt-4 {
    margin-top: 0.875rem;
  }

  /* Страницы ошибок */
  .error-page {
    padding: 1.5rem 0.75rem;
    min-height: 50vh;
  }

  .error-page .error-actions {
    margin-top: 1.25rem;
    gap: 0.5rem;
  }

  .error-page .error-actions .btn {
    min-width: 8.5rem;
    padding: 0.625rem 1rem;
  }

  /* Вход / Регистрация */
  .auth-page {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }

  .auth-page .max-w-form {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  /* Профиль */
  .profile-page > p.text-muted {
    margin-bottom: 1.5rem;
  }

  .profile-page > section.mb-12 {
    margin-bottom: 2rem;
  }

  .profile-page > section.mb-12 h2 {
    margin-bottom: 0.875rem;
  }
}

/* Телефоны (до 480px) */
@media (max-width: 480px) {
  /* Главная */
  .home-page .page-title--hero {
    font-size: 1.25rem;
  }

  .home-page .hero-desc {
    font-size: 0.9375rem;
  }

  .home-page .section-title {
    margin-bottom: 1rem;
  }

  .home-page .text-muted.mb-4 {
    margin-bottom: 0.75rem;
  }

  .banner-grid {
    gap: 0.75rem;
  }

  .banner-card,
  .banner-card--skeleton {
    min-height: 120px;
  }

  /* Категория */
  .category-page {
    padding-bottom: 1.5rem;
  }

  .category-page .breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.75rem;
  }

  .category-projects-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }

  .category-projects-grid {
    gap: 0.75rem;
  }

  /* Проект */
  .project-loading-state {
    padding: 1.5rem 0.5rem;
    min-height: 8rem;
  }

  .project-empty-state {
    padding: 1.25rem 0;
  }

  .project-empty-card {
    padding: 1.25rem 1rem;
    max-width: 100%;
  }

  /* Ошибки 404/401 */
  .error-page {
    padding: 1.25rem 0.5rem;
  }

  .error-page .error-card-body {
    padding: 1.5rem 1rem;
  }

  .error-page .error-code {
    font-size: 2.5rem;
  }

  .error-page .error-message {
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
  }

  .error-page .error-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .error-page .error-actions .btn {
    min-width: 0;
    width: 100%;
  }

  /* Вход / Регистрация */
  .auth-page {
    padding-top: 1rem;
    padding-bottom: 1.5rem;
  }

  .auth-card h1 {
    font-size: 1.375rem;
  }

  .auth-card .text-muted.mb-8 {
    margin-bottom: 1.25rem;
  }

  .auth-card .form-group {
    margin-bottom: 1rem;
  }

  .auth-card .mt-8.text-center {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
  }

  /* Профиль */
  .profile-page h1 {
    font-size: 1.375rem;
  }

  .profile-page > p.text-muted {
    margin-bottom: 1.25rem;
  }

  .profile-form-card {
    padding: 1rem;
  }

  .profile-form-card h2 {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
  }

  .profile-form-card .form-group {
    margin-bottom: 1rem;
  }

  /* Админка на телефонах */
  .admin-page h1 {
    font-size: 1.375rem;
    margin-bottom: 1rem;
  }

  .admin-summary-item {
    padding: 0.875rem;
  }

  .admin-summary-value {
    font-size: 1.25rem;
  }

  .stats-grid {
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-card .label {
    font-size: 0.8125rem;
  }

  .stat-card .value {
    font-size: 1.25rem;
  }

  /* Шапка и футер на телефонах */
  .site-header .logo > span:last-child {
    font-size: 1rem;
  }

  .site-footer .footer-inner {
    padding: 1.5rem 0 1.25rem;
    gap: 1.5rem;
  }

  .site-footer .footer-brand {
    width: 100%;
    text-align: center;
  }

  .site-footer .footer-tagline {
    margin-left: auto;
    margin-right: auto;
  }

  .site-footer .footer-links {
    width: 100%;
    justify-content: center;
    gap: 1.5rem 2rem;
  }

  .site-footer .footer-nav {
    min-width: auto;
    align-items: center;
    text-align: center;
  }

  .site-footer .footer-nav-label {
    margin-bottom: 0.375rem;
  }

  .site-footer .footer-bottom {
    padding: 1rem 0;
    text-align: center;
  }

  .site-footer .footer-copy {
    font-size: 0.75rem;
  }

  .site-footer .footer-link,
  .site-footer .footer-link--btn {
    padding: 0.35rem 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Мобильные: формы и карточки */
@media (max-width: 767px) {
  .btn {
    min-height: 44px;
  }

  .card.p-8 {
    padding: 1.25rem;
  }

  .auth-card {
    padding: 1.25rem 1rem;
  }

  /* Админка: блоки на планшетах и мобильных */
  .admin-page h1 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
  }

  .admin-page .card.p-4 {
    padding: 1rem;
  }

  .admin-page .overflow-x-auto {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .admin-page form.flex.flex-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-page form.flex.flex-wrap label {
    flex: 1 1 100%;
  }

  .admin-page form.flex.flex-wrap .btn {
    align-self: flex-start;
  }

  .admin-page .card .flex.gap-2 {
    flex-direction: column;
  }

  .admin-page .card .flex.gap-2 .btn {
    width: 100%;
    min-height: 44px;
  }

  .admin-page .flex.flex-wrap.gap-6 {
    flex-direction: column;
    gap: 1rem;
  }

  .max-w-form {
    max-width: 100%;
    width: 100%;
  }

  .profile-form-card {
    padding: 1.25rem;
  }

  .profile-page h1.text-3xl {
    font-size: 1.5rem;
  }

  .profile-page .text-xl {
    font-size: 1.125rem;
  }

  .search-wrap--narrow {
    max-width: 100%;
  }

  .site-footer .footer-inner {
    flex-direction: column;
    align-items: center;
    padding: 1.75rem 0 1.5rem;
    gap: 2rem;
  }

  .site-footer .footer-brand {
    text-align: center;
  }

  .site-footer .footer-logo {
    justify-content: center;
  }

  .site-footer .footer-tagline {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .footer-links {
    gap: 1.5rem;
    justify-content: center;
  }

  .site-footer .footer-bottom {
    text-align: center;
  }
}

/* Капча: на узком экране — колонка */
@media (max-width: 480px) {
  .captcha-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .captcha-inner img {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }

  .captcha-inner input {
    width: 100%;
  }

  .captcha-refresh {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
  }
}

/* Хлебные крошки: перенос и читаемость */
@media (max-width: 767px) {
  .breadcrumb {
    font-size: 0.75rem;
    gap: 0.25rem;
    margin-bottom: 1rem;
  }
}

/* Пагинация: кнопки помельче на мобильных */
@media (max-width: 767px) {
  .pagination {
    gap: 0.5rem;
    margin-top: 1.5rem;
  }

  .pagination .btn {
    min-width: 2.25rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}

/* Админка: отступы в карточке проекта (название, статистика, статус Виден/Скрыт) */
.admin-project-row-left {
  gap: 1.25rem;
}

/* Админка: карточки заявок — кнопки в колонку на узком экране */
@media (max-width: 480px) {
  .admin-nav {
    gap: 0.375rem;
  }

  .admin-nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }

  .admin-page .card.p-4 {
    padding: 0.875rem;
  }

  .admin-page .overflow-x-auto {
    margin-left: -0.875rem;
    margin-right: -0.875rem;
    padding-left: 0.875rem;
    padding-right: 0.875rem;
  }

  .admin-page table th,
  .admin-page table td {
    padding: 0.375rem 0.5rem 0.375rem 0;
    font-size: 0.8125rem;
  }

  .admin-page .text-xl {
    font-size: 1.125rem;
  }

  #applications-list .card.p-5 {
    padding: 1rem;
  }

  #applications-list .flex.justify-between.items-center {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  #applications-list .flex.gap-2 {
    flex-wrap: wrap;
  }

  #applications-list .btn {
    flex: 1;
    min-width: 0;
  }

  .admin-project-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-project-row-left {
    gap: 0.75rem;
  }

  .admin-project-row .admin-project-row-left {
    gap: 0.75rem;
  }

  .admin-project-row label {
    margin-bottom: 0;
  }
}

/* Карточки проектов и категорий: минимальный зазор на очень маленьких */
@media (max-width: 380px) {
  .projects-grid,
  .category-projects-grid {
    gap: 0.75rem;
  }

  .category-grid {
    gap: 0.5rem;
  }

  .category-card {
    padding: 0.875rem;
  }

  .category-card .icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }

  .category-card span {
    font-size: 0.8125rem;
  }
}

/* Деталь проекта: блок ссылок и кнопки */
@media (max-width: 480px) {
  .project-detail-hero {
    padding: 1rem 1rem;
  }

  .project-detail-photo {
    max-width: 100%;
  }

  .project-links-block {
    padding: 0.75rem 1rem;
  }

  .project-link-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .project-link-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Секции: умеренные отступы на мобильных */
@media (max-width: 767px) {
  .mb-10 {
    margin-bottom: 2rem;
  }

  .mb-12 {
    margin-bottom: 2.5rem;
  }

  .py-12 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* Уважение к настройке «уменьшить движение» (a11y) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .bg-layers .layer1,
  .bg-layers .layer2,
  .section-title .line,
  .site-header .logo-icon,
  .site-header .logo > span:last-child,
  .site-footer .footer-logo,
  .site-footer .footer-logo-text {
    animation: none;
  }

  .projects-grid .project-card,
  .category-grid .category-card {
    opacity: 1;
    animation: none;
  }

  .project-card.top,
  .project-card.vip {
    animation: none;
  }

  main {
    animation: none;
  }
}
