* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #1a1a2e;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

#deepar-div {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #000;
}

#deepar-div canvas {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

/* Face counter badge */
.face-counter {
  position: fixed;
  top: 16px;
  left: 16px;
  padding: 8px 14px;
  background: rgba(15, 52, 96, 0.9);
  border: 2px solid #4ecdc4;
  border-radius: 20px;
  color: #4ecdc4;
  font-size: 13px;
  font-weight: 600;
  z-index: 20;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.face-counter.no-face {
  border-color: #e94560;
  color: #e94560;
}

.face-counter.multi-face {
  border-color: #ffd93d;
  color: #ffd93d;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 217, 61, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255, 217, 61, 0); }
}

/* Info badge */
#info-badge {
  position: fixed;
  top: 16px;
  right: 16px;
  padding: 8px 14px;
  background: rgba(15, 52, 96, 0.9);
  border: 1px solid #0f3460;
  border-radius: 20px;
  color: #a0a0a0;
  font-size: 11px;
  z-index: 20;
  backdrop-filter: blur(8px);
}

#loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  z-index: 10;
}

#loading.hidden {
  display: none;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #e94560;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#filter-bar {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #16213e;
  border-top: 2px solid #0f3460;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #0f3460 transparent;
  flex-shrink: 0;
}

#filter-bar::-webkit-scrollbar {
  height: 4px;
}

#filter-bar::-webkit-scrollbar-track {
  background: transparent;
}

#filter-bar::-webkit-scrollbar-thumb {
  background: #0f3460;
  border-radius: 2px;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.section-label {
  font-size: 10px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-left: 4px;
}

.filter-group {
  display: flex;
  gap: 8px;
}

.filter-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  min-width: 68px;
  border: 2px solid #0f3460;
  border-radius: 12px;
  background: #1a1a2e;
  color: #e0e0e0;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.filter-btn:hover {
  background: #0f3460;
  border-color: #e94560;
}

.filter-btn.active {
  background: #0f3460;
  border-color: #e94560;
  box-shadow: 0 0 12px rgba(233, 69, 96, 0.4);
}

.filter-icon {
  font-size: 26px;
  line-height: 1;
}

.filter-name {
  font-size: 10px;
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  .face-counter {
    font-size: 11px;
    padding: 6px 10px;
  }
  
  #info-badge {
    display: none;
  }
  
  .filter-btn {
    min-width: 60px;
    padding: 6px 10px;
  }
  
  .filter-icon {
    font-size: 22px;
  }
  
  .filter-name {
    font-size: 9px;
  }
}
