/* ==========================================================================
   FBC GUI Official Website & Admin Studio Stylesheet
   Цветовая палитра: Тема Midnight из приложения FBC GUI (тёмная с оранжевым)
   ========================================================================== */

:root {
  /* Палитра Midnight из скриншотов программы FBC GUI */
  --bg-deep: #0b0d16;
  --bg-main: #111422;
  --bg-card: #171b2d;
  --bg-card-elevated: #1d2238;
  --bg-card-hover: #222842;
  --bg-input: #131728;

  /* Границы и разделители */
  --border-subtle: #262c47;
  --border-strong: #363f66;
  --border-accent: rgba(245, 184, 46, 0.45);

  /* Фирменный оранжево-янтарный акцент темы Midnight */
  --accent-orange: #f5b82e;
  --accent-orange-bright: #ff9f1c;
  --accent-orange-deep: #e08e0b;
  --accent-orange-glow: rgba(245, 184, 46, 0.22);
  --accent-orange-soft: rgba(245, 184, 46, 0.12);
  --accent-text-dark: #11131f;

  /* Фирменный лавандово-индиговый цвет подзаголовков секций */
  --section-label: #9d8df1;
  --section-label-soft: rgba(157, 141, 241, 0.14);

  /* Текст */
  --text-primary: #f4f6fb;
  --text-secondary: #9ba3c2;
  --text-muted: #6e7799;

  /* Статусы */
  --success: #22c55e;
  --danger: #ef4444;

  /* Аккуратные, умеренные скругления (без гигантских овалов на многострочных блоках) */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 10px;
  --shadow-card: 0 16px 40px rgba(4, 6, 14, 0.55);
  --shadow-glow: 0 6px 22px rgba(245, 184, 46, 0.26);
  --max-width: 1260px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(157, 141, 241, 0.09) 0%, transparent 42%),
    radial-gradient(circle at 85% 8%, rgba(245, 184, 46, 0.10) 0%, transparent 45%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-main) 45%, var(--bg-deep) 100%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

a {
  color: var(--accent-orange);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent-orange-bright);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Верхняя навигационная панель (Sticky Header)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 18, 32, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  flex-shrink: 0;
  min-width: 0;
}

.brand:hover {
  color: var(--text-primary);
}

.brand-icon-img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange-bright) 100%);
  color: var(--accent-text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.version-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-orange-soft);
  color: var(--accent-orange);
  border: 1px solid var(--border-accent);
  white-space: nowrap;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Навигационные кнопки */
.nav-pills {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 4px;
  flex-wrap: wrap;
  max-width: 100%;
}

.nav-pill {
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 7px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-pill:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-pill.active {
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange-bright) 100%);
  color: var(--accent-text-dark);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 3px;
  flex-shrink: 0;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.03em;
}

.lang-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.lang-btn.active {
  background: var(--accent-orange);
  color: var(--accent-text-dark);
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  max-width: 100%;
}

.btn-download-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 7px 16px;
  border-radius: 10px;
  line-height: 1.1;
}

.dl-btn-main {
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--accent-text-dark);
  white-space: nowrap;
}

.dl-btn-sub {
  font-size: 0.63rem;
  font-weight: 600;
  line-height: 1.1;
  color: rgba(17, 19, 31, 0.78);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.dl-btn-main-sec {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.18;
  color: inherit;
  white-space: nowrap;
}

.dl-btn-sub-sec {
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.12;
  color: var(--text-secondary);
  white-space: nowrap;
}

.btn-secondary:hover .dl-btn-sub-sec {
  color: var(--accent-orange);
}

.dl-platform-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
}

.dl-platform-stack-left {
  align-items: flex-start;
}

.dl-alt-platform-link {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.dl-alt-platform-link:hover {
  color: var(--accent-orange);
  text-decoration: underline;
}

.admin-highlight-box {
  background: linear-gradient(135deg, rgba(245, 184, 46, 0.08) 0%, rgba(157, 141, 241, 0.08) 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 20px;
}

.admin-subbox {
  background: rgba(11, 13, 22, 0.55);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange-bright) 100%);
  color: var(--accent-text-dark);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  color: var(--accent-text-dark);
  box-shadow: 0 10px 28px rgba(245, 184, 46, 0.38);
}

.btn-secondary {
  background: var(--bg-card-elevated);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-subtle);
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.24);
  color: #ffffff;
}

.btn-lg {
  font-size: 1rem;
  padding: 12px 24px;
}

.btn-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(17, 19, 31, 0.18);
  color: var(--accent-text-dark);
}

/* ==========================================================================
   Hero-секция
   ========================================================================== */

.hero-section {
  padding: 44px 0 48px;
  position: relative;
}

