:root {
  --main-bg: #0a0e1a;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.4);
  --white: #ffffff;
  --grey: #1e293b;
  --grey-light: #334155;
  --light: #f1f5f9;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
  --radius: 20px;
  --maxw: 550px;
  --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}
html,body {
  background: var(--main-bg);
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  margin: 0; padding: 0;
  scroll-behavior: smooth;
  overflow-x: hidden;
  /* Скрываем скроллбар, но оставляем возможность скролла */
  -ms-overflow-style: none;  /* IE и Edge */
  scrollbar-width: none;  /* Firefox */
}
/* Скрываем скроллбар для WebKit браузеров (Chrome, Safari) */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}
* {
  box-sizing: border-box;
  /* Улучшаем производительность на мобильных устройствах */
  -webkit-tap-highlight-color: transparent;
}
/* Адаптация для Telegram Mini App */
body {
  /* Предотвращаем bounce-эффект на iOS */
  overscroll-behavior: none;
  /* Улучшаем рендеринг на мобильных */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 6vw 17px 6vw;
  background: rgba(10, 14, 26, 0.8);
  backdrop-filter: blur(20px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.logo {
  font-weight: 800;
  font-size: 1.5em;
  letter-spacing: -0.02em;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  transition: transform 0.3s;
}
.logo:hover {
  transform: scale(1.05);
}
.cta {
  border: none;
  background: var(--gradient-hero);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95em;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  margin-left: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}
.cta:hover::before {
  left: 100%;
}
.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}
.main-hero {
  text-align: center;
  padding: 80px 6vw 40px 6vw;
  min-height: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
  z-index: 1;
}
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.6;
  pointer-events: none;
  /* Убираем видео из потока документа */
  margin: 0;
  padding: 0;
  display: block;
}
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.main-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at top, rgba(10, 14, 26, 0.7) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(10, 14, 26, 0.5) 0%, transparent 50%),
    linear-gradient(180deg, rgba(10, 14, 26, 0.8) 0%, rgba(26, 31, 53, 0.9) 100%);
  z-index: 1;
}
@keyframes pulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(1.1) rotate(180deg); opacity: 0.8; }
}
.hero-content h1 {
  margin: 0 0 24px 0;
  font-size: clamp(2.5em, 5vw, 4em);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 50%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  animation: fadeInUp 0.8s ease-out;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero-content p {
  font-size: clamp(1.1em, 2vw, 1.3em);
  max-width: 600px;
  margin: 0 auto 40px;
  color: #cbd5e1;
  line-height: 1.6;
  position: relative;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}
.hero-content .cta {
  font-size: 1.1em;
  padding: 16px 48px;
  margin-bottom: 12px;
  position: relative;
  animation: fadeInUp 0.8s ease-out 0.4s both;
  font-weight: 700;
  letter-spacing: 0.5px;
}
/* 3 bullets */
.benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin: 60px auto;
  max-width: 1200px;
  padding: 0 6vw;
  position: relative;
  z-index: 2;
}
.benefit {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(51, 65, 85, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 40px 28px;
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  flex: 1;
  text-align: center;
  max-width: 320px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
  z-index: 2;
}
.benefit::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-hero);
  transform: scaleX(0);
  transition: transform 0.4s;
}
.benefit:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.3);
  z-index: 10;
}
.benefit:hover::before {
  transform: scaleX(1);
}
.benefit-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background: var(--gradient-hero);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}
.benefit-title {
  font-weight: 700;
  font-size: 1.3em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.benefit div:last-child {
  color: #94a3b8;
  line-height: 1.6;
  font-size: 0.95em;
}
/* Work demo */
.demo-section {
  text-align: center;
  margin: 60px auto 40px;
  max-width: 1200px;
  padding: 0 6vw;
  position: relative;
  z-index: 2;
}
.demo-section h2 {
  font-size: clamp(2em, 4vw, 2.8em);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.demo-section > div:first-of-type {
  margin: 0 auto 40px;
  font-size: 1.1em;
  font-weight: 600;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.demo-switcher {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
}
.demo-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(51, 65, 85, 0.7) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  min-width: 280px;
  width: 320px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  margin: 0 0 7px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.demo-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}
.demo-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4);
  border-color: rgba(99, 102, 241, 0.5);
}
.demo-card:hover::after {
  opacity: 1;
}
.demo-card img,
.demo-card video {
  width: 100%;
  max-width: 270px;
  height: 300px;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 16px;
  background: #1e293b;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s;
  position: relative;
  z-index: 1;
  display: block;
}

.demo-card video {
  background: #000;
}

