:root {
  --bg: #eef3f8;
  --bg-accent: radial-gradient(circle at top left, #ffffff 0%, #eef3f8 45%, #dfe8f1 100%);
  --card: rgba(255, 255, 255, 0.9);
  --card-border: rgba(18, 40, 63, 0.08);
  --text: #15263a;
  --muted: #5f7185;
  --primary: #d94841;
  --primary-dark: #b9302a;
  --primary-soft: rgba(217, 72, 65, 0.14);
  --success: #1f8f61;
  --error: #c63d2f;
  --shadow: 0 20px 45px rgba(22, 35, 53, 0.12);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg-accent);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 90% 10%, rgba(217, 72, 65, 0.12), transparent 24%),
    radial-gradient(circle at 15% 85%, rgba(21, 38, 58, 0.08), transparent 22%);
  pointer-events: none;
}

.page {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero {
  padding: 34px;
  margin-bottom: 24px;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.subtitle {
  margin: 12px 0 10px;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
}

.description {
  margin: 0 auto;
  max-width: 700px;
  color: var(--muted);
  line-height: 1.65;
}

.workspace {
  padding: 28px;
}

.dropzone {
  border: 2px dashed rgba(21, 38, 58, 0.18);
  border-radius: var(--radius-md);
  padding: 34px 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 252, 0.96));
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-active {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(217, 72, 65, 0.12);
  outline: none;
}

.dropzone-content {
  text-align: center;
}

.dropzone-icon {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), #f08864);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 28px rgba(217, 72, 65, 0.22);
}

.dropzone h2,
.toolbar h2 {
  margin: 0;
}

.dropzone p,
.toolbar-hint {
  margin: 8px 0 0;
  color: var(--muted);
}

.file-summary {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.message {
  min-height: 24px;
  margin: 16px 0 4px;
  color: var(--muted);
  font-weight: 600;
}

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

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

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin: 22px 0 16px;
}

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

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--primary), #f06d5f);
  color: #fff;
  box-shadow: 0 14px 24px rgba(217, 72, 65, 0.2);
}

.secondary-button {
  background: rgba(21, 38, 58, 0.08);
  color: var(--text);
}

.ghost-button {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(21, 38, 58, 0.12);
  min-height: 38px;
  padding: 0 14px;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.ghost-button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
}

.file-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(21, 38, 58, 0.08);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 12px 24px rgba(20, 33, 50, 0.06);
}

.file-item + .file-item {
  margin-top: 12px;
}

.file-item.dragging {
  opacity: 0.45;
}

.file-item.drag-over {
  border-color: var(--primary);
}

.drag-handle {
  cursor: grab;
  color: var(--muted);
  font-size: 1.35rem;
  user-select: none;
}

.file-meta {
  min-width: 0;
}

.file-name {
  display: block;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-size {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.file-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.empty-state {
  padding: 22px;
  border: 1px dashed rgba(21, 38, 58, 0.12);
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.6);
}

.hidden {
  display: none;
}

.credit {
  margin: 18px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.credit-heart {
  color: var(--primary);
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 20px, 1000px);
    padding: 20px 0 28px;
  }

  .hero,
  .workspace {
    padding: 22px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .actions {
    width: 100%;
  }

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

  .file-item {
    grid-template-columns: 1fr;
  }

  .drag-handle {
    display: none;
  }

  .file-controls {
    justify-content: flex-start;
  }
}
