/* Общие стили */
:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --success-color: #4CAF50;
  --info-color: #2196F3;
  --warning-color: #ff9800;
  --danger-color: #f44336;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  font-size: 16px;
}

body {
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #333;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Основная структура */
.outer-container {
  width: 100%;
  max-width: 800px;
  margin: 80px auto 20px;
  padding: 0 15px;
}

.container {
  background-color: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
}

/* Логотип и заголовок */
.logo {
  position: fixed;
  top: 10px;
  left: 10px;
  width: 150px;
  height: auto;
  z-index: 100;
}

.header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.icon {
  width: 40px;
  height: 40px;
  margin-right: 10px;
}

h1 {
  color: #4a4a4a;
  text-align: center;
  margin: 0;
  font-size: 1.5rem;
}

/* Описание */
.description {
  background-color: var(--light-color);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  max-height: 400px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.description h3 {
  color: #2c3e50;
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.description ul {
  padding-left: 20px;
  margin: 10px 0;
}

.description li {
  margin-bottom: 5px;
}

/* Форма и кнопки */
#uploadForm {
  display: flex;
  flex-direction: column;
}

#fileInput {
  margin-bottom: 1rem;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  width: 100%;
}

.btn {
  color: white;
  padding: 0.75rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-bottom: 0.5rem;
  font-weight: 500;
  width: 100%;
  font-size: 1rem;
  -webkit-appearance: none;
  appearance: none;
}

#previewButton {
  background-color: var(--info-color);
}

#previewButton:hover {
  background-color: #0b7dda;
}

#analyzeButton {
  background-color: var(--warning-color);
  display: none;
}

#analyzeButton:hover {
  background-color: #e68a00;
}

#uploadButton {
  background-color: var(--success-color);
  display: none;
}

#uploadButton:hover {
  background-color: #45a049;
}

/* Видеоплеер */
#videoPreview {
  width: 100%;
  max-height: 50vh;
  margin-top: 1rem;
  display: none;
  border-radius: 4px;
  object-fit: contain;
  background-color: #000;
}

/* Прогресс и сообщения */
#progressBar {
  margin-top: 1rem;
  display: none;
}

.progress {
  height: 20px;
  background-color: #f3f3f3;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--success-color);
  text-align: center;
  color: white;
  line-height: 20px;
  transition: width 0.5s ease;
}

.message {
  margin-top: 1rem;
  padding: 0.5rem;
  border-radius: 4px;
  text-align: center;
  font-size: 0.9rem;
}

#errorMessage {
  background-color: #ffebee;
  color: var(--danger-color);
  display: none;
}

#processingMessage {
  background-color: #e8f5e9;
  color: #2e7d32;
  display: none;
}

#processingAnimation {
  display: none;
  text-align: center;
  margin-top: 20px;
}

.loader {
  display: inline-block;
  width: 40px;
  height: 40px;
}

.loader:after {
  content: " ";
  display: block;
  width: 32px;
  height: 32px;
  margin: 4px;
  border-radius: 50%;
  border: 6px solid #309e26;
  border-color: #309e26 transparent #309e26 transparent;
  animation: loader 1.2s linear infinite;
}

@keyframes loader {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .outer-container {
    margin: 70px auto 15px;
    padding: 0 10px;
  }
  
  .container {
    padding: 1rem;
  }
  
  .logo {
    width: 120px;
    top: 5px;
    left: 5px;
  }
  
  h1 {
    font-size: 1.3rem;
  }
  
  .description {
    max-height: 150px;
    font-size: 0.85rem;
    padding: 10px;
  }
  
  #videoPreview {
    max-height: 40vh;
  }
  
  .btn {
    padding: 0.65rem;
  }
}

@media (max-width: 480px) {
  .logo {
    width: 100px;
  }
  
  .header {
    flex-direction: column;
    text-align: center;
  }
  
  .icon {
    margin-right: 0;
    margin-bottom: 5px;
  }
  
  #videoPreview {
    max-height: 35vh;
  }
}

/* iOS специфичные стили */
@supports (-webkit-touch-callout: none) {
  .description {
    padding-bottom: 20px;
  }
  
  #fileInput {
    font-size: 16px;
  }
}

/* Android специфичные стили */
@supports (-webkit-overflow-scrolling: touch) {
  .container {
    -webkit-overflow-scrolling: touch;
  }
}

/* Обновленные стили контактной информации */
.company-info {
    margin: 1rem 0;
    padding: 0.5rem;
}

.company-info h3 {
    font-size: 1.0rem;
    margin-bottom: 0.5rem;
}

.info-card p {
    margin: 0.4rem 0;
    font-size: 0.95rem;
    line-height: 0.8;
}

/* Компактная форма */
.contact-container {
    padding: 0.3rem !important;
}

.form-group {
    margin-bottom: 0.5rem;
}

.form-group label {
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea {
    padding: 0.5rem 0.5rem 0.5rem 30px !important;
    font-size: 0.6rem;
    min-height: 8px;
}

textarea {
    min-height: 40px !important;
    font-size: 0.5rem;
}

.fa {
    top: 32px !important;
    font-size: 0.9rem;
}

.btn-feedback {
  background-color: #2F4F4F !important; /* Темно-серый с зеленым оттенком */
  color: #FFFFFF !important; /* Белый текст */
  border: 1px solid #3D5A5A !important;
  transition: all 0.3s ease;
  position: relative;
}

/* Кнопка отправки */
.btn-submit {
    padding: 0.5rem 1rem !important;
    margin-top: 0.5rem !important;
}

.info-card i.fa {
  margin-right: 0.8rem;
  color: #667eea;
}

.alert {
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 5px;
}

.alert.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.form-group {
  margin-bottom: 1.0rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  padding-left: 35px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.captcha-code {
  font-weight: bold;
  color: #2c5282;
  font-size: 1.2rem;
  letter-spacing: 2px;
}

.btn {
  background: #2c5282;
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
  width: 100%;
}

.btn:hover {
  background: #1a365d;
}

.fa {
  position: absolute;
  left: 10px;
  top: 38px;
  color: #667eea;
}
/* Стиль для кнопки обратной связи */
.btn-feedback {
    background-color: #2F4F4F !important; /* Тёмно-серый с зеленоватым оттенком */
    color: #F0FFF0 !important; /* Светло-зеленоватый текст */
    border: 1px solid #3D5A5A !important;
    transition: all 0.3s ease;
}

.btn-feedback:hover {
    background-color: #3D5A5A !important; /* Оттенок при наведении */
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
/* Стили кнопки выхода */
.logout-container {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1000;
}

.btn-logout {
  background: rgba(255, 255, 255, 0.9) !important;
  color: #2F4F4F !important;
  padding: 8px 15px !important;
  border: 1px solid #2F4F4F !important;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
}

.btn-logout:hover {
  background: #2F4F4F !important;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-logout i {
  font-size: 1.1rem;
}
.consent-text {
  margin: 15px 0;
  font-size: 0.8em;
  color: #666;
  text-align: center;
}