.demo-card:hover img,
.demo-card:hover video {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.3);
}
.demo-label {
  font-size: 1.1em;
  font-weight: 600;
  color: #e0e7ff;
  padding-bottom: 4px;
  position: relative;
  z-index: 1;
  letter-spacing: 1px;
}
/* Tariffs */
.tariffs {
  margin: 100px auto;
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  padding: 0 6vw;
}
.tariff-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.8) 100%);
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: 0 10px 50px rgba(99, 102, 241, 0.2);
  width: 100%;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.tariff-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-hero);
}
.tariff-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4);
  border-color: rgba(99, 102, 241, 0.6);
}
.tariff-title {
  font-weight: 800;
  font-size: 1.8em;
  margin-bottom: 24px;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
.tariff-li {
  color: #cbd5e1;
  line-height: 1.8;
  margin-bottom: 12px;
  font-size: 1.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.tariff-li::before {
  content: '✓';
  color: #10b981;
  font-weight: bold;
  font-size: 1.2em;
}
.tariff-price {
  font-size: 2.5em;
  font-weight: 900;
  margin: 30px 0 20px;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
.tariff-btn {
  background: var(--gradient-hero);
  color: var(--white);
  border: none;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  padding: 16px 56px;
  margin-top: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}
.tariff-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}
.tariff-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(99, 102, 241, 0.6);
}
.tariff-btn:hover::before {
  left: 100%;
}
/* Partner program */
.partner-section {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.2);
  padding: 50px 32px;
  max-width: 600px;
  margin: 80px auto 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.partner-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.partner-title {
  font-size: 2em;
  font-weight: 800;
  margin-bottom: 16px;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
  letter-spacing: -0.02em;
}
.partner-section p {
  margin: 0 0 16px 0;
  color: #e0e7ff;
  font-size: 1.05em;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}
.partner-btn {
  background: var(--gradient-hero);
  color: var(--white);
  border: none;
  font-size: 1.05em;
  border-radius: 50px;
  padding: 14px 40px;
  margin: 16px 0 0 0;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  letter-spacing: 0.5px;
  overflow: hidden;
}
.partner-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}
.partner-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(99, 102, 241, 0.6);
}
.partner-btn:hover::before {
  left: 100%;
}
/* Footer */
footer {
  margin-top: 120px;
  font-size: 0.95em;
  background: linear-gradient(180deg, rgba(10, 14, 26, 0.8) 0%, rgba(10, 14, 26, 1) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 50px 12vw;
  text-align: center;
  color: #64748b;
  position: relative;
}
.footer-links {
  margin-bottom: 20px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}
.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  margin: 0 2px;
  transition: all 0.3s;
  position: relative;
}
.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-hero);
  transition: width 0.3s;
}
.footer-links a:hover {
  color: #ffffff;
}
.footer-links a:hover::after {
  width: 100%;
}
footer > div:nth-child(2) {
  color: #94a3b8;
  margin: 20px 0 10px;
  font-size: 1.05em;
  line-height: 1.6;
}
footer > div:last-child {
  color: #64748b;
  font-size: 0.9em;
  margin-top: 15px;
}

.footer-org-info {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.65em;
  color: #5a6f8f;
  line-height: 1.6;
  text-align: center;
}

.footer-org-info div {
  margin-bottom: 3px;
}

