/* ==========================================================================
   1. ШРИФТЫ И ДИЗАЙН-ТОКЕНЫ (TYPOGRAPHY & DESIGN SYSTEM)
   ========================================================================== */

@font-face {
  font-family: 'Druk Wide Cyr';
  src: url('../fonts/DrukWideCyr-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Involve';
  src: url('../fonts/Involve-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Involve';
  src: url('../fonts/Involve-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   2. ПЕРЕМЕННЫЕ И ДИЗАЙН-ТОКЕНЫ (:root)
   ========================================================================== */
:root {
  --bg-color: #42323F;
  --color-dark: #31252F;
  --accent-right: #663F5E;
  --accent-light: #7C4D72;
  --text-color: #F3DEEF;

  /* Типографика дизайн-системы */
  --font-heading: 'Druk Wide Cyr', sans-serif;
  --font-base: 'Involve', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   3. БАЗОВЫЙ СБРОС И ТИПОГРАФИКА
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6, .heading {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: #FFFFFF;
}

body {
  min-height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-base);
  font-size: 1.25rem;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   4. КАСТОМНЫЙ СКРОЛЛБАР В СТИЛЕ САЙТА
   ========================================================================== */
html {
  scroll-padding-top: 80px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-light) var(--color-dark);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-dark);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-light), var(--accent-right));
  border-radius: 9999px;
  border: 2px solid var(--color-dark);
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #99628d, var(--accent-light));
}

::-webkit-scrollbar-corner {
  background: var(--color-dark);
}

#about,
#services,
#projects,
#contacts {
  scroll-margin-top: 84px;
}

