/* demo.css — Дополнительные стили для демонстрационного домена */
/* Версия: 1.0.5 | Зависит от: core.css */

:root {
  --primary: #2563eb;
  --secondary: #06b6d4;
  --dark: #0f172a;
  --dark-light: #1e293b;
  --gray: #64748b;
  --white: #ffffff;
  --gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --banner-height: 32px;
}

/* Тёмная тема (по умолчанию) */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-glass: rgba(15, 23, 42, 0.7);
  --border-color: rgba(255, 255, 255, 0.1);
  --text-primary: #ffffff;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --input-bg: rgba(255, 255, 255, 0.05);
  --input-border: rgba(255, 255, 255, 0.1);
  --btn-demo-bg: transparent;
  --btn-demo-color: #ffffff;
  --btn-demo-border: rgba(255, 255, 255, 0.2);
  --btn-demo-hover-border: #06b6d4;
  --btn-demo-hover-bg: rgba(6, 182, 212, 0.1);
  --footer-bg: rgba(15, 23, 42, 0.9);
  --header-bg: rgba(15, 23, 42, 0.3);
  --glow-opacity: 0.3;
  --glow-opacity-light: 0.15;
  --shadow-color: rgba(37, 99, 235, 0.3);
  --message-color: rgba(255, 255, 255, 0.95);
  --footer-border: rgba(255, 255, 255, 0.1);
  --footer-text: #64748b;
  --footer-link: #64748b;
  --demo-banner-bg: rgba(37, 99, 235, 0.2);
  --demo-banner-border: rgba(37, 99, 235, 0.5);
  --demo-banner-text: #93c5fd;
  --dropdown-bg: #1e293b;
  --dropdown-hover: rgba(255,255,255,0.05);
  --dropdown-shadow: rgba(0,0,0,0.5);
}

/* Светлая тема */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #e2e8f0;
  --bg-glass: rgba(255, 255, 255, 0.7);
  --border-color: #e2e8f0;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --input-bg: #ffffff;
  --input-border: #e2e8f0;
  --btn-demo-bg: transparent;
  --btn-demo-color: #1e293b;
  --btn-demo-border: #e2e8f0;
  --btn-demo-hover-border: #06b6d4;
  --btn-demo-hover-bg: rgba(6, 182, 212, 0.05);
  --footer-bg: rgba(255, 255, 255, 0.9);
  --header-bg: rgba(255, 255, 255, 0.7);
  --glow-opacity: 0.15;
  --glow-opacity-light: 0.05;
  --shadow-color: rgba(37, 99, 235, 0.2);
  --message-color: #1e293b;
  --footer-border: #e2e8f0;
  --footer-text: #64748b;
  --footer-link: #64748b;
  --demo-banner-bg: rgba(37, 99, 235, 0.1);
  --demo-banner-border: rgba(37, 99, 235, 0.3);
  --demo-banner-text: #2563eb;
  --dropdown-bg: #ffffff;
  --dropdown-hover: #f1f5f9;
  --dropdown-shadow: rgba(0,0,0,0.1);
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

/* DEMO BANNER */
.demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--demo-banner-bg);
  border-bottom: 1px solid var(--demo-banner-border);
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--demo-banner-text);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
  min-height: 32px;
  height: auto;
}

.demo-banner a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

.demo-banner a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.bg-animation {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
  background: radial-gradient(circle at 20% 50%, rgba(37, 99, 235, var(--glow-opacity-light)) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(6, 182, 212, var(--glow-opacity-light)) 0%, transparent 50%);
  filter: blur(60px);
}

/* Header */
header {
  position: fixed;
  top: var(--banner-height);
  width: 100%;
  padding: 1rem 5%;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex; align-items: center; gap: 0.75rem;
  font-size: 1.25rem; font-weight: 700;
  background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.logo-icon {
  width: 40px; height: 40px; background: var(--gradient);
  border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden;
}

.logo-icon img {
  width: 30px;
  height: 30px;
}

/* Center Dropdown */
.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 101;
}

.demo-dropdown {
  position: relative;
  cursor: pointer;
}

.demo-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.demo-trigger:hover, .demo-dropdown.active .demo-trigger {
  color: var(--text-primary);
  border-color: var(--secondary);
  background: var(--dropdown-hover);
}

.demo-trigger i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.demo-dropdown.active .demo-trigger i {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--dropdown-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1rem;
  width: 320px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 20px 40px var(--dropdown-shadow);
  z-index: 200;
  pointer-events: none;
}

.demo-dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.dropdown-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.demo-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 12px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.demo-option:hover {
  background: var(--dropdown-hover);
}

