:root {
  color-scheme: dark;
  --bg: #050607;
  --card: #111318;
  --card-alt: #171a20;
  --border: #242833;
  --accent: #66e4b1;
  --accent-strong: #45c18f;
  --text: #f4f6fb;
  --muted: #9da5ba;
  --danger: #ff6b6b;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  padding: 2rem clamp(1rem, 5vw, 4rem);
}

.hero {
  margin: 0 auto 2rem auto;
  max-width: 720px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

h1 {
  margin: 0 0 0.75rem 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.lede {
  font-size: 1.1rem;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  margin: 0 auto;
  max-width: 720px;
}

.upload-card form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 20px;
  min-height: 200px;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--card-alt);
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.drop-zone.dragging {
  border-color: var(--accent);
  background: rgba(102, 228, 177, 0.08);
}

.drop-zone input {
  display: none;
}

.drop-zone__title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.drop-zone__hint {
  margin: 0;
  color: var(--muted);
}

.note {
  background: rgba(102, 228, 177, 0.08);
  border: 1px solid rgba(102, 228, 177, 0.3);
  border-radius: 16px;
  padding: 1rem;
  color: var(--accent);
}

button {
  font: inherit;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.5rem;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.primary {
  background: var(--accent);
  color: #041b12;
  font-weight: 600;
}

.secondary {
  background: #1d212a;
  color: var(--text);
  border: 1px solid var(--border);
}

.share-row {
  display: flex;
  gap: 0.5rem;
}

.share-row input {
  flex: 1;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card-alt);
  color: var(--text);
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
}

@media (max-width: 600px) {
  .share-row {
    flex-direction: column;
  }
  
  .share-row input {
    width: 100%;
  }
  
  .share-row button {
    width: 100%;
  }
}

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

.small {
  font-size: 0.8rem;
}

.result {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.viewer {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.overlay {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.overlay__title {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--muted);
}

.overlay__message {
  font-size: 1.25rem;
  line-height: 1.4;
  min-height: 3.5rem;
}

.overlay__countdown {
  font-size: 1.5rem;
  color: var(--danger);
  font-weight: 600;
}

.overlay__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.viewer__content {
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview__media {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.preview__generic {
  text-align: center;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
}

.modal:not([hidden]) {
  display: flex;
}

.modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  z-index: 10001;
}

.modal-content h2 {
  margin: 0;
  font-size: 1.5rem;
}

.modal-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.modal-content button {
  align-self: flex-end;
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  body {
    padding: 1.5rem;
  }

  .viewer {
    grid-template-columns: 1fr;
  }
}