.hero-top {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-app-icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  margin: 0 auto 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 24px rgba(245, 184, 46, 0.18);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-orange);
  background: var(--accent-orange-soft);
  border: 1px solid var(--border-accent);
  padding: 6px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
  max-width: 100%;
  line-height: 1.4;
}

.hero-title {
  font-size: clamp(1.75rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  overflow-wrap: break-word;
}

.hero-title .accent {
  background: linear-gradient(135deg, var(--accent-orange) 0%, #ffd166 55%, var(--accent-orange-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.06rem;
  color: var(--text-secondary);
  margin: 0 auto 26px;
  max-width: 780px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.hero-meta-strip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  background: rgba(23, 27, 45, 0.78);
  border: 1px solid var(--border-subtle);
  padding: 10px 18px;
  border-radius: 10px;
  max-width: 100%;
  line-height: 1.45;
}

.hero-meta-strip span {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.hero-meta-strip strong {
  color: var(--text-primary);
}

.app-tab-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 4px;
  flex-wrap: wrap;
  max-width: 100%;
}

.app-tab-btn {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.app-tab-btn:hover {
  color: var(--text-primary);
}

.app-tab-btn.active {
  background: var(--accent-orange);
  color: var(--accent-text-dark);
  font-weight: 700;
}

.showcase-image-frame {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  cursor: zoom-in;
}

.showcase-image-frame img {
  width: 100%;
  height: auto;
  transition: opacity 0.22s ease;
}

.showcase-caption-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

/* ==========================================================================
   Общие стили секций
   ========================================================================== */

.section {
  padding: 64px 0;
  border-top: 1px solid rgba(38, 44, 71, 0.6);
}

.section-header {
  max-width: 780px;
  margin-bottom: 36px;
}

.section-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--section-label);
  background: var(--section-label-soft);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  line-height: 1.22;
  overflow-wrap: break-word;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   Карточки функциональных возможностей с кропами элементов скриншотов
   ========================================================================== */

.features-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.feature-row-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr);
  gap: 28px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease;
  width: 100%;
  max-width: 100%;
}

.feature-row-card > * {
  min-width: 0;
  max-width: 100%;
}

.feature-row-card:hover {
  border-color: var(--border-accent);
}

.feature-row-card:nth-child(even) {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.05fr);
}

.feature-row-card:nth-child(even) .feature-text-col {
  order: 2;
}

.feature-row-card:nth-child(even) .feature-visual-col {
  order: 1;
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--section-label);
  background: var(--section-label-soft);
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  max-width: 100%;
}

.feature-title {
  font-size: 1.38rem;
  font-weight: 800;
  margin: 0 0 10px;
  line-height: 1.28;
  overflow-wrap: break-word;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.96rem;
  margin: 0 0 16px;
}

.feature-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-bullets li {
  position: relative;
  padding-left: 22px;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.feature-bullets li::before {
  content: "⚡";
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 0.82rem;
  color: var(--accent-orange);
}

.feature-visual-box {
  background: var(--bg-deep);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.feature-crop-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0d0f1a;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 440px;
  cursor: zoom-in;
}

.feature-crop-wrap img {
  width: auto;
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  margin: 0 auto;
  transition: transform 0.25s ease;
}

.feature-crop-wrap:hover img {
  transform: scale(1.015);
}

.feature-visual-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.79rem;
  color: var(--text-muted);
}

.zoom-link-btn {
  background: transparent;
  border: none;
  color: var(--accent-orange);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.zoom-link-btn:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Секция движка fbc2cng (fb2cng) и 9 поддерживаемых форматов
   ========================================================================== */

.engine-banner {
  background: linear-gradient(135deg, rgba(29, 34, 56, 0.95) 0%, rgba(20, 24, 41, 0.98) 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.engine-banner > * {
  min-width: 0;
  max-width: 100%;
}

.engine-tag {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  background: var(--accent-orange-soft);
  color: var(--accent-orange);
  border: 1px solid var(--border-accent);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.79rem;
  font-weight: 700;
  margin-bottom: 14px;
  max-width: 100%;
  line-height: 1.35;
}

.engine-title {
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  font-weight: 800;
  margin: 0 0 12px;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.engine-desc {
  color: var(--text-secondary);
  margin: 0 0 20px;
  font-size: 0.97rem;
  overflow-wrap: break-word;
}

.engine-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.engine-highlights li {
  background: rgba(11, 13, 22, 0.55);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 0.87rem;
  color: var(--text-primary);
  min-width: 0;
  overflow-wrap: break-word;
}

.engine-repo-card {
  background: var(--bg-deep);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.repo-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
  min-width: 0;
}

.repo-card-row:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.repo-label {
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.repo-value {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Сетка 9 форматов электронных книг */
.formats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px;
}

.format-card {
  background: linear-gradient(180deg, rgba(245, 184, 46, 0.07) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
  min-width: 0;
}

.format-card:hover {
  border-color: var(--accent-orange);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.format-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.format-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 5px 13px;
  border-radius: 7px;
  background: var(--accent-orange);
  border: 1px solid var(--accent-orange);
  color: var(--accent-text-dark);
}

.format-devices {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--section-label);
  line-height: 1.4;
}

.format-desc {
  font-size: 0.87rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   Секция «Темы оформления» (Midnight, Light, Nordic Slate + Авто)
   ========================================================================== */

.themes-studio {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
  width: 100%;
  max-width: 100%;
}

.themes-studio-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.theme-selector-group,
.screen-selector-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
}

.selector-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--section-label);
}

.theme-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-deep);
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 7px 14px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-pill-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-orange);
}