.demo-preview {
  width: 60px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.demo-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

.demo-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Theme Toggle */
.theme-toggle-container { display: flex; align-items: center; gap: 1rem; }
.theme-toggle {
  position: relative; width: 60px; height: 32px; background: var(--bg-secondary);
  border-radius: 16px; cursor: pointer; border: 2px solid var(--border-color); transition: all 0.3s ease;
}
.theme-toggle:hover { border-color: var(--secondary); }
.theme-toggle-slider {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  background: var(--gradient); border-radius: 50%; transition: transform 0.3s ease;
  display: flex; align-items: center; justify-content: center;
}
.theme-toggle-slider i { font-size: 12px; color: white; }
[data-theme="light"] .theme-toggle-slider { transform: translateX(28px); }
.theme-icons {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: flex; justify-content: space-between; align-items: center; padding: 0 8px; pointer-events: none;
}
.theme-icons i { font-size: 14px; transition: opacity 0.3s ease; }
.theme-icons .sun { color: #f59e0b; opacity: 0.5; }
.theme-icons .moon { color: #64748b; opacity: 1; }
[data-theme="light"] .theme-icons .sun { opacity: 1; }
[data-theme="light"] .theme-icons .moon { opacity: 0.5; }
.theme-label { font-size: 0.875rem; color: var(--text-secondary); font-weight: 500; }

/* Main Layout */
.main-container {
  display: flex;
  height: 100vh;
  padding-top: calc(var(--banner-height) + 80px);
  padding-bottom: 120px;
}
.left-space { width: 10%; min-width: 50px; }

.chat-area { flex: 1; display: flex; flex-direction: column; position: relative; overflow: hidden; }

.title-container { text-align: center; padding: 2rem; margin-bottom: 2rem; height: 80px; flex-shrink: 0; }
.main-title {
  font-size: 2.5rem; font-weight: 700; background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.main-title.dissolve { animation: dissolve 1s ease forwards; }
@keyframes dissolve {
  0% { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 0; transform: scale(0.8) translateY(-20px); filter: blur(10px); }
}

.messages-container {
  flex: 1; overflow-y: auto; padding: 0 2rem 5rem 2rem; margin-top: -5rem;
  display: flex; flex-direction: column; gap: 1.2rem; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none;
}
.messages-container::-webkit-scrollbar { display: none; }

.message-line {
  font-size: 1.1rem; line-height: 1.8; color: var(--message-color);
  opacity: 0; transform: translateY(20px); animation: messageAppear 0.6s ease forwards;
  max-width: 800px; margin: 0 auto; width: 100%;
}
@keyframes messageAppear { to { opacity: 1; transform: translateY(0); } }

.typing-indicator {
  display: none; padding: 1rem 2rem; color: var(--secondary); font-style: italic; opacity: 0.7;
}
.typing-indicator.show { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 0.7; } }

/* Right Side - SLAVIK */
.right-side {
  width: 35%; display: flex; align-items: flex-end; justify-content: center;
  position: relative; padding: 2rem; padding-bottom: 0;
}
.android-wrapper { position: relative; width: 100%; max-width: 450px; margin-bottom: -60px; }
.android-container { position: relative; width: 100%; animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-15px); } }

.android-container img {
  width: 100%; height: auto; filter: drop-shadow(0 30px 60px var(--shadow-color)); object-fit: contain;
}

.glow-effect {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 70%; height: 70%; background: linear-gradient(135deg, rgba(37,99,235, var(--glow-opacity)) 0%, rgba(6,182,212, var(--glow-opacity)) 100%);
  border-radius: 50%; filter: blur(60px); z-index: -1; animation: glow 3s ease-in-out infinite;
}
@keyframes glow { 0%, 100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 0.8; transform: scale(1.1); } }

