/* WeTransfer-inspired: light, minimal, one big drop zone */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #fafafa;
  --bg-drop: #f0f0f0;
  --bg-drop-hover: #e8e8e8;
  --bg-drop-drag: #e0f0ff;
  --text: #1a1a1a;
  --text-muted: #666;
  --accent: #ee3769;
  --accent-hover: #d92d5c;
  --success: #00c853;
  --error: #d32f2f;
  --border: rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --radius-lg: 20px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  font-weight: 500;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
}

/* Light noise overlay on background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' /%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

.app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  text-align: center;
}

/* Header — minimal, centered */
.app-header {
  padding: 12px 0 24px;
  text-align: center;
}

.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--accent);
}

.logo-icon {
  display: block;
  line-height: 0;
  color: var(--accent);
}

.logo:hover .logo-icon {
  color: var(--accent-hover);
}

.tagline {
  margin: 8px 0 0;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Main: one flow at a time, centered */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

/* Dropzone — hero, WeTransfer-style, centered */
.dropzone {
  width: 100%;
  max-width: 520px;
  min-height: 280px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-drop);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  position: relative;
}

.dropzone:hover {
  background: var(--bg-drop-hover);
  border-color: rgba(0, 0, 0, 0.12);
}

.dropzone.dragover {
  border-color: var(--accent);
  background: var(--bg-drop-drag);
}

.dropzone-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
}

.dropzone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
  z-index: 1;
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23999' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5' /%3E%3C/svg%3E") center/contain no-repeat;
}

.dropzone.dragover .dropzone-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ee3769' stroke-width='1.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5' /%3E%3C/svg%3E");
}

.dropzone-title {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

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

/* File info below dropzone */
.file-info {
  width: 100%;
  max-width: 520px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-info .label {
  color: var(--text-muted);
  font-weight: 400;
  margin-right: 6px;
}

.file-info__over {
  color: var(--error) !important;
  margin-top: 4px;
}

/* Actions */
.actions {
  width: 100%;
  max-width: 520px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Upload progress */
.upload-progress {
  width: 100%;
  padding: 12px 0;
}

.upload-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-drop);
  overflow: hidden;
  margin-bottom: 8px;
}

.upload-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.15s ease-out;
}

.upload-progress-text {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.1s ease, color 0.2s ease;
}

.button--primary {
  background: var(--accent);
  color: #fff;
}

.button--primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-0.5px);
}

.button--primary:active:not(:disabled) {
  transform: translateY(0);
}

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

.button--ghost {
  background: transparent;
  color: var(--text-muted);
  margin-top: 8px;
}

.button--ghost:hover {
  color: var(--text);
}

/* Status */
.status {
  min-height: 20px;
  font-size: 0.9rem;
  font-weight: 400;
  text-align: center;
}

.status.error {
  color: var(--error);
}

.status.success {
  color: var(--success);
}

/* Result flow — WeTransfer-style success card */
.flow--result {
  justify-content: center;
  padding: 24px 0;
}

.result-card {
  width: 100%;
  max-width: 520px;
  padding: 32px 24px;
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  text-align: center;
}

.result-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 200, 83, 0.12);
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.result-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.result-desc {
  margin: 0 0 20px;
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 400;
}

.link-box {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.link-input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.link-input:focus {
  border-color: var(--accent);
}

.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 480px) {
  .app {
    padding: 16px 16px 32px;
  }

  .dropzone {
    min-height: 240px;
  }

  .dropzone-inner {
    padding: 20px;
  }

  .dropzone-title {
    font-size: 1.1rem;
  }

  .result-card {
    padding: 24px 20px;
  }

  .link-box {
    flex-direction: column;
  }

  .button--primary {
    width: 100%;
  }
}
