/* HelloChat - New Color System */

/* Color tokens */
:root {
  --blue: #0036FF;
  --lime: #B5F800;
  --black: #000000;
  --white: #FFFFFF;
}

/* Semantic variables (default BLUE theme) */
:root {
  --bg: var(--blue);
  --text: var(--white);
  --muted: rgba(255, 255, 255, 0.75);
  --bubble: var(--white);
  --bubble-text: var(--black);
  --outline: var(--black);
  --accent: var(--lime);
  --accent-2: var(--blue);
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-2xl: 32px;
  --font-size-3xl: 48px;
  
  /* Border radius */
  --radius: 24px;
  --radius-sm: 8px;
}

/* BLUE theme (default) */
body.theme-blue {
  --bg: var(--blue);
  --text: var(--white);
  --muted: rgba(255, 255, 255, 0.75);
  --accent: var(--lime);
  --accent-2: var(--blue);
}

/* LIME theme */
body.theme-lime {
  --bg: var(--lime);
  --text: var(--black);
  --muted: rgba(0, 0, 0, 0.65);
  --accent: var(--blue);
  --accent-2: var(--lime);
}
/* LIGHT theme - для главной страницы */
body.theme-light {
  --bg: var(--white);
  --text: var(--black);
  --muted: rgba(0, 0, 0, 0.65);
  --bubble: var(--white);
  --bubble-text: var(--black);
  --outline: var(--black);
  --accent: var(--blue);
  --accent-2: var(--lime);
}


/* Base styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-md) 0;
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }

p {
  margin: 0 0 var(--space-md) 0;
}

ul {
  margin: 0;
  padding-left: var(--space-lg);
}

li {
  margin-bottom: var(--space-xs);
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--black);
  text-decoration: underline;
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Bubble component */
.bubble {
  background: var(--bubble);
  color: var(--bubble-text);
  border: 2px solid var(--outline);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  position: relative;
}

/* Sticker decorations */
.sticker {
  position: absolute;
  top: -8px;
  right: var(--space-md);
  background: var(--accent);
  color: var(--black);
  border: 2px solid var(--black);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--space-xs);
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transform: rotate(-2deg);
}

/* Tape decorations */
.tape {
  position: absolute;
  background: var(--white);
  border: 2px solid var(--black);
}

.tape-corner {
  top: -2px;
  left: -2px;
  width: 40px;
  height: 40px;
  transform: rotate(-45deg);
  border-radius: var(--space-xs);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--black);
  border: 2px solid var(--black);
}

.btn-primary:hover {
  background: var(--black);
  color: var(--accent);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  color: var(--black);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Header - always white background */
.header {
  padding: var(--space-md) 0;
  background: var(--white);
  color: var(--black);
  border-bottom: 2px solid var(--black);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: var(--font-size-lg);
  color: var(--black);
  height: 80px;
}

.logo img {
  height: 64px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  gap: var(--space-lg);
}

.nav-link {
  color: rgba(0, 0, 0, 0.65);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--black);
  text-decoration: none;
}

/* Hero section */
.hero {
  padding: var(--space-2xl) 0;
}

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

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--muted);
  margin-bottom: var(--space-xl);
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.hero-banner {
  margin-top: var(--space-xl);
}

.hero-banner img {
  width: 100%;
  max-width: 800px;
  border-radius: var(--radius);
  border: 2px solid var(--black);
  display: block;
  margin: 0 auto;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.card {
  background: var(--white);
  color: var(--black);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  padding: var(--space-lg);
  text-align: center;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-md);
}

.card-icon img {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  border: 2px solid var(--black);
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

/* Sections */
.steps,
.use-cases {
  padding: var(--space-2xl) 0;
}

.steps h2,
.use-cases h2 {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

/* Page header */
.page-header {
  padding: var(--space-2xl) 0 var(--space-xl) 0;
  text-align: center;
}

.page-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  margin-top: var(--space-lg);
}

/* Content */
.content {
  padding-bottom: var(--space-2xl);
}

.content-grid {
  display: grid;
  gap: var(--space-xl);
}

.content-card {
  background: var(--white);
  color: var(--black);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  padding: var(--space-xl);
  position: relative;
}

.content-card h2,
.content-card h3 {
  margin-bottom: var(--space-lg);
}

.content-card p + p {
  margin-top: var(--space-md);
}

.manager-cta {
  margin-top: var(--space-xl);
  display: flex;
  justify-content: center;
}

.manager-cta .btn {
  min-width: 240px;
}

.benefits-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-lg) 0;
  display: grid;
  gap: var(--space-md);
}

