.upload-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}

/* Atmospheric background */
.upload-page::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('/img/ben.jpeg') center/cover no-repeat;
  filter: blur(24px) brightness(0.18) saturate(0.6);
  z-index: -2;
  transform: scale(1.05);
}

.upload-page::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(201,162,99,0.06) 0%, transparent 70%),
              linear-gradient(to bottom, rgba(10,9,8,0.3) 0%, rgba(10,9,8,0.7) 100%);
  z-index: -1;
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: 2rem;
}

.hero-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.25rem;
  border: 2px solid var(--color-primary);
  box-shadow: 0 0 0 6px rgba(201,162,99,0.1), 0 8px 32px rgba(0,0,0,0.6);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  margin-bottom: 0.3rem;
}

.hero-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

/* Upload card */
.upload-card {
  width: 100%;
  max-width: 400px;
  background: rgba(26, 23, 20, 0.85);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow), 0 0 40px rgba(0,0,0,0.4);
  padding: 1.75rem;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.step {
  display: none;
}

.step.active {
  display: block;
}

/* File picker */
.file-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  border: 1px dashed var(--border-gold);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
  min-height: 200px;
  -webkit-tap-highlight-color: transparent;
  background: rgba(201,162,99,0.03);
}

.file-picker:hover,
.file-picker:focus-within {
  border-color: var(--color-primary);
  background: rgba(201,162,99,0.07);
}

.picker-icon {
  color: var(--color-primary);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.picker-text {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.picker-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Message section */
.message-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.message-divider::before,
.message-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.message-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-warm);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.message-input {
  width: 100%;
  background: rgba(201,162,99,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 0.75rem;
  resize: vertical;
  min-height: 90px;
  transition: border-color 0.2s, background 0.2s;
}

.message-input::placeholder {
  color: var(--text-muted);
}

.message-input:focus {
  outline: none;
  border-color: var(--border-gold);
  background: rgba(201,162,99,0.06);
}

.message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.message-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.preview-message-wrap {
  margin-bottom: 1rem;
}

.name-section {
  margin-top: 1rem;
}

.name-optional {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.8rem;
}

.name-input {
  width: 100%;
  background: rgba(201,162,99,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.65rem 0.75rem;
  transition: border-color 0.2s, background 0.2s;
}

.name-input::placeholder {
  color: var(--text-muted);
}

.name-input:focus {
  outline: none;
  border-color: var(--border-gold);
  background: rgba(201,162,99,0.06);
}

/* Preview grid */
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.preview-header span {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-warm);
}

.btn-link {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.25rem;
  font-family: var(--font-body);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-code);
}

.preview-item img,
.preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-item .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,0.75);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-item .video-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 0.65rem;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.btn-large {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* Uploading state */
.upload-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: var(--text-warm);
  font-size: 0.9rem;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  flex-shrink: 0;
}

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

.progress-container {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary-hover), var(--color-primary));
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s;
}

.progress-text {
  text-align: center;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.upload-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Done state */
.done-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

#step-done {
  text-align: center;
  padding: 1rem 0;
}

#step-done h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

#step-done p {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  font-size: 0.9rem;
}

/* Error state */
.error-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: rgba(140, 74, 74, 0.15);
  border: 1px solid var(--color-danger);
  color: var(--color-danger);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

#step-error {
  text-align: center;
  padding: 1rem 0;
}

#step-error h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

#step-error p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* Offline banner */
.offline-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(184, 115, 51, 0.9);
  color: white;
  text-align: center;
  padding: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 1000;
  backdrop-filter: blur(8px);
}