.footer-org-info div:first-child {
  font-weight: 600;
  color: #6a7f9f;
  margin-bottom: 6px;
  font-size: 0.75em;
}
/* -- Responsive -- */
@media (max-width: 850px) {
  header {
    padding: 18px 4vw 13px 4vw;
    justify-content: center;
  }
  .logo {
    font-size: 1.3em;
  }
  .main-hero { 
    padding: 60px 4vw 30px 4vw;
    min-height: auto;
    text-align: center;
    align-items: center;
  }
  .benefits, .demo-section, .tariffs { 
    max-width: 100%;
    padding: 0 4vw;
    margin-left: auto;
    margin-right: auto;
  }
  .benefits { 
    flex-direction: column; 
    gap: 20px;
    margin: 40px auto;
    align-items: center;
    z-index: 2;
  }
  .benefit {
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
  }
  .demo-section {
    text-align: center;
    margin: 120px auto 60px;
  }
  .demo-switcher { 
    flex-direction: column; 
    gap: 30px;
    align-items: center;
    justify-content: center;
  }
  .demo-card {
    margin: 0 auto;
  }
  .tariffs {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .tariff-card {
    margin: 0 auto;
    text-align: center;
  }
  .footer-links { 
    flex-direction: column; 
    gap: 12px;
    align-items: center;
    text-align: center;
  }
  .partner-section {
    margin: 60px auto 80px;
    padding: 40px 24px;
    text-align: center;
  }
}
@media (max-width: 480px) {
  header {
    justify-content: center;
    text-align: center;
  }
  .logo {
    font-size: 1.2em;
  }
  .main-hero { 
    padding: 50px 4vw 20px 4vw;
    text-align: center;
  }
  .hero-content h1 { 
    font-size: 2em;
    text-align: center;
    margin: 0 auto 20px;
  }
  .hero-content p { 
    font-size: 1em;
    text-align: center;
    margin: 0 auto 30px;
  }
  .cta {
    margin: 0 auto;
    display: block;
    width: fit-content;
  }
  .benefits {
    margin: 40px auto;
    padding: 0 4vw;
  }
  .benefit {
    min-width: auto;
    width: 100%;
    margin: 0 auto;
    text-align: center;
  }
  .demo-section {
    margin: 80px auto 40px;
    padding: 0 4vw;
    text-align: center;
  }
  .demo-section h2 {
    text-align: center;
  }
  .demo-switcher {
    align-items: center;
    justify-content: center;
  }
  .demo-card { 
    padding: 24px 20px;
    min-width: auto;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  .tariffs {
    margin: 60px auto;
    padding: 0 4vw;
    display: flex;
    justify-content: center;
  }
  .tariff-card { 
    padding: 32px 20px;
    min-width: auto;
    width: 100%;
    margin: 0 auto;
    text-align: center;
  }
  .tariff-title { 
    font-size: 1.5em;
    text-align: center;
  }
  .tariff-li {
    justify-content: center;
    text-align: center;
  }
  .tariff-btn {
    margin: 20px auto 0;
    display: block;
    width: fit-content;
  }
  .partner-section {
    margin: 60px auto;
    padding: 32px 20px;
    text-align: center;
  }
  .partner-title {
    font-size: 1.6em;
    text-align: center;
  }
  .partner-btn {
    margin: 20px auto 0;
    display: block;
    width: fit-content;
  }
  .cta, .tariff-btn, .partner-btn { 
    font-size: 0.95em;
    padding: 12px 32px;
  }
  footer {
    text-align: center;
    padding: 40px 4vw;
  }
  .footer-links {
    justify-content: center;
    align-items: center;
  }
}

/* ===== Секция выбора опций ===== */
.options-section {
  min-height: 100vh;
  padding: 120px 6vw 80px 6vw;
  background: var(--main-bg);
}

.options-container {
  max-width: 900px;
  margin: 0 auto;
}

.options-container h2 {
  text-align: center;
  font-size: 2.5em;
  margin-bottom: 50px;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.option-card {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 40px 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.option-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
  background: rgba(30, 41, 59, 0.8);
}

.option-icon {
  font-size: 3em;
  margin-bottom: 20px;
}

.option-title {
  font-size: 1.4em;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--white);
}

.option-desc {
  font-size: 0.95em;
  color: #94a3b8;
  line-height: 1.5;
}

.back-btn {
  display: block;
  margin: 40px auto 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  padding: 12px 30px;
  border-radius: 50px;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.3s;
}

.back-btn:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
}

/* ===== Рабочая область с чатом ===== */
.workspace-section {
  min-height: 100vh;
  padding: 80px 0 0 0;
  background: var(--main-bg);
  overflow-x: hidden;
}

.workspace-container {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0 4vw 20px 4vw;
  display: flex;
  flex-direction: column;
  min-height: auto;
  box-sizing: border-box;
  gap: 15px; /* Отступы между блоками */
}

.workspace-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 0;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex: 0 0 auto;
  flex-shrink: 0;
}

.back-btn-small {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.5em;
  cursor: pointer;
  padding: 5px 10px;
  transition: transform 0.2s;
}

.back-btn-small:hover {
  transform: translateX(-3px);
}

