:root {
  color-scheme: light;
  --bg: #f7f7f8;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #111827;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "SF Pro Text", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 24px;
}

.header h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

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

.upload {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.file-input {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px dashed var(--border);
  background: var(--card);
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
}

.file-input input {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.list {
  display: grid;
  gap: 12px;
}

.file {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

.file-name {
  font-weight: 600;
}

.file-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border-radius: 12px;
  border: 1px dashed var(--border);
}

.preview {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 18px;
}

.preview img,
.preview video,
.preview audio,
.preview iframe {
  width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.preview-text {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
  color: var(--text);
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (min-width: 720px) {
  .header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
