:root {
  --bg: #0c1224;
  --panel: rgba(18, 25, 52, 0.9);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.12);
  --text: #eef3ff;
  --muted: #9eabd2;
  --accent: #67efbf;
  --accent-2: #ffb261;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(103, 239, 191, 0.2), transparent 24%),
    radial-gradient(circle at 80% 15%, rgba(255, 178, 97, 0.16), transparent 20%),
    linear-gradient(145deg, #09101f, #141b35 45%, #0c1224);
}

.page-shell {
  width: min(1020px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero,
.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  padding: 32px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4.6rem);
  line-height: 1.02;
  max-width: 12ch;
}

.hero-text {
  margin: 18px 0 0;
  max-width: 60ch;
  color: var(--muted);
  line-height: 1.7;
}

.stack {
  display: grid;
  gap: 24px;
}

.panel {
  padding: 26px;
}

.panel-header {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-index {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(103, 239, 191, 0.22), rgba(255, 178, 97, 0.16));
  color: var(--accent);
  font-weight: 700;
  margin: 0;
  flex: 0 0 auto;
}

.panel-header h2 {
  margin: 0;
}

.panel-header p:last-child {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.info-card,
.file-summary,
.download-card,
.download-summary,
.progress-block {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
}

.info-card {
  padding: 18px;
}

.info-card h3 {
  margin: 0 0 10px;
}

.info-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.dropzone {
  display: grid;
  place-items: center;
  min-height: 128px;
  border-radius: 22px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 44%),
    rgba(255, 255, 255, 0.04);
  text-align: center;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.dropzone:hover,
.dropzone.is-filled {
  transform: translateY(-1px);
  border-color: rgba(103, 239, 191, 0.7);
  background:
    linear-gradient(135deg, rgba(103, 239, 191, 0.12), transparent 44%),
    rgba(255, 255, 255, 0.05);
}

.dropzone input {
  display: none;
}

.dropzone-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.dropzone-subtitle {
  margin-top: 8px;
  color: var(--muted);
}

.file-summary,
.progress-block,
.download-card,
.download-summary,
.mode-picker {
  padding: 18px;
}

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

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
  row-gap: 4px;
}

.upload-box {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.file-summary.upload-box {
  min-height: 128px;
  justify-content: center;
}

.mode-options {
  display: flex;
  gap: 14px;
  align-items: center;
}

.mode-button {
  min-width: 112px;
  min-height: 52px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.mode-button:hover {
  transform: translateY(-1px);
}

.mode-button.is-active {
  border-color: rgba(103, 239, 191, 0.95);
  background: rgba(103, 239, 191, 0.14);
  color: var(--accent);
}

.progress-block {
  margin-top: 16px;
}

.upload-progress-block {
  margin-top: 4px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.progress-meta span {
  color: var(--muted);
}

.progress-meta strong {
  font-family: inherit;
}

.progress-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #b8ffe6);
  transition: width 220ms ease;
}

.progress-fill-download {
  background: linear-gradient(90deg, var(--accent-2), #ffd0a0);
}

.progress-note {
  margin: 12px 0 0;
  color: var(--muted);
}

.upload-submit {
  width: 100%;
  min-height: 52px;
  border-radius: 20px;
}

.control-bar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 18px;
  min-height: 80px;
}

.control-label {
  margin: 0;
  min-width: 64px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.upload-action {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
  width: 100%;
}

.upload-reset-inline {
  width: 100%;
  min-height: 52px;
  border-radius: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #091018;
  background: linear-gradient(135deg, var(--accent), #ceffea);
}

.button-secondary {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.button-disabled {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.download-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  align-items: start;
}

.download-list-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  padding: 18px;
}

.download-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.download-toolbar {
  margin-bottom: 12px;
}

.compact-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
}

.search-input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
}

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

.search-input:focus {
  outline: none;
  border-color: rgba(103, 239, 191, 0.72);
}

.download-file-list {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.file-row {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.file-row:hover {
  transform: translateY(-1px);
}

.file-row.is-active {
  border-color: rgba(103, 239, 191, 0.95);
  background: rgba(103, 239, 191, 0.14);
}

.file-row-name {
  display: block;
  font-weight: 700;
}

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

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

.download-detail {
  display: grid;
  gap: 16px;
}

.download-detail > .progress-block:first-child {
  margin-top: 0;
}

.summary-label {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.download-card {
  margin-top: 0;
  padding: 0;
  border: none;
  background: transparent;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 1020px);
    padding-top: 20px;
  }

  .hero,
  .panel {
    padding: 20px;
    border-radius: 20px;
  }

  .info-grid,
  .upload-grid,
  .download-layout {
    grid-template-columns: 1fr;
  }

  .control-bar {
    grid-template-columns: 1fr;
    gap: 18px;
    min-height: auto;
  }

  .control-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .action-row,
  .progress-meta {
    flex-direction: column;
    align-items: stretch;
  }
}
