@font-face {
  font-family: "UnifrakturMaguntia";
  src: url("/static/fonts/UnifrakturMaguntia.woff2") format("woff2");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  background: #0a0a0a;
  color: #f5f5f0;
  font-family: Georgia, "Times New Roman", serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

#app {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: center;
}

h1 {
  font-family: "UnifrakturMaguntia", Georgia, serif;
  font-size: 2.8rem;
  font-weight: normal;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
  color: #fff;
}

section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

section[hidden] {
  display: none;
}

label {
  font-size: 1rem;
  color: #cfcfc4;
}

button {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  background: #d9a441;
  color: #0a0a0a;
  cursor: pointer;
}

button:disabled {
  background: #4a4a3a;
  color: #8a8a80;
  cursor: not-allowed;
}

button.secondary {
  background: transparent;
  border: 1px solid #555;
  color: #cfcfc4;
  padding: 12px;
  font-size: 1rem;
}

#filter-select-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

#filter-select {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-family: inherit;
  background: #1a1a1a;
  color: #f5f5f0;
  border: 1px solid #444;
  border-radius: 10px;
}

#preview-choice-screen p.big {
  margin: 0;
}

#ai-unavailable-text {
  color: #cfcfc4;
  font-size: 0.9rem;
  margin: 0;
}

#preview-options {
  display: flex;
  flex-direction: row;
  gap: 12px;
  width: 100%;
}

.preview-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.preview-option[hidden] {
  display: none;
}

.preview-option img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #444;
}

.preview-option span {
  font-size: 0.85rem;
  color: #cfcfc4;
}

#done-photo-wrap {
  position: relative;
  width: 100%;
}

#done-photo {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

#delete-photo-button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.75);
  color: #f5f5f0;
  font-size: 1.1rem;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#preview-box {
  width: 100%;
  min-height: 220px;
  border: 2px dashed #555;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  overflow: hidden;
}

#preview {
  max-width: 100%;
  max-height: 260px;
  border-radius: 8px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #333;
  border-top-color: #d9a441;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.big {
  font-size: 1.6rem;
  color: #fff;
}

#error-text {
  color: #e06a5a;
}

#error-text[hidden] {
  display: none;
}
