:root {
  --bg: #eef2ff;
  --bg-gradient: linear-gradient(135deg, #eef2ff, #e0f7f4);
  --card: #ffffff;
  --primary: #2563eb;
  --primary-soft: rgba(37, 99, 235, 0.1);
  --text: #0f172a;
  --muted: #6b7280;
  --radius: 18px;
}

/* Global */

* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-gradient);
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 0 0 20px 20px;
  padding: 20px 18px 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Header */

header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  text-align: center;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.recycle-icon {
  font-size: 40px;
  display: inline-block;
  animation: spin 4s linear infinite;
  color: #16a34a;
}

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

h1 {
  font-size: 1.4rem;
  margin: 0;
  color: var(--text);
}

.subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

/* Camera block */

.camera-block {
  background: #f5f3ff;
  border-radius: var(--radius);
  padding: 14px 12px;
  border: 1px solid #e0e7ff;
}

.camera-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.camera-preview {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #020617;
  position: relative;
}

video {
  width: 100%;
  display: block;
}

/* Button row */

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

button {
  border: none;
  cursor: pointer;
}

/* Kamera-FAB */

.camera-fab {
  background: var(--primary) !important;
  color: #fff !important;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-fab i,
.camera-fab .mdi {
  font-size: 26px;
}

/* Reusable button style */

.btn {
  padding: 10px 14px;
  border-radius: 9999px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.9rem;
  flex: 1 1 0;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #111827;
}

/* Hint text */

.camera-hint {
  font-size: 0.78rem;
  color: #4b5563;
  margin-top: 8px;
}

/* Actions (Analyse / Upcycling) */

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

/* Result box */

.result {
  background: #f9fafb;
  border-radius: 16px;
  padding: 14px 12px;
  border: 1px solid #e5e7eb;
  min-height: 56px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(148, 163, 184, 0.25);
}

/* Badges für Mülleimer-Farben */

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.blue {
  background: #dbeafe;
  color: #1e3a8a;
}

.yellow {
  background: #fef9c3;
  color: #854d0e;
}

.black {
  background: #111827;
  color: #fff;
}

/* Textfarben */

.muted {
  color: var(--muted);
}

/* Loader im Ergebnisfeld */

.loading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.6);
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}

/* Desktop / größere Screens */

@media (min-width: 600px) {
  body {
    padding: 24px 0;
  }

  .app {
    border-radius: 24px;
  }

  header {
    text-align: left;
    align-items: flex-start;
  }

  .title-row {
    justify-content: flex-start;
  }

  .camera-row {
    flex-direction: row;
    align-items: flex-start;
  }

  .camera-preview {
    max-width: 240px;
  }

  .actions {
    flex-direction: row;
  }

  .btn {
    flex: 0 0 auto;
  }
}
.camera-text {
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.btn-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 10px;
}

.two-actions {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 12px;
}

.action-block {
  text-align: center;
}

.action-label {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.mdi {
  text-align: center;
}

label.mdl-button {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cam-label,
.upload-label {
  cursor: pointer;
}


.hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  z-index: -1;
}