.hero-zone {
  position: relative;
  background-color: var(--bg-color);
  overflow: hidden;
  padding-top: 64px;
  padding-bottom: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.side-waves {
  position: absolute;
  top: 0;
  right: 0;
  width: 52vw;
  max-width: 680px;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.side-waves svg {
  width: 100%;
  height: 100%;
  display: block;
}

.wave-layer-soft {
  fill: var(--accent-light);
  opacity: 0.35;
}

.wave-layer-light {
  fill: var(--accent-light);
  opacity: 0.65;
}

.wave-layer-main {
  fill: var(--accent-right);
  opacity: 0.95;
}

/* ==========================================================================
   5. ФИКСИРОВАННАЯ ОСТРОВНАЯ ШАПКА (.header-island)
   ========================================================================== */
.header-island {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: max-content;
  max-width: calc(100% - 32px);
  height: 64px;
  margin: 0;
  background-color: rgba(49, 37, 47, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 0 0 24px 24px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
}

.header-name {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  text-transform: uppercase;
  color: var(--text-color);
  letter-spacing: 0.04em;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  white-space: nowrap;
}

.header-divider {
  width: 1px;
  height: 24px;
  background-color: var(--accent-light);
  opacity: 0.4;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 2px;
}

.header-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-family: var(--font-base);
  font-size: 0.95rem;
  cursor: pointer;
  position: relative;
  padding: 6px 10px;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.header-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  height: 2px;
  background-color: var(--text-color);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.header-btn:hover::after {
  opacity: 1;
}

/* ==========================================================================
   6. ИНТЕРАКТИВНАЯ КНОПКА СО СЛАЙДЕРОМ (.btn-capsule-slide)
   ========================================================================== */
.btn-capsule-slide {
  position: relative;
  overflow: hidden;
  margin-left: auto;
  height: 40px;
  width: 220px;
  padding: 0;
  border-radius: 9999px;
  border: 1px solid transparent;
  background-color: var(--accent-light);
  color: #FFFFFF;
  font-family: var(--font-base);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: 
    background-color 550ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 550ms cubic-bezier(0.16, 1, 0.3, 1),
    color 550ms cubic-bezier(0.16, 1, 0.3, 1);
}

.header-island .btn-capsule-slide {
  width: 205px;
  margin-left: 6px;
}

.btn-circle-icon {
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: #FFFFFF;
  color: var(--accent-right);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: 2;
  transition: 
    left 550ms cubic-bezier(0.16, 1, 0.3, 1),
    background-color 550ms cubic-bezier(0.16, 1, 0.3, 1),
    color 550ms cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-arrow-svg {
  width: 15px;
  height: 15px;
  display: block;
  transition: color 550ms cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-text-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.btn-text-initial,
.btn-text-hover {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-base);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: 
    transform 550ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 550ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* В покое: кружок слева (0..35px), текст строго в свободной зоне справа */
.btn-text-initial {
  left: 35px;
  right: 6px;
  opacity: 1;
  transform: translateX(0);
}

/* При наведении: кружок справа (185..220px), текст строго в свободной зоне слева */
.btn-text-hover {
  left: 6px;
  right: 35px;
  opacity: 0;
  transform: translateX(12px);
}

/* Hover & Touch Active Interactive States */
.btn-capsule-slide:hover,
.btn-capsule-slide:active {
  background-color: transparent;
  border-color: var(--text-color);
  color: var(--text-color);
}

.btn-capsule-slide:hover .btn-circle-icon,
.btn-capsule-slide:active .btn-circle-icon {
  left: calc(100% - 35px);
  background-color: var(--text-color);
  color: var(--color-dark);
}

.btn-capsule-slide:hover .btn-text-initial,
.btn-capsule-slide:active .btn-text-initial {
  opacity: 0;
  transform: translateX(-12px);
}

.btn-capsule-slide:hover .btn-text-hover,
.btn-capsule-slide:active .btn-text-hover {
  opacity: 1;
  transform: translateX(0);
}

.avatar-circle {
  width: 44px;
  height: 44px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  flex-shrink: 0;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   7. ПЕРВЫЙ ЭКРАН / HERO ZONE (.content-container, .intro)
   ========================================================================== */
.content-container {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 900px;
  margin: 32px auto 0;
  padding: 0 20px;
  text-align: left;
}

.hero-zone .content-container {
  margin: auto auto;
  padding: 0;
  width: 94%;
  max-width: 1400px;
}

.intro {
  position: relative;
  z-index: 2;
  max-width: max-content;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: flex-start;
  text-align: left;
}

.intro-title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  color: #FFFFFF;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.intro-desc-wrap {
  position: relative;
  padding-left: 17px;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.intro-desc-wrap::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background-color: var(--accent-light);
  border-radius: 2px;
  opacity: 0.9;
}

.intro p {
  font-family: var(--font-base);
  font-size: 1.35rem;
  line-height: 1.62;
  color: var(--text-color);
  white-space: nowrap;
}

::selection {
  background-color: var(--accent-light);
  color: #FFFFFF;
}

.intro strong {
  font-family: var(--font-base);
  font-weight: 700;
  color: #FFFFFF;
}

.text-accent {
  color: #FFFFFF;
  border-bottom: 2px solid var(--accent-light);
  padding-bottom: 1px;
}

.text-highlight {
  display: inline-block;
  background-color: var(--accent-right);
  color: #FFFFFF;
  font-family: var(--font-base);
  font-weight: 700;
  padding: 1px 10px;
  border-radius: 8px;
  vertical-align: middle;
}

/* ==========================================================================
   8. ВОЛНОВОЙ РАЗДЕЛИТЕЛЬ СЕКЦИЙ (.wave-divider)
   ========================================================================== */
.wave-divider {
  position: relative;
  z-index: 2;
  width: 100%;
  line-height: 0;
  margin-top: auto;
  overflow: hidden;
  pointer-events: none;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 120px;
  transform: translateY(1px);
}

/* ==========================================================================
   9. ТЁМНАЯ СЕКЦИЯ: УСЛУГИ И КАРТОЧКИ (.dark-section, .panel-card)
   ========================================================================== */
.dark-section {
  background-color: var(--color-dark);
  min-height: 500px;
  padding: 40px 0 0;
  position: relative;
  z-index: 2;
}

.dark-section .content-container {
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
}

.dark-section-title,
.light-section-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--text-color);
  letter-spacing: 0.05em;
  margin-bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.heading-icon {
  width: 1.15em;
  height: 1.15em;
  display: inline-block;
  color: var(--accent-light);
  flex-shrink: 0;
}

.panels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.panel-card {
  min-height: 280px;
  background-color: rgba(255, 255, 255, 0.025);
  border: none;
  border-radius: 28px;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  /* Плавное появление (Fade-in без сдвигов) */
  opacity: 0;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity;
}

.panel-card:nth-child(1) { transition-delay: 0.05s; }
.panel-card:nth-child(2) { transition-delay: 0.18s; }
.panel-card:nth-child(3) { transition-delay: 0.12s; }

.panel-card.visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .panel-card {
    opacity: 1;
    transition: none;
  }
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: #FFFFFF;
  letter-spacing: 0.04em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.panel-title-center {
  text-align: center;
  margin-bottom: 24px;
}

.panel-desc {
  font-family: var(--font-base);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-color);
  opacity: 0.9;
  margin-bottom: 16px;
}

.panel-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.panel-list li {
  position: relative;
  padding-left: 14px;
  font-family: var(--font-base);
  font-size: 0.98rem;
  color: var(--text-color);
  line-height: 1.5;
  min-height: 1.5em;
}

.panel-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 2px;
  background-color: var(--accent-light);
  border-radius: 2px;
  opacity: 0.85;
}

/* ==========================================================================
   10. АНИМАЦИИ: TYPEWRITER И НЕОНОВАЯ ПОДСВЕТКА
   ========================================================================== */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background-color: var(--accent-light);
  margin-left: 2px;
  vertical-align: -0.15em;
  animation: typewriterBlink 0.6s infinite;
}

@keyframes typewriterBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes themeGlowPulse {
  0% {
    color: inherit;
    text-shadow: none;
  }
  35% {
    color: #F3DEEF;
    text-shadow: 
      0 0 10px rgba(243, 222, 239, 0.95), 
      0 0 22px rgba(124, 77, 114, 0.9), 
      0 0 35px rgba(102, 63, 94, 0.6);
  }
  65% {
    color: #F3DEEF;
    text-shadow: 
      0 0 10px rgba(243, 222, 239, 0.95), 
      0 0 22px rgba(124, 77, 114, 0.9), 
      0 0 35px rgba(102, 63, 94, 0.6);
  }
  100% {
    color: inherit;
    text-shadow: none;
  }
}

.typewriter-glow {
  animation: themeGlowPulse 2.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.panel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(243, 222, 239, 0.08);
}

.panel-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-base);
  font-size: 0.8rem;
  color: var(--text-color);
  background-color: rgba(255, 255, 255, 0.04);
  border: none;
  padding: 4px 9px;
  border-radius: 8px;
  white-space: nowrap;
}