/* Footer */
footer {
  position: fixed; bottom: 0; left: 0; width: 100%;
  background: var(--footer-bg); backdrop-filter: blur(20px);
  border-top: 1px solid var(--footer-border); padding: 1.5rem 5%; z-index: 100;
}
.footer-content { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.input-row { display: flex; align-items: center; gap: 1rem; justify-content: center; }

.btn-demo, .btn-want {
  padding: 0.75rem 1.5rem; border-radius: 12px; font-weight: 600; font-size: 0.9rem;
  cursor: pointer; transition: all 0.3s ease; border: none; white-space: nowrap;
}
.btn-demo {
  background: var(--btn-demo-bg); color: var(--btn-demo-color); border: 2px solid var(--btn-demo-border);
}
.btn-demo:hover { border-color: var(--btn-demo-hover-border); background: var(--btn-demo-hover-bg); }
.btn-want { background: var(--gradient); color: var(--white); box-shadow: 0 10px 30px var(--shadow-color); }
.btn-want:hover { transform: translateY(-2px); box-shadow: 0 15px 40px var(--shadow-color); }

.input-container { flex: 1; max-width: 500px; position: relative; display: flex; align-items: center; }
.chat-input {
  width: 100%; padding: 1rem 3.5rem 1rem 1.5rem; background: var(--input-bg);
  border: 2px solid var(--input-border); border-radius: 12px; color: var(--text-primary);
  font-family: inherit; font-size: 1rem; outline: none; transition: all 0.3s ease;
}
.chat-input:focus { border-color: var(--primary); background: var(--bg-primary); }
[data-theme="dark"] .chat-input:focus { background: rgba(255, 255, 255, 0.08); }
.chat-input::placeholder { color: var(--text-muted); }
.send-button {
  position: absolute; right: 8px; width: 40px; height: 40px; background: var(--gradient);
  border: none; border-radius: 8px; color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: transform 0.3s ease;
}
.send-button:hover { transform: scale(1.1); }

.footer-bottom {
  text-align: center; font-size: 0.75rem; color: var(--footer-text);
  padding-top: 1rem; border-top: 1px solid var(--footer-border);
}
.footer-bottom a { color: var(--footer-link); text-decoration: none; margin: 0 0.5rem; transition: color 0.3s ease; }
.footer-bottom a:hover { color: var(--secondary); }

/* Responsive */
@media (max-width: 1024px) {
  .right-side { width: 25%; padding: 1rem; }
  .android-wrapper { max-width: 300px; margin-bottom: -20px; }
  .left-space { width: 5%; min-width: 30px; }
  .main-title { font-size: 1.8rem; }
  .message-line { font-size: 1rem; }
  .dropdown-menu { width: 280px; }
}

@media (max-width: 768px) {
  .demo-banner {
      font-size: 0.8rem;
      padding: 0.5rem 0.75rem;
  }
  
  .main-container { 
      padding-top: calc(var(--banner-height) + 64px); 
      padding-bottom: 140px; 
  }
  header { 
      top: var(--banner-height); 
      padding: 0.75rem 1rem; 
  }
  
  .logo { font-size: 1rem; gap: 0.5rem; }
  .logo-icon { width: 32px; height: 32px; }
  .logo-icon img { width: 24px; height: 24px; }

  .header-center {
      position: static;
      transform: none;
      flex: 1;
      margin: 0 0.75rem;
      min-width: 0;
  }

  .demo-trigger {
      font-size: 0.75rem;
      padding: 0.4rem 0.6rem;
      width: 100%;
      justify-content: center;
  }

  .dropdown-menu {
      position: fixed;
      top: calc(var(--banner-height) + 60px);
      left: 50%;
      transform: translateX(-50%);
      width: 90vw;
      max-width: 350px;
  }

  .theme-label { display: none; }
  .theme-toggle { width: 50px; height: 28px; }
  .theme-toggle-slider { width: 20px; height: 20px; top: 2px; left: 2px; }
  [data-theme="light"] .theme-toggle-slider { transform: translateX(22px); }
  
  .left-space { display: none; }
  .right-side {
      display: flex !important; width: 40%; position: fixed; right: 0; bottom: 140px;
      top: auto; padding: 0; z-index: 1;
  }
  .android-wrapper { max-width: 200px; margin-bottom: -10px; opacity: 0.2; }
  .android-container img { filter: drop-shadow(0 10px 30px var(--shadow-color)); }
  .glow-effect { display: none; }
  
  .chat-area { z-index: 2; }
  
  .title-container { height: 60px; margin-bottom: 1rem; }
  .main-title { font-size: 1.4rem; }
  .message-line { font-size: 0.95rem; padding: 0 1rem; }
  
  .input-row { flex-wrap: nowrap; gap: 0.5rem; }
  .btn-demo, .btn-want { padding: 0.6rem 1rem; font-size: 0.8rem; min-width: auto; }
  .input-container { max-width: none; }
  .chat-input { padding: 0.75rem 3rem 0.75rem 1rem; font-size: 0.9rem; }
  .send-button { width: 35px; height: 35px; }
  footer { padding: 1rem 3%; }
}

@media (max-width: 480px) {
  .demo-banner {
      flex-direction: column;
      gap: 0.25rem;
      padding: 0.6rem 0.75rem;
  }
  .btn-demo, .btn-want { padding: 0.5rem 0.75rem; font-size: 0.75rem; }
  .chat-input { padding: 0.7rem 2.5rem 0.7rem 0.75rem; font-size: 0.85rem; }
  .header-center { margin: 0 0.5rem; }
}