.theme-pill-btn.active {
  background: var(--accent-orange);
  color: var(--accent-text-dark);
  border-color: var(--accent-orange);
  box-shadow: var(--shadow-glow);
}

.theme-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.themes-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.theme-overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.22s ease;
  cursor: pointer;
  min-width: 0;
}

.theme-overview-card:hover,
.theme-overview-card.active {
  border-color: var(--accent-orange);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.theme-overview-thumb {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px;
}

.theme-overview-thumb img {
  border-radius: 6px;
  width: 100%;
  height: auto;
}

.theme-overview-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.theme-overview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.theme-overview-name {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0;
}

.theme-swatches {
  display: flex;
  align-items: center;
  gap: 5px;
}

.swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.theme-overview-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--section-label);
}

.theme-overview-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ==========================================================================
   Дополнительная информация и История версий
   ========================================================================== */

.extra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 18px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.info-card h3 {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 800;
}

.info-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.93rem;
  white-space: pre-line;
}

/* ==========================================================================
   Окно «О программе»
   ========================================================================== */

.about-app-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  width: 100%;
  max-width: 100%;
}

.about-panel-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--section-label);
  margin-bottom: 14px;
}

.about-rows {
  display: flex;
  flex-direction: column;
}

.about-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

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

.about-row-left strong {
  display: block;
  font-size: 0.98rem;
  color: var(--text-primary);
}

.about-row-left span {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.about-row-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-weight: 700;
  font-size: 0.98rem;
  max-width: 100%;
}

.about-pill-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card-elevated);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 700;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.about-pill-link:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.about-pill-link.accent-fill {
  background: var(--accent-orange);
  color: var(--accent-text-dark);
  border-color: var(--accent-orange);
}

.about-pill-link.accent-fill:hover {
  background: var(--accent-orange-bright);
  color: var(--accent-text-dark);
}

/* ==========================================================================
   Подвал сайта (Footer)
   ========================================================================== */