.tag-icon {
  width: 12px;
  height: 12px;
  display: block;
  color: var(--accent-light);
  opacity: 0.95;
  flex-shrink: 0;
}

.panel-card-full {
  grid-column: 1 / -1;
  min-height: 200px;
}

.panel-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 8px;
}

.panel-split .panel-desc {
  font-size: 0.93rem;
  line-height: 1.55;
}

.panel-sub {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: #FFFFFF;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

/* ==========================================================================
   11. СВЕТЛОЕ ПРОСТРАНСТВО, ВОЛНОВОЙ РАЗДЕЛИТЕЛЬ И ТЁМНЫЙ ПОДВАЛ
   ========================================================================== */
.light-section {
  position: relative;
  background-color: var(--bg-color);
  padding: 90px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  z-index: 2;
}

.light-section .content-container {
  width: 94%;
  max-width: 1400px;
  margin: 0 auto 130px;
  padding: 0;
}

.light-panels-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.light-section .panel-card {
  width: 100%;
  min-height: auto;
  background-color: rgba(49, 37, 47, 0.45);
  border: none;
  border-radius: 24px;
  padding: 10px 10px 10px 28px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  gap: 28px;
}

.light-section .panel-card:empty {
  min-height: 235px;
}

.panel-text-content {
  flex: 0 0 780px;
  width: 780px;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 0;
  box-sizing: border-box;
}

.nowrap-desktop {
  white-space: nowrap;
}

.panel-text-top {
  display: flex;
  flex-direction: column;
}

.panel-bot-btn {
  width: 100%;
  margin: 0;
  margin-top: 18px;
  height: 42px;
}

.panel-bot-btn .btn-circle-icon {
  width: 30px;
  height: 30px;
  left: 6px;
}

.panel-bot-btn .btn-arrow-svg {
  width: 15px;
  height: 15px;
}

.panel-bot-btn .btn-text-initial {
  left: 44px;
  right: 14px;
  font-size: 13.5px;
}

.panel-bot-btn .btn-text-hover {
  left: 14px;
  right: 44px;
  font-size: 13.5px;
}

.panel-bot-btn:hover .btn-circle-icon {
  left: calc(100% - 36px);
}

.panel-subcard {
  flex: 1;
  min-height: 210px;
  max-height: 260px;
  background-color: rgba(255, 255, 255, 0.035);
  border: none;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  display: flex;
  user-select: none;
  -webkit-user-select: none;
}

#editphoto-slider {
  cursor: ew-resize;
  --reveal-pos: 60%;
}

