:root {
  --bg: #0a1020;
  --bg-soft: #101a31;
  --panel: rgba(15, 26, 50, 0.75);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f5f8ff;
  --muted: #c2cdea;
  --accent: #42d392;
  --accent-2: #ffb020;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(66, 211, 146, 0.2), transparent 34%),
    radial-gradient(circle at 90% 16%, rgba(255, 176, 32, 0.2), transparent 30%),
    linear-gradient(180deg, #080d1a 0%, #0c1528 100%);
  color: var(--text);
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  width: 42vw;
  height: 42vw;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
}

.bg-glow-a {
  background: #42d392;
  top: -16vw;
  left: -12vw;
}

.bg-glow-b {
  background: #ffb020;
  right: -10vw;
  bottom: -18vw;
}

.layout {
  width: min(1060px, 92vw);
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  margin-bottom: 22px;
  animation: rise 500ms ease-out;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
}

h1 {
  margin: 10px 0 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1;
}

.subtitle {
  margin: 12px 0 0;
  max-width: 650px;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  padding: 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.26);
}

.hidden {
  display: none;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-copy {
  margin: 8px 0 0;
  color: var(--muted);
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  white-space: nowrap;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stacked-form {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.stacked-form h3 {
  margin: 0;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(3, 8, 18, 0.65);
  color: var(--text);
  font: inherit;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
  color: #8ea1c1;
}

.upload-panel {
  animation: rise 650ms ease-out;
}

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

input[type="file"] {
  max-width: 100%;
  color: var(--text);
}

button {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease;
}

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

button:active {
  transform: translateY(0);
}

#uploadBtn {
  background: linear-gradient(135deg, var(--accent), #2dcf84);
  color: #061a10;
}

.secondary {
  background: linear-gradient(135deg, var(--accent-2), #ff9b2f);
  color: #1f1200;
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}

.status {
  min-height: 20px;
  margin-top: 10px;
  color: var(--muted);
}

.status.ok {
  color: var(--accent);
}

.status.err {
  color: var(--danger);
}

.list-panel {
  margin-top: 16px;
  animation: rise 780ms ease-out;
}

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

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.file-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  animation: card-in 260ms ease;
}

.file-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.file-name {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
  word-break: break-word;
}

.file-size,
.file-meta,
.file-key {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 12px;
  word-break: break-word;
}

.file-key {
  font-family: "IBM Plex Mono", monospace;
}

.download-link {
  margin-top: 10px;
  display: inline-block;
  font-weight: 600;
  color: var(--accent-2);
  text-decoration: none;
}

.download-link:hover {
  text-decoration: underline;
}

@keyframes rise {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes card-in {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .layout {
    width: min(1060px, 94vw);
    padding-top: 20px;
  }

  .panel {
    padding: 16px;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-direction: column;
  }
}
