* { box-sizing: border-box; }
body { 
  margin: 0; 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif; 
  color: #1f2937; 
  background: #f8fafc;
  min-height: 100vh;
  line-height: 1.6;
}
header { 
  padding: 24px 20px; 
  background: #ffffff;
  color: #1f2937; 
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border-bottom: 1px solid #e5e7eb;
}
h1 { 
  margin: 0 0 8px; 
  font-size: 24px; 
  font-weight: 700;
  display: flex; 
  align-items: center; 
  gap: 12px;
  letter-spacing: -0.025em;
}
.pill { 
  background: #3b82f6;
  color: #fff; 
  border-radius: 4px; 
  padding: 4px 8px; 
  font-size: 12px; 
  font-weight: 600;
}
.sub { 
  margin: 0; 
  opacity: 0.9; 
  font-size: 15px; 
  font-weight: 400;
  line-height: 1.5;
}
main { 
  padding: 24px; 
  max-width: 1200px; 
  margin: 0 auto; 
}
.controls { 
  background: #ffffff; 
  border: 1px solid #e5e7eb; 
  border-radius: 8px; 
  padding: 24px; 
  margin-bottom: 24px; 
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.row { 
  display: flex; 
  gap: 12px; 
  align-items: center; 
  margin: 12px 0; 
  flex-wrap: wrap; 
}
label { 
  font-weight: 600; 
  color: #374151;
  font-size: 14px;
}
input[type=number], input[type=file], select { 
  padding: 12px 16px; 
  border: 2px solid #e5e7eb; 
  border-radius: 12px; 
  min-width: 140px; 
  font-size: 14px;
  transition: all 0.2s ease;
  background: #fff;
}
input[type=number]:focus, input[type=file]:focus, select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
button { 
  padding: 10px 16px; 
  border: 1px solid #d1d5db; 
  border-radius: 6px; 
  background: #ffffff;
  color: #374151;
  cursor: pointer; 
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
}
button:hover:not(:disabled) { 
  background: #f9fafb;
  border-color: #9ca3af;
}
button:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Специальные стили для кнопок камеры */
#enableCamera {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}
#enableCamera:hover:not(:disabled) {
  background: #059669;
  border-color: #059669;
}

#disableCamera {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}
#disableCamera:hover:not(:disabled) {
  background: #dc2626;
  border-color: #dc2626;
}

#refreshRate {
  background: #3b82f6;
  color: #ffffff;
  border-color: #3b82f6;
}
#refreshRate:hover:not(:disabled) {
  background: #2563eb;
  border-color: #2563eb;
}
.live { 
  margin-left: 16px; 
  display: flex;
  align-items: center;
  gap: 8px;
}
.live input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: #3b82f6;
}
.status { 
  padding: 12px 16px; 
  border-radius: 6px; 
  font-weight: 500;
  margin: 16px 0;
  border: 1px solid;
}
.status.info { 
  background: #eff6ff; 
  color: #1e40af; 
  border-color: #bfdbfe;
}
.status.warn { 
  background: #fffbeb; 
  color: #92400e; 
  border-color: #fed7aa;
}
.status.err { 
  background: #fef2f2; 
  color: #991b1b; 
  border-color: #fecaca;
}
.mt { margin-top: 16px; }
.viewer { 
  position: relative; 
  margin: 24px 0;
}
.video-wrap { 
  position: relative; 
  width: 100%; 
  max-width: 1000px; 
  margin: 0 auto; 
  aspect-ratio: 4/3; 
  background: #000; 
  border-radius: 8px; 
  overflow: hidden; 
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}
video, #overlay { 
  position: absolute; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
}
#overlay { pointer-events: none; }
.hide { display: none; }
.scan-controls { 
  text-align: center; 
  margin-top: 24px; 
}
.scan-controls button { 
  padding: 12px 24px; 
  font-size: 16px; 
  font-weight: 600; 
  background: #10b981;
  color: #fff; 
  border: 1px solid #10b981; 
  border-radius: 6px; 
  cursor: pointer; 
  transition: all 0.2s ease;
}
.scan-controls button:hover:not(:disabled) { 
  background: #059669;
  border-color: #059669;
}
.scan-controls button:disabled { 
  background: #9ca3af; 
  border-color: #9ca3af;
  cursor: not-allowed; 
}
.output .cards { 
  display: grid; 
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); 
  gap: 20px; 
  margin-top: 24px; 
}
.card { 
  background: #ffffff; 
  border: 1px solid #e5e7eb; 
  border-radius: 8px; 
  padding: 20px; 
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}
.card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.card-title { 
  font-weight: 600; 
  font-size: 14px; 
  margin-bottom: 8px; 
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.big { 
  font-size: 28px; 
  font-weight: 700; 
  letter-spacing: -0.025em; 
  color: #1f2937;
  margin: 8px 0;
}
.small { 
  font-size: 14px; 
  opacity: 0.7; 
  color: #6b7280;
  font-weight: 500;
}
.mono { 
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace; 
  white-space: pre-wrap; 
  word-break: break-word; 
  background: #f3f4f6;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
}
footer { 
  text-align: center; 
  padding: 24px 18px; 
  color: #6b7280;
  font-size: 14px;
  margin-top: 40px;
}

/* SEO текст */
.seo-text {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 32px;
  margin: 40px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  line-height: 1.7;
  color: #374151;
}

.seo-text h2 {
  color: #1f2937;
  font-size: 24px;
  font-weight: 700;
  margin: 24px 0 16px 0;
  line-height: 1.3;
}

.seo-text h2:first-child {
  margin-top: 0;
}

.seo-text p {
  margin: 16px 0;
  font-size: 16px;
}

.seo-text ul, .seo-text ol {
  margin: 16px 0;
  padding-left: 24px;
}

.seo-text li {
  margin: 8px 0;
  font-size: 16px;
}