.subcard-checker {
  position: absolute;
  inset: 0;
  background-color: #241a23;
  background-image: repeating-conic-gradient(
    rgba(243, 222, 239, 0.12) 0% 25%,
    transparent 0% 50%
  );
  background-size: 16px 16px;
  pointer-events: none;
}

.subcard-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 57%;
  display: block;
  border: none;
  pointer-events: none;
}

.subcard-cutout {
  z-index: 1;
}

.subcard-original-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: hidden;
  clip-path: inset(0 calc(100% - var(--reveal-pos, 60%)) 0 0);
  will-change: clip-path;
  pointer-events: none;
}

.subcard-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--reveal-pos, 60%);
  width: 2px;
  background: rgba(243, 222, 239, 0.75);
  box-shadow: 0 0 10px rgba(158, 76, 128, 0.6);
  pointer-events: none;
  transform: translateX(-50%);
  z-index: 3;
}

/* ==========================================================================
   XIMERA TELEGRAM UI SIMULATOR (.tg-sim-window)
   ========================================================================== */
.tg-sim-window {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background-color: rgba(22, 14, 21, 0.88);
  border: 1px solid rgba(243, 222, 239, 0.08);
  border-radius: 16px;
  overflow: hidden;
  font-family: var(--font-base);
  box-sizing: border-box;
  user-select: text;
  -webkit-user-select: text;
  cursor: default;
}

.tg-sim-header {
  position: relative;
  height: 36px;
  min-height: 36px;
  background: rgba(36, 24, 34, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(243, 222, 239, 0.08);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 10px;
  z-index: 2;
  box-sizing: border-box;
  user-select: none;
}

.tg-sim-avatar {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  overflow: hidden;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tg-sim-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tg-sim-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.tg-sim-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #FFFFFF;
}

.tg-sim-status {
  font-size: 10px;
  color: rgba(243, 222, 239, 0.55);
  transition: color 0.2s ease;
}

.tg-sim-status.searching {
  color: var(--accent-light);
}

.tg-sim-body {
  flex: 1 1 0%;
  min-height: 0;
  max-height: 100%;
  padding: 10px 12px 14px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(243, 222, 239, 0.25) transparent;
  transition: opacity 0.35s ease;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.tg-sim-body::-webkit-scrollbar {
  width: 5px;
}

.tg-sim-body::-webkit-scrollbar-thumb {
  background: rgba(243, 222, 239, 0.22);
  border-radius: 4px;
}

.tg-sim-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-light);
}