.site-footer {
  padding: 36px 0;
  border-top: 1px solid var(--border-subtle);
  background: rgba(11, 13, 22, 0.9);
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 14px 18px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Модальное окно просмотра скриншотов (Lightbox)
   ========================================================================== */

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(7, 9, 16, 0.92);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox-backdrop.open {
  display: flex;
}

.lightbox-content {
  max-width: 96vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox-content img {
  max-width: 94vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.85);
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* ==========================================================================
   Стили страницы администрирования (admin.html)
   ========================================================================== */

.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  padding: 32px 0 64px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 90px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.admin-nav-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.admin-nav-btn.active {
  background: var(--accent-orange);
  color: var(--accent-text-dark);
  font-weight: 700;
}

.admin-panel-section {
  display: none;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.admin-panel-section.active {
  display: flex;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
  min-width: 0;
  max-width: 100%;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-card-title {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 800;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-orange);
}

.form-textarea {
  min-height: 88px;
  resize: vertical;
}

.admin-item-box {
  background: var(--bg-deep);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 14px;
}

.admin-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 950;
  background: var(--bg-card-elevated);
  border: 1px solid var(--accent-orange);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
}

.admin-toast.show {
  display: block;
}

.admin-auth-screen {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.admin-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.admin-auth-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  margin: 0 auto 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.admin-auth-error {
  display: none;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.admin-auth-error.visible {
  display: block;
}

/* ==========================================================================
   Планшетная и мобильная адаптивность
   ========================================================================== */

@media (max-width: 1120px) {
  /* На планшетах и компактных экранах: логотип слева, кнопка Скачать строго справа в первой строке,
     навигация — аккуратно во второй строке на всю ширину */
  .header-inner {
    gap: 10px;
  }

  .brand {
    order: 1;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
  }

  .nav-pills {
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 980px) {
  .feature-row-card,
  .feature-row-card:nth-child(even),
  .engine-banner,
  .themes-cards-grid,
  .admin-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-row-card:nth-child(even) .feature-text-col,
  .feature-row-card:nth-child(even) .feature-visual-col {
    order: initial;
  }

  .admin-sidebar {
    position: static;
  }

  .engine-highlights,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-pill: 8px;
  }

  .container {
    padding: 0 14px;
  }

  /* Компактная шапка на мобильных: логотип слева, кнопка Скачать справа в первой строке,
     навигация — аккуратной однострочной полосой с прокруткой во второй строке */
  .header-inner {
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
    min-height: auto;
  }

  .brand {
    order: 1;
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
  }

  .brand-icon-img {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .brand-name {
    font-size: 1.02rem;
  }

  .version-pill {
    font-size: 0.66rem;
    padding: 2px 6px;
  }

  .brand-sub {
    display: none;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
    flex-shrink: 0;
    gap: 6px;
  }

  .lang-switcher {
    padding: 2px;
    border-radius: 7px;
  }

  .lang-btn {
    font-size: 0.68rem;
    padding: 4px 6px;
    border-radius: 5px;
  }

  .dl-platform-stack {
    gap: 3px;
    align-items: center;
  }

  .btn-download-stack {
    padding: 5px 11px;
    border-radius: 8px;
  }

  .dl-btn-main {
    font-size: 0.76rem;
  }

  .dl-btn-sub {
    font-size: 0.58rem;
  }

  .dl-alt-platform-link {
    font-size: 0.62rem;
  }

  .nav-pills {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
  }

  .nav-pills::-webkit-scrollbar {
    display: none;
  }

  .nav-pill {
    font-size: 0.78rem;
    padding: 5px 10px;
    border-radius: 6px;
    flex-shrink: 0;
  }

  /* Компактный первый экран (Hero) */
  .hero-section {
    padding: 26px 0 32px;
  }

  .hero-app-icon {
    width: 68px;
    height: 68px;
    border-radius: 15px;
    margin-bottom: 12px;
  }

  .hero-eyebrow {
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 8px;
    margin-bottom: 14px;
  }

  .hero-title {
    font-size: 1.58rem;
    line-height: 1.2;
    margin-bottom: 12px;
  }

  .hero-description {
    font-size: 0.94rem;
    line-height: 1.5;
    margin-bottom: 18px;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 18px;
  }

  .hero-cta-group .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  /* Блок мета-информации в Hero: аккуратная карточка с небольшим скруглением вместо круга */
  .hero-meta-strip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    width: 100%;
  }

  /* Скрываем разделительные точки "•" между пунктами, когда они в столбик */
  .hero-meta-strip > span:nth-child(even) {
    display: none;
  }

  /* Секции и карточки */
  .section {
    padding: 38px 0;
  }

  .section-header {
    margin-bottom: 24px;
  }

  .section-title {
    font-size: 1.38rem;
  }

  .section-subtitle {
    font-size: 0.92rem;
  }

  .feature-row-card,
  .engine-banner,
  .themes-studio,
  .about-app-panel,
  .info-card,
  .admin-card {
    padding: 16px 14px;
    border-radius: 12px;
    gap: 18px;
  }

  .feature-title {
    font-size: 1.18rem;
  }

  .feature-desc {
    font-size: 0.9rem;
  }

  .feature-bullets li {
    font-size: 0.87rem;
  }

  /* Секция движка fbc2cng без выхода текста за правый край */
  .engine-tag {
    font-size: 0.74rem;
    padding: 5px 10px;
    border-radius: 7px;
  }

  .engine-title {
    font-size: 1.24rem;
  }

  .engine-desc {
    font-size: 0.9rem;
  }

  .engine-banner .btn {
    width: 100%;
    white-space: normal;
    text-align: center;
    padding: 10px 14px;
    font-size: 0.86rem;
  }

  .engine-repo-card {
    padding: 14px;
    gap: 10px;
  }

  .repo-card-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding-bottom: 10px;
  }

  .repo-value {
    font-size: 0.88rem;
  }

  /* Переключатели в витрине тем */
  .app-tab-switcher {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    border-radius: 8px;
  }

  .app-tab-switcher::-webkit-scrollbar {
    display: none;
  }

  .app-tab-btn {
    font-size: 0.78rem;
    padding: 6px 10px;
    flex-shrink: 0;
  }

  .theme-pill-btn {
    font-size: 0.8rem;
    padding: 6px 11px;
  }

  /* Секция «О программе» на мобильном */
  .about-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px 0;
  }

  .about-row-right {
    width: 100%;
    justify-content: flex-start;
  }

  .about-pill-link {
    font-size: 0.82rem;
    padding: 6px 12px;
    border-radius: 7px;
  }
}
