:root {
  color-scheme: light dark;
  font-family: "Segoe UI", Roboto, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

.container {
  max-width: 920px;
  width: 100%;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 30px 60px -30px rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(20px);
}

header h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
}

header p {
  margin: 0 0 1.5rem;
  line-height: 1.6;
  color: #cbd5f5;
}

.input-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.drop-zone {
  border: 2px dashed rgba(148, 163, 184, 0.5);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  background: rgba(30, 41, 59, 0.6);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.drop-zone.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

.drop-zone p {
  margin: 0 0 1rem;
  color: #cbd5f5;
}

.drop-zone__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

#browse-btn,
.secondary {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: none;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.secondary {
  background: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

#browse-btn:hover,
.secondary:hover {
  transform: translateY(-1px);
  background: rgba(148, 163, 184, 0.35);
}

.tips {
  margin: 0;
  padding-left: 1.25rem;
  color: #94a3b8;
}

.previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.preview-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.preview-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.preview-card footer {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: #cbd5f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-card button {
  border: none;
  background: none;
  color: #f97316;
  font-size: 0.75rem;
  cursor: pointer;
}

.prompt-label {
  font-weight: 600;
  color: #e2e8f0;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 100px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
  padding: 0.75rem;
  font-size: 1rem;
}

.primary {
  align-self: flex-start;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.primary:not(:disabled):hover {
  transform: translateY(-1px);
}

.results {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.results h2 {
  margin: 0;
  font-size: 1.6rem;
}

#result-text {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: #cbd5f5;
}

.result-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.result-images img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.status-message {
  font-size: 0.95rem;
  color: #94a3b8;
}

.camera-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1.5rem;
}

.camera-modal[hidden] {
  display: none;
}

.camera-modal__content {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: min(90vw, 480px);
}

.camera-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.camera-modal__header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.icon-button {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: none;
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.icon-button:hover {
  background: rgba(148, 163, 184, 0.3);
}

.camera-modal__content video {
  width: 100%;
  border-radius: 12px;
  background: #000;
}

.camera-modal__controls {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.camera-modal__controls button {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: none;
  background: #34d399;
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
}

.camera-modal__controls .secondary {
  background: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 720px) {
  .container {
    padding: 1.5rem;
  }

  .drop-zone {
    padding: 1.5rem;
  }
}
.login-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.25), transparent 55%), #0f172a;
}

.login-card {
  width: min(360px, 90vw);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 18px;
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  box-shadow: 0 30px 50px -20px rgba(15, 23, 42, 0.75);
}

.login-card h1 {
  margin: 0;
  font-size: 1.8rem;
}

.login-subtitle {
  margin: 0;
  color: #94a3b8;
  line-height: 1.6;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.login-form label {
  font-weight: 600;
  color: #e2e8f0;
}

.login-form input {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
  font-size: 1rem;
}

.login-form input:focus {
  outline: 2px solid rgba(99, 102, 241, 0.6);
  outline-offset: 2px;
}

.login-card .status-message {
  min-height: 1.2rem;
  margin: 0;
  color: #f87171;
}
.app-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
}

.app-header__meta {
  flex: 1;
}

.app-header button.secondary {
  align-self: center;
  white-space: nowrap;
}