/* Сообщения */
.tg-msg {
  display: flex;
  flex-direction: column;
  animation: tgMsgPop 0.25s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

@keyframes tgMsgPop {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tg-msg-out {
  align-self: flex-end;
  max-width: 82%;
  background-color: #6d3960;
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: 12px 12px 2px 12px;
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.tg-msg-in {
  align-self: flex-start;
  width: fit-content;
  max-width: 88%;
  box-sizing: border-box;
  background-color: rgba(36, 25, 34, 0.95);
  border: none;
  padding: 9px 12px;
  border-radius: 12px 12px 12px 2px;
  color: var(--text-color);
  font-size: 11px;
  line-height: 1.45;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.tg-dossier-header {
  font-family: monospace, var(--font-base);
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.05em;
  padding-bottom: 2px;
  border-bottom: none;
  margin-bottom: 6px;
}

.tg-intro-text {
  font-size: 10px;
  line-height: 1.45;
  color: rgba(243, 222, 239, 0.85);
  margin-bottom: 6px;
}

.tg-help-row {
  font-size: 10px;
  line-height: 1.45;
  color: rgba(243, 222, 239, 0.82);
  margin-bottom: 2px;
}

.tg-code {
  font-family: monospace, var(--font-base);
  background: rgba(243, 222, 239, 0.08);
  border-radius: 3px;
  padding: 1px 4px;
  color: #FFFFFF;
  font-size: 9.5px;
}

.tg-prompt-text {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-light);
}

.tg-dossier-sec {
  margin-top: 6px;
}

.tg-dossier-sec-title {
  color: var(--accent-light);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.tg-row {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  gap: 6px;
  font-size: 10.5px;
  line-height: 1.42;
}

.tg-lbl {
  color: rgba(243, 222, 239, 0.6);
  flex-shrink: 0;
}

.tg-val {
  color: #FFFFFF;
  font-weight: 500;
  text-align: left;
}

.tg-val.tg-link {
  color: #72aeff;
}

.tg-val.tg-danger {
  color: #ff7b72;
}

.tg-badge {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  background: rgba(114, 174, 255, 0.16);
  color: #72aeff;
  margin-left: 2px;
}

.tg-badge-gold {
  background: rgba(234, 179, 8, 0.18);
  color: #eab308;
}

.tg-history-row {
  font-size: 10px;
  color: rgba(243, 222, 239, 0.85);
  line-height: 1.4;
}

.panel-header-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-header-row .panel-title {
  margin-bottom: 0;
}

.light-section .panel-desc {
  position: relative;
  padding-left: 14px;
  margin-bottom: 0;
}

.light-section .panel-desc::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 2px;
  background-color: var(--accent-light);
  border-radius: 2px;
  opacity: 0.85;
}

.panel-badge-island {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-base);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #FFFFFF;
  background-color: var(--accent-right);
  padding: 4px 12px;
  border-radius: 9999px;
  line-height: 1.2;
  user-select: none;
}

.wave-divider-bottom {
  position: relative;
  z-index: 2;
  width: 100%;
  line-height: 0;
  margin-top: 60px;
  overflow: hidden;
  pointer-events: none;
}

.wave-divider-bottom svg {
  display: block;
  width: 100%;
  height: 120px;
  transform: translateY(1px);
}

.bottom-zone {
  position: relative;
  background-color: var(--color-dark);
  padding: 30px 0 60px;
  z-index: 2;
}

.bottom-zone .content-container {
  width: max-content;
  max-width: calc(100% - 40px);
  margin: 0 auto;
  padding: 0;
}

.bottom-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
}

.bottom-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
}

.bottom-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--text-color);
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.bottom-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  gap: 20px;
}

.bottom-desc {
  font-family: var(--font-base);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-color);
  white-space: nowrap;
}

.bottom-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.bottom-divider {
  width: 100%;
  height: 1px;
  background-color: rgba(243, 222, 239, 0.12);
}

.bottom-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-base);
  font-size: 0.95rem;
  color: var(--text-color);
  opacity: 0.8;
  gap: 16px;
  width: 100%;
}

.footer-tagline {
  letter-spacing: 0.02em;
}

#visitor-count {
  font-weight: 700;
  color: #FFFFFF;
  background-color: rgba(255, 255, 255, 0.06);
  padding: 1px 7px;
  border-radius: 6px;
  border: 1px solid rgba(243, 222, 239, 0.12);
  margin-left: 2px;
}

/* ==========================================================================
   12. АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ И МОБИЛЬНЫХ УСТРОЙСТВ
   ========================================================================== */
@media (max-width: 1024px) {
  .intro p,
  .bottom-desc {
    white-space: normal;
  }
}