/* Search */
.search-section {
  padding: var(--space-2xl) 0;
}

.search-card {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.search-form {
  margin-top: var(--space-lg);
}

.search-input {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--black);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  background: var(--white);
  color: var(--black);
  margin-bottom: var(--space-md);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

/* Results */
.results-section {
  padding-bottom: var(--space-2xl);
}

.results {
  display: grid;
  gap: var(--space-lg);
  max-width: 800px;
  margin: 0 auto;
}

.result-card {
  position: relative;
}

.result-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* Screen layout */
.screen-mode {
  background: var(--bg);
  overflow: hidden;
}

.screen-layout {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

/* .screen-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2xl);
  align-items: center;
  width: 100%;
  background-image: url('/static/globedialogue.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  color: var(--black);
  border: none;
  font-size: var(--font-size-2xl);
  text-align: center;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s ease;
  padding: var(--space-2xl);
} */

.qr-panel {
  text-align: center;
  background: var(--white);
  color: var(--black);
  border: 2px solid var(--black);
  border-radius: var(--radius);
  padding: var(--space-lg);
}

.qr-code {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-sm);
}

.qr-label {
  margin-top: var(--space-md);
  font-size: var(--font-size-sm);
  color: rgba(0, 0, 0, 0.65);
}

.qr-panel.hidden {
  display: none;
}

/* Footer - always black background */
.footer {
  padding: var(--space-lg) 0;
  background: var(--black);
  color: var(--white);
  border-top: 2px solid var(--black);
  text-align: center;
  font-size: var(--font-size-sm);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive design */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .header-content {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .nav {
    order: -1;
  }
  
  .hero-buttons,
  .page-actions,
  .search-buttons,
  .result-actions {
    flex-direction: column;
  }
  
  /* .screen-content {
    grid-template-columns: 1fr;
    text-align: center;
  } */
  
  .cards {
    grid-template-columns: 1fr;
  }
  
  h1 { font-size: var(--font-size-2xl); }
  h2 { font-size: var(--font-size-xl); }
}

/* Новые стили для screen.html */
/* Screen mode styles */
.screen-layout {
    display: flex;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

.screen-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.message-section {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.screen-bubble {
    width: min(800px, 60vw);
    min-height: 250px;
    max-height: 400px;
    padding: 40px;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.screen-bubble p {
    margin: 0;
    line-height: 1.4;
    width: 100%;
    font-size: clamp(20px, 2.5vw, 28px);
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 8;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 100%;
}

.qr-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.qr-panel {
    text-align: center;
}

.qr-code {
    width: min(300px, 25vw);
    height: auto;
}

.qr-label {
    margin-top: 15px;
    font-size: clamp(14px, 1.5vw, 16px);
    color: #666;
    text-align: center;
}

/* Стили для видео-плеера */
.video-container {
    max-width: 800px;
    width: 100%;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

.video-player {
    width: 100%;
    border-radius: 8px;
    display: block;
}


/* Адаптивность для планшетов */
@media (max-width: 1024px) {
    .screen-content {
        gap: 30px;
    }
    
    .screen-bubble {
        width: min(600px, 55vw);
        min-height: 200px;
        padding: 30px;
    }
    
    .qr-code {
        width: min(250px, 22vw);
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .screen-layout {
        padding: 15px;
    }
    
    .screen-content {
        flex-direction: column;
        gap: 30px;
        justify-content: center;
    }
    
    .message-section {
        justify-content: center;
        width: 100%;
    }
    
    .screen-bubble {
        width: min(600px, 90vw);
        min-height: 180px;
        padding: 25px;
        max-height: 300px;
    }
    
    .screen-bubble p {
        -webkit-line-clamp: 6;
    }
    
    .qr-section {
        align-items: center;
        width: 100%;
    }
    
    .qr-code {
        width: min(250px, 40vw);
    }
}

@media (max-width: 480px) {
    .screen-layout {
        padding: 10px;
    }
    
    .screen-content {
        gap: 25px;
    }
    
    .screen-bubble {
        width: 95%;
        min-height: 150px;
        padding: 20px;
        max-height: 250px;
    }
    
    .screen-bubble p {
        -webkit-line-clamp: 5;
        font-size: clamp(18px, 4vw, 22px);
    }
    
    .qr-code {
        width: min(200px, 35vw);
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .screen-content {
        flex-direction: row;
        gap: 20px;
    }
    
    .screen-bubble {
        min-height: 120px;
        padding: 20px;
        max-height: 200px;
    }
    
    .screen-bubble p {
        -webkit-line-clamp: 4;
    }
    
    .qr-code {
        width: min(150px, 20vw);
    }
}