.workspace-header h3 {
  margin: 0;
  font-size: 1.5em;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Чат ===== */
.chat-container {
  flex: 0 0 auto;
  min-height: 100px;
  max-height: 300px;
  overflow-y: auto;
  padding: 20px;
  background: rgba(30, 41, 59, 0.3);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  display: flex;
  max-width: 80%;
  animation: messageAppear 0.3s ease-out;
}

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

.user-message {
  align-self: flex-end;
  justify-content: flex-end;
}

.bot-message {
  align-self: flex-start;
  justify-content: flex-start;
}

.message-content {
  padding: 12px 18px;
  border-radius: 18px;
  line-height: 1.5;
  word-wrap: break-word;
}

.user-message .message-content {
  background: var(--gradient-hero);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.bot-message .message-content {
  background: rgba(51, 65, 85, 0.6);
  color: var(--white);
  border-bottom-left-radius: 4px;
}

/* Стили для файлов в чате */
.file-message {
  max-width: 70%;
}

.file-content {
  padding: 0;
  overflow: hidden;
}

.chat-file-label {
  padding: 8px 12px;
  background: rgba(99, 102, 241, 0.2);
  font-size: 0.85em;
  font-weight: 600;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-file-preview {
  width: 100%;
  max-width: 250px;
  max-height: 200px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.chat-file-preview video {
  max-height: 200px;
}

.chat-file-name {
  padding: 8px 12px;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.2);
  word-break: break-word;
}

.chat-file-icon {
  font-size: 2em;
  text-align: center;
  padding: 15px;
}

.message.loading .message-content {
  position: relative;
}

.message.loading .message-content::after {
  content: '...';
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* ===== Зона загрузки файлов ===== */
.upload-section {
  flex: 0 0 auto;
  min-height: auto;
  display: block !important;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0;
}

.upload-zone-simple {
  border: 2px dashed rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 20px 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: rgba(30, 41, 59, 0.4);
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
  flex-shrink: 0;
  min-height: 80px;
}

.upload-zone-simple:hover {
  border-color: var(--accent);
  background: rgba(30, 41, 59, 0.6);
  transform: translateY(-2px);
}

.upload-icon-simple {
  font-size: 1.8em;
  margin-bottom: 8px;
}

.upload-text-simple {
  color: var(--white);
  font-size: 0.9em;
  line-height: 1.3;
}

.uploaded-files-list {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  min-height: auto;
}

.uploaded-file-item-simple {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-preview-img,
.file-preview-video {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.file-preview-video {
  object-fit: contain;
  background: rgba(0, 0, 0, 0.3);
}

.file-info-simple {
  flex: 1;
  min-width: 0;
}

.file-name-simple {
  font-size: 0.9em;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-remove-simple {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 1.5em;
  cursor: pointer;
  padding: 5px 10px;
  line-height: 1;
  transition: transform 0.2s;
}

.file-remove-simple:hover {
  transform: scale(1.2);
}

.uploaded-file-preview {
  margin-top: 10px;
  margin-bottom: 15px;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  min-height: auto;
}

.preview-img,
.preview-video {
  width: 100%;
  max-width: 100%;
  max-height: 180px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  margin-bottom: 8px;
  box-sizing: border-box;
}

.preview-video {
  object-fit: contain;
  background: rgba(0, 0, 0, 0.3);
}

.preview-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 8px;
  font-size: 0.85em;
  color: var(--white);
}

.preview-info button {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 1.3em;
  cursor: pointer;
  padding: 0 5px;
  line-height: 1;
}

/* Стили для Face Swap - две отдельные зоны */
.faceswap-upload-container {
  margin-bottom: 20px;
  flex-shrink: 0;
  /* Предотвращаем сжатие контейнеров Face Swap */
}

#faceswapUploadZones {
  display: flex;
  flex-direction: column;
  gap: 15px;
  /* Убеждаемся, что обе зоны видны и имеют достаточно места */
}

.upload-label {
  font-size: 0.95em;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 10px;
  display: block;
}

.faceswap-zone {
  min-height: 120px;
  padding: 30px 20px;
}

.uploaded-file-single {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-preview-small {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.file-preview-small img,
.file-preview-small video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-info-small {
  flex: 1;
  min-width: 0;
}

.file-info-small .file-name {
  font-size: 0.9em;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-zone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: rgba(30, 41, 59, 0.3);
}

.upload-zone:hover {
  border-color: var(--accent);
  background: rgba(30, 41, 59, 0.5);
}

.upload-icon {
  font-size: 2.5em;
  margin-bottom: 10px;
}

.upload-text {
  font-size: 1.1em;
  color: var(--white);
  margin-bottom: 5px;
}

.upload-hint {
  font-size: 0.9em;
  color: #94a3b8;
}

.uploaded-files {
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.uploaded-file-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.file-preview {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.file-preview img,
.file-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 0.95em;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.file-size {
  font-size: 0.85em;
  color: #94a3b8;
}

.file-remove {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 1.5em;
  cursor: pointer;
  padding: 5px 10px;
  line-height: 1;
  transition: transform 0.2s;
}

.file-remove:hover {
  transform: scale(1.2);
}

/* ===== Область ввода ===== */
.input-area {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding-bottom: 20px;
  flex: 0 0 auto;
  flex-shrink: 0;
  order: 2;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  margin-top: auto; /* Прижимаем к низу, но не перекрываем */
}

.input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  padding: 8px 15px;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.attach-icon-inline {
  font-size: 1.5em;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s;
  flex-shrink: 0;
  user-select: none;
  padding: 8px 5px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
}

.attach-icon-inline:hover {
  color: var(--white);
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.attach-icon-inline:active {
  transform: scale(0.9);
}

/* Меню прикрепления файлов */
.attach-menu {
  position: absolute;
  bottom: 60px;
  left: 0;
  right: 0;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  animation: slideUp 0.3s ease-out;
}

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

.attach-menu-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attach-option {
  padding: 15px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.attach-option:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--accent);
  transform: translateX(5px);
}

.attach-option-icon {
  font-size: 1.5em;
}

.attach-option-text {
  flex: 1;
}

.attach-option-title {
  font-weight: 600;
  color: var(--white);
  margin-bottom: 3px;
}

.attach-option-desc {
  font-size: 0.85em;
  color: #94a3b8;
}

.message-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 0;
  color: var(--white);
  font-size: 1em;
  font-family: inherit;
  resize: none;
  outline: none;
  transition: all 0.3s;
  min-height: 28px;
  max-height: 120px;
  line-height: 1.4;
}

.message-input:focus {
  outline: none;
}

.input-wrapper:focus-within {
  border-color: var(--accent);
  background: rgba(30, 41, 59, 0.8);
}

.message-input::placeholder {
  color: #64748b;
}

.send-btn {
  background: var(--gradient-hero);
  border: none;
  border-radius: 20px;
  padding: 10px 24px;
  color: var(--white);
  font-weight: 600;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  white-space: nowrap;
  margin-left: 10px;
}

.send-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.send-btn:active {
  transform: translateY(0);
}

/* ===== Область результата ===== */
.result-area {
  margin-top: 0;
  margin-bottom: 0;
  padding: 25px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex: 0 0 auto;
  flex-shrink: 0;
  order: 1;
  width: 100%;
  box-sizing: border-box;
  min-height: auto;
}

.result-header {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--white);
}

.result-content {
  margin-bottom: 20px;
  min-height: auto;
  width: 100%;
  box-sizing: border-box;
}

.result-image,
.result-video {
  width: 100%;
  max-width: 100%;
  border-radius: 12px;
  display: block;
  height: auto;
  box-sizing: border-box;
}

.result-video {
  max-height: 600px;
  object-fit: contain;
}

.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.download-btn,
.share-btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 24px;
  border-radius: 25px;
  border: none;
  font-weight: 600;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.3s;
}

.download-btn {
  background: var(--gradient-hero);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.share-btn {
  background: rgba(51, 65, 85, 0.6);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.download-btn:hover,
.share-btn:hover {
  transform: translateY(-2px);
}

/* ===== Адаптивность для новых секций ===== */
@media (max-width: 850px) {
  .options-section {
    padding: 100px 4vw 60px 4vw;
  }
  
  .options-container h2 {
    font-size: 2em;
    margin-bottom: 40px;
  }
  
  .options-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .workspace-container {
    min-height: auto;
    padding: 0 3vw 20px 3vw;
    width: 100%;
    gap: 12px;
  }
  
  .chat-container {
    max-height: 250px;
    width: 100%;
    min-height: 80px;
  }
  
  .upload-zone-simple {
    padding: 15px 12px;
    min-height: 70px;
  }
  
  .upload-icon-simple {
    font-size: 1.5em;
    margin-bottom: 6px;
  }
  
  .upload-text-simple {
    font-size: 0.85em;
  }
  
  .result-area {
    padding: 20px;
  }
  
  .input-area {
    padding-bottom: 15px;
  }
  
  .workspace-header h3 {
    font-size: 1.3em;
  }
  
  .message {
    max-width: 85%;
  }
  
  .input-area {
    flex-direction: column;
  }
  
  .send-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .options-section {
    padding: 90px 4vw 50px 4vw;
  }
  
  .options-container h2 {
    font-size: 1.8em;
  }
  
  .option-card {
    padding: 30px 20px;
  }
  
  .option-icon {
    font-size: 2.5em;
  }
  
  .workspace-container {
    height: calc(100vh - 50px);
    padding: 0 3vw;
  }
  
  .workspace-header h3 {
    font-size: 1.2em;
  }
  
  .chat-container {
    padding: 15px;
  }
  
  .message {
    max-width: 90%;
  }
  
  .upload-zone {
    padding: 30px 15px;
  }
  
  .result-actions {
    flex-direction: column;
  }
  
  .download-btn,
  .share-btn {
    width: 100%;
  }
}