@media (max-width: 960px) {
  .bottom-zone .content-container {
    width: 90%;
    max-width: 900px;
  }

  .bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .panels-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .panel-split {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .intro-title {
    font-size: 1.45rem;
  }

  .intro p {
    font-size: 1.15rem;
  }

  .side-waves {
    width: 80vw;
    opacity: 0.5;
  }

  .light-section {
    padding-top: 60px;
  }

  .light-section .content-container {
    margin-bottom: 80px;
  }

  .light-section .panel-card {
    flex-direction: column;
    gap: 16px;
    padding: 20px 8px 8px 8px;
  }

  .panel-text-content {
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
    padding: 0 12px;
  }

  .panel-subcard {
    aspect-ratio: 16 / 9;
    min-height: auto;
    max-height: none;
    width: 100%;
  }

  .light-section .panel-desc {
    max-width: 100%;
  }

  .br-desktop {
    display: none;
  }

  .nowrap-desktop {
    white-space: normal;
  }
}

@media (max-width: 1040px) {
  .header-island {
    width: 95%;
    gap: 10px;
    padding: 0 14px;
  }

  .header-name {
    font-size: 0.95rem;
  }

  .header-nav {
    gap: 4px;
  }

  .header-btn {
    font-size: 0.88rem;
    padding: 5px 8px;
  }

  .header-btn::after {
    left: 8px;
    right: 8px;
  }

  .header-island .btn-capsule-slide {
    width: 195px;
  }
}

@media (max-width: 860px) {
  .header-divider,
  .header-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .header-island {
    width: 94%;
    height: 54px;
    padding: 0 12px;
    gap: 10px;
    border-radius: 0 0 18px 18px;
  }

  .avatar-circle {
    width: 36px;
    height: 36px;
  }

  .header-name {
    font-size: 0.95rem;
  }

  .header-island .btn-capsule-slide {
    width: 184px;
    height: 38px;
    margin-left: auto;
  }

  .header-island .btn-circle-icon {
    left: 5px;
    width: 28px;
    height: 28px;
  }

  .header-island .btn-arrow-svg {
    width: 14px;
    height: 14px;
  }

  .header-island .btn-text-initial,
  .header-island .btn-text-hover {
    font-size: 12px;
    font-weight: 600;
  }

  .header-island .btn-text-initial {
    left: 36px;
    right: 6px;
  }

  .header-island .btn-text-hover {
    left: 6px;
    right: 36px;
  }

  .header-island .btn-capsule-slide:hover .btn-circle-icon,
  .header-island .btn-capsule-slide:active .btn-circle-icon {
    left: calc(100% - 33px);
  }

  .panel-bot-btn {
    width: 100%;
    height: 42px;
  }

  .panel-bot-btn .btn-circle-icon {
    left: 5px;
    width: 30px;
    height: 30px;
  }

  .panel-bot-btn .btn-text-initial,
  .panel-bot-btn .btn-text-hover {
    font-size: 13px;
    font-weight: 600;
  }

  .panel-bot-btn .btn-text-initial {
    left: 38px;
    right: 8px;
  }

  .panel-bot-btn .btn-text-hover {
    left: 8px;
    right: 38px;
  }

  .panel-bot-btn:hover .btn-circle-icon,
  .panel-bot-btn:active .btn-circle-icon {
    left: calc(100% - 35px);
  }

  .panel-card {
    padding: 24px 18px;
    border-radius: 20px;
  }

  .light-section {
    padding-top: 40px;
  }

  .light-section .content-container {
    margin-bottom: 50px;
  }

  .bottom-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 400px) {
  .header-island {
    width: 96%;
    padding: 0 10px;
    gap: 8px;
  }

  .header-name {
    font-size: 0.88rem;
  }

  .header-island .btn-capsule-slide {
    width: 172px;
    height: 36px;
  }

  .header-island .btn-text-initial,
  .header-island .btn-text-hover {
    font-size: 11.2px;
  }

  .header-island .btn-circle-icon {
    left: 4px;
    width: 26px;
    height: 26px;
  }

  .header-island .btn-capsule-slide:hover .btn-circle-icon,
  .header-island .btn-capsule-slide:active .btn-circle-icon {
    left: calc(100% - 30px);
  }

  .intro-title {
    font-size: 1.3rem;
  }

  .dark-section-title,
  .light-section-title {
    font-size: 1.2rem;
  }
}

/* ==========================================================================
   13. ПАСХАЛКА: ПАДАЮЩИЕ КАРТИНКИ (EASTER EGG RAIN)
   ========================================================================== */
.easter-egg-drop {
  position: fixed;
  top: -150px;
  z-index: 999999;
  pointer-events: none;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  will-change: transform, top;
  animation: easterEggFall linear forwards;
}

@keyframes easterEggFall {
  0% {
    top: -150px;
    transform: translateX(0) rotate(0deg);
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    top: 105vh;
    transform: translateX(var(--drift, 30px)) rotate(var(--rot, 25deg));
    opacity: 0.9;
  }
}


