/* 1. ПЕРЕМЕННЫЕ И ТОКЕНЫ ИНТЕРФЕЙСА */
:root {
  --primary: #7B61FF;
  --primary-dark: #5E48D9;
  --secondary: #EFEAFF;
  --accent: #FFB84C;
  --text: #1A1A2E;
  --light-text: #5A5A72;
  --bg: #F9F9FB;
  --card-bg: #FFFFFF;
  --border: #EAEAEF;
  --success: #4CAF50;
  --error: #F44336;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --transition: all 0.3s ease;
}

/* 2. БАЗОВЫЕ СТИЛИ СБРОСА И СЕТКИ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

section {
  padding: 80px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
  margin: 16px auto 0;
}

/* 3. ХЕДЕР И ВВОДНАЯ СЕКЦИЯ */
header {
  background: linear-gradient(135deg, var(--primary), #9f80ff);
  color: white;
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 30%);
  z-index: 1;
}

.header-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 60px;
}

.header-text {
  flex: 1;
  padding-right: 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  font-size: 1.8rem;
  font-weight: 700;
}

.logo-icon {
  background: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

h1 {
  font-size: 3.2rem;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.2;
}

.header-subtitle {
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 40px;
  max-width: 600px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: white;
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 600;
  padding: 16px 40px;
  border-radius: 100px;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* 4. МОКАП ТЕЛЕФОНА И ИНТЕРФЕЙС МАКС МЕССЕНДЖЕРА */
.header-image {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.phone-mockup {
  width: 300px;
  height: 600px;
  background: #1e222b;
  border-radius: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 2;
  border: 10px solid #14171e;
}

.chat-container {
  width: 100%;
  height: 100%;
  background: #0f1218;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  font-family: 'Inter', sans-serif;
}

.chat-header {
  background: #171b24;
  color: white;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bot-avatar {
  width: 40px;
  height: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

.chat-header-info {
  flex: 1;
}

.chat-header-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.chat-header-info p {
  font-size: 0.8rem;
  opacity: 0.7;
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 12px;
  position: relative;
  animation: fadeIn 0.4s ease forwards;
  opacity: 0;
  transform: translateY(10px);
  font-size: 0.95rem;
  line-height: 1.4;
}

.user-message {
  background: var(--primary);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  color: white;
  margin-left: 15%;
}

.bot-message {
  background: #202531;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  color: #e3e5e8;
  margin-right: 15%;
}

.message-time {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: right;
  margin-top: 6px;
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: #202531;
  border-radius: 18px;
  align-self: flex-start;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
  width: 60px;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: typing 1s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

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

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* 5. ФУНКЦИОНАЛ И ФИЧИ (FEATURES) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.feature-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 2rem;
  color: var(--primary);
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--primary-dark);
}

.feature-list {
  text-align: left;
  margin-top: 20px;
  width: 100%;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.feature-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.feature-list li i {
  color: var(--primary);
  font-size: 1.2rem;
  margin-top: 3px;
}

/* 6. БЕЗОПАСНОСТЬ */
.security-section {
  background: linear-gradient(to bottom, var(--bg), var(--secondary));
  position: relative;
  overflow: hidden;
  padding: 100px 0;
}

.security-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 10% 20%, rgba(123, 97, 255, 0.05) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(123, 97, 255, 0.05) 0%, transparent 20%);
}

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

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

.security-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 40px 30px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.security-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-md);
}

.security-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary);
}

.security-icon {
  width: 70px;
  height: 70px;
  background: var(--secondary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  font-size: 1.8rem;
  color: var(--primary);
}

.security-card h3 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  color: var(--text);
}

.security-card p {
  color: var(--light-text);
  font-size: 1rem;
}

/* 7. ОТЗЫВЫ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.testimonial-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 5rem;
  color: var(--secondary);
  opacity: 0.5;
  font-family: Georgia, serif;
  line-height: 1;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: bold;
}

.author-info h4 {
  font-weight: 600;
  margin-bottom: 4px;
}

.author-info p {
  color: var(--light-text);
  font-size: 0.9rem;
}

/* 8. SEO И КЛЮЧЕВЫЕ СЛОВА */
.seo-keywords-section {
  background: var(--bg);
  padding: 80px 0;
}

.keywords-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 40px;
}

.keyword-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.keyword-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.keyword-card.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.seo-text-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.8;
  min-height: 180px;
}

.keyword-content {
  display: none;
  padding: 24px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: left;
  animation: fadeIn 0.4s ease;
}

.keyword-content.active {
  display: block;
}

.keyword-content h4 {
  color: var(--primary);
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.seo-subtitle {
  font-size: 1.5rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
  display: none;
}

/* СТИЛИ МАСКОТА */
.mascot-holder {
  position: absolute;
  bottom: -40px;
  right: 20px;
  width: 70px;
  opacity: 0;
  transition: all 0.3s ease;
}

.keyword-card:hover .mascot-holder {
  opacity: 1;
  transform: translateY(-10px);
}

.mascot-corner {
  position: absolute;
  top: -30px;
  right: -20px;
  z-index: 3;
}

.waving-mascot {
  width: 100px;
  animation: wave 3s ease infinite;
}

@keyframes wave {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(15deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(5deg); }
}

/* 9. СЕКЦИЯ СТАВКИ И КНОПКА CTA */
.cta-section {
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: var(--radius-xl);
  padding: 80px 40px;
  margin: 0 auto;
  max-width: 1000px;
  position: relative;
  overflow: hidden;
}

.cta-title {
  font-size: 2.5rem;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.cta-subtitle {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 40px;
  position: relative;
  z-index: 2;
}

/* 10. МОДАЛЬНЫЕ ОКНА */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.7);
  overflow: auto;
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 30px;
  border-radius: 16px;
  width: 80%;
  max-width: 900px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 50px rgba(0,0,0,0.3);
  position: relative;
}

.close {
  color: #aaa;
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

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

.policy-content, .terms-content {
  padding: 20px;
  line-height: 1.8;
  color: #000;
}

.policy-content h2, .terms-content h2 {
  color: var(--primary);
  margin-bottom: 20px;
}

.policy-content h3, .terms-content h3 {
  margin: 25px 0 15px;
  color: var(--text);
}

.full-document-link {
  margin-top: 20px;
}

/* 11. ПОДВАЛ (FOOTER) */
footer {
  background: var(--text);
  color: white;
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 60px;
}

.footer-column h3 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-column h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links a:hover {
  color: white;
}

.legal-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 15px;
}

.legal-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
}

.legal-links a:hover {
  color: white;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* 12. АДАПТИВНОСТЬ (MEDIA QUERIES) */
@media (max-width: 992px) {
  h1 { font-size: 2.8rem; }
  .section-title { font-size: 2rem; }
  .header-content { flex-direction: column; gap: 40px; }
  .header-text { text-align: center; display: flex; flex-direction: column; align-items: center; padding-right: 0; }
}

@media (max-width: 768px) {
  section { padding: 60px 0; }
  h1 { font-size: 2.4rem; }
  .section-title { font-size: 1.8rem; margin-bottom: 40px; }
  .cta-section { padding: 60px 24px; }
  .cta-title { font-size: 2rem; }
  .phone-mockup { width: 260px; height: 520px; }
  .security-grid { grid-template-columns: 1fr; max-width: 500px; margin: 40px auto 0; }
}

@media (max-width: 480px) {
  header { padding: 60px 0 80px; }
  h1 { font-size: 2rem; }
  .header-subtitle { font-size: 1.1rem; }
  .feature-card { padding: 30px 24px; }
}
