/* Face Blur - Kawaii Bear Theme */
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-link {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary-light);
  text-decoration: none;
  transition: transform 0.15s;
}

.back-link:hover {
  transform: scale(1.03);
}

/* Privacy notice */
.privacy-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,230,118,0.08);
  border: 1px solid rgba(0,230,118,0.25);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--safe);
}

.privacy-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Drop zone */
.drop-zone {
  border: 2px dashed var(--primary-light);
  border-radius: 28px;
  padding: 56px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.25s, background 0.25s, transform 0.25s, box-shadow 0.25s;
  position: relative;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary-light);
  background: var(--surface-hover);
  transform: scale(1.02);
  box-shadow: 0 0 24px var(--accent-glow), var(--shadow-hover);
}

.drop-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
  display: block;
  animation: bear-wave 2s ease-in-out infinite;
}

@keyframes bear-wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

.drop-zone p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.drop-hint {
  font-size: 0.85rem !important;
  margin-top: 6px;
}

/* File list */
.file-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Result card */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.result-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}

.result-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--radius-input);
  flex-shrink: 0;
}

.result-info {
  flex: 1;
  min-width: 0;
}

.result-name {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Preview area */
.preview-area {
  position: relative;
  text-align: center;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}

.preview-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.preview-img {
  max-width: 100%;
  max-height: 500px;
  border-radius: var(--radius-input);
  display: block;
}

.face-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Face detection boxes */
.face-box {
  position: absolute;
  border: 2px solid var(--primary-light);
  background: rgba(74,111,165,0.15);
  border-radius: 6px;
  pointer-events: auto;
  transition: border-color 0.15s, background 0.15s;
}

.face-box:hover {
  border-color: var(--caution);
  background: rgba(251,191,36,0.15);
}

.face-box-delete {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--warning);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  pointer-events: auto;
  z-index: 2;
}

.face-box:hover .face-box-delete {
  opacity: 1;
}

.face-box-delete:hover {
  transform: scale(1.15);
}

.face-box-label {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--surface);
  color: var(--primary-light);
  padding: 1px 6px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  white-space: nowrap;
}

/* Status badges */
.result-status {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: var(--radius-btn);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-pending,
.status-detecting {
  background: var(--surface-hover);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.status-detecting {
  animation: pulse-scan 1s ease infinite;
}

@keyframes pulse-scan {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-ready {
  background: rgba(251,191,36,0.1);
  color: var(--caution);
  border: 1px solid rgba(251,191,36,0.3);
}

.status-done {
  background: rgba(0,230,118,0.1);
  color: var(--safe);
  border: 1px solid rgba(0,230,118,0.3);
}

.status-nofaces {
  background: var(--surface-hover);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.status-error {
  background: rgba(248,113,113,0.1);
  color: var(--warning);
  border: 1px solid rgba(248,113,113,0.3);
}

/* ── Mode Selector (Gaussian / Mosaic / Sticker) ── */
.blur-mode-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 14px 18px 0;
  gap: 10px;
}

.blur-mode-tabs {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  overflow: hidden;
}

.blur-mode-btn {
  padding: 8px 22px;
  font-size: 0.8rem;
  font-weight: 700;
  border: none;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  min-height: 40px;
}

.blur-mode-btn + .blur-mode-btn {
  border-left: 1px solid var(--border);
}

.blur-mode-btn.mode-active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 0 12px var(--accent-glow);
}

.blur-mode-btn:hover:not(.mode-active) {
  background: var(--surface-hover);
}

/* ── Sticker Picker (categorized) ── */
.sticker-picker {
  display: none;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
}

.sticker-picker.visible {
  display: flex;
}

.sticker-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.sticker-group-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sticker-btn {
  width: 48px;
  height: 48px;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.sticker-btn:hover {
  transform: scale(1.1);
  border-color: var(--primary-light);
}

.sticker-btn.sticker-active {
  border-color: var(--primary-light);
  box-shadow: 0 0 10px var(--accent-glow);
  background: var(--surface-hover);
}

/* Actions */
.file-actions {
  display: flex;
  gap: 8px;
  padding: 0 18px 14px;
}

.file-actions .btn {
  font-size: 0.85rem;
  padding: 10px 20px;
  min-height: 40px;
}

@media (max-width: 600px) {
  .header-left {
    gap: 6px;
  }
  .back-link {
    font-size: 1rem;
  }
  .site-logo {
    width: 48px;
    height: 48px;
  }
  .logo-link {
    font-size: 1rem;
    gap: 6px;
  }
  .drop-zone {
    padding: 36px 16px;
  }
  .sticker-picker {
    max-height: 200px;
    margin: 8px 12px 0;
  }
  .sticker-btn {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
  .sticker-group-grid {
    gap: 4px;
  }
  .blur-mode-selector {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
}
