:root {
  color-scheme: dark;
  --bg: #070706;
  --panel: rgba(18, 17, 15, 0.78);
  --panel-2: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.12);
  --line-hot: rgba(255, 132, 32, 0.38);
  --text: #fffaf2;
  --soft: #c9c2b8;
  --muted: #8f8a82;
  --hot: #ff861f;
  --hot-2: #ffb15e;
  --danger: #ff5f72;
  --ok: #82e2a7;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 134, 31, 0.2), transparent 30%),
    radial-gradient(circle at 100% 12%, rgba(255, 177, 94, 0.12), transparent 32%),
    linear-gradient(135deg, #050504 0%, #11100e 52%, #050504 100%);
  font-family: "SF Pro Text", "Segoe UI", Aptos, Arial, system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 72%);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.vault-shell {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 18px 0 36px;
}

.vault-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(14, 13, 12, 0.78);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  min-width: 0;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.08;
}

.brand small,
.eyebrow,
.meta {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ghost-button,
.danger-button,
.download-button,
.upload-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 14px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 850;
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.danger-button {
  color: #fff;
  background: rgba(255, 95, 114, 0.14);
  border-color: rgba(255, 95, 114, 0.28);
}

.download-button,
.upload-button {
  color: #16100a;
  background: linear-gradient(135deg, var(--hot), var(--hot-2));
  border-color: transparent;
}

.hero {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding: 22px;
  border: 1px solid var(--line-hot);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 134, 31, 0.16), transparent 46%),
    rgba(18, 17, 15, 0.78);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.hero h1,
.login-card h1 {
  margin: 0;
  max-width: 10ch;
  font-size: clamp(2.4rem, 10vw, 6rem);
  line-height: 0.88;
  letter-spacing: 0;
}

.hero p,
.login-card p {
  max-width: 62ch;
  margin: 0;
  color: var(--soft);
  line-height: 1.56;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.stat,
.upload-panel,
.file-card,
.login-card,
.notice {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.stat {
  min-height: 92px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 14px;
}

.stat strong {
  color: var(--hot-2);
  font-size: 1.85rem;
  line-height: 1;
}

.upload-panel {
  margin-top: 14px;
  padding: 16px;
}

.upload-panel form {
  display: grid;
  gap: 12px;
}

.file-input {
  display: grid;
  gap: 8px;
  min-height: 142px;
  place-items: center;
  padding: 18px;
  border: 1px dashed rgba(255, 177, 94, 0.45);
  border-radius: 18px;
  background: rgba(255, 134, 31, 0.07);
  text-align: center;
}

.file-input input {
  width: 100%;
  max-width: 360px;
  color: var(--soft);
}

.help {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.messages {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.notice {
  padding: 12px 14px;
  color: var(--soft);
}

.notice.is-ok {
  color: #10160d;
  background: rgba(130, 226, 167, 0.9);
}

.notice.is-bad {
  color: #fff;
  background: rgba(255, 95, 114, 0.24);
  border-color: rgba(255, 95, 114, 0.38);
}

.files-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: end;
  margin: 24px 0 10px;
}

.files-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.file-grid {
  display: grid;
  gap: 10px;
}

.file-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.file-title {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.file-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.login-wrap {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 18px;
}

.login-card {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  padding: 22px;
}

.code-field {
  display: grid;
  gap: 8px;
}

.code-field input {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.3);
  outline: none;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.code-field input:focus {
  border-color: var(--line-hot);
  box-shadow: 0 0 0 4px rgba(255, 134, 31, 0.13);
}

.login-card .upload-button {
  width: 100%;
  min-height: 54px;
}

@media (max-width: 720px) {
  .vault-shell {
    width: min(100vw - 16px, 980px);
    padding-top: 8px;
  }

  .vault-top {
    border-radius: 18px;
  }

  .brand strong {
    font-size: 0.92rem;
  }

  .stats,
  .file-card {
    grid-template-columns: 1fr;
  }

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

  .download-button,
  .danger-button {
    display: grid;
    place-items: center;
  }
}
