* {
  box-sizing: border-box;
  font-family: sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f4f8f9;
}

.container {
  width: min(920px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px;
}

.preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 2px dashed #00aab4;
  border-radius: 12px;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

#placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #7b8a8f;
  user-select: none;
}

#placeholder .icon {
  font-size: 56px;
  opacity: 0.45;
}

#placeholder .text {
  font-size: 15px;
}

.actions {
  display: flex;
  gap: 12px;
}

button {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: #00aab4;
  color: white;
  font-size: 15px;
  cursor: pointer;
  transition: 0.15s;
}

button:hover {
  background: #0098a2;
}

button:active {
  transform: scale(0.98);
}

input {
  display: none;
}

@media (max-width: 640px) {
  body {
    align-items: stretch;
  }

  .container {
    width: 100%;
    min-height: 100vh;
  }

  .preview {
    aspect-ratio: 1;
  }

  .actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  button {
    height: 48px;
  }
}

.loading {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(4px);
  z-index: 999;
}

.hidden {
  display: none;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #e6e6e6;
  border-top: 4px solid #00aab4;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 10px;
}

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

/* biome-ignore lint/style/noDescendingSpecificity: fuck biomejs */
.loading .text {
  font-size: 14px;
  color: #444;
}

.app-footer {
  margin-top: 24px;
  padding: 16px 0;
  text-align: center;
  border-top: 1px solid rgba(0, 128, 128, 0.15);
}

.footer-line {
  line-height: 1.6;
}

.footer-line-teal {
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  color: #008080; /* teal */
  letter-spacing: 0.3px;
}

.footer-line-sub {
  font-size: 13px;
  color: #4d9999;
}
