@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
}

/* =========================
   Base
========================= */

body {
  margin: 0;
  min-height: 100svh;
  overflow-y: auto;

  display: flex;
  align-items: flex-start;
  justify-content: center;

  font-family: "Outfit", sans-serif;
  background: #0c0c0c;
}

/* =========================
   Layout
========================= */

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 6px;
  padding: 24px 16px;

  width: 100%;
  max-width: 480px;
  min-height: 100svh;
  text-align: center;
}

.upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 12px;
  width: 100%;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  gap: 10px;
  margin: 8px 0;
  flex-wrap: wrap;
}

/* =========================
   Typography
========================= */

.center h1 {
  margin: 0;
  line-height: 1;

  font-size: clamp(32px, 8vw, 64px);
  font-weight: 900;
  letter-spacing: 2px;

  color: #f0f0f0;
}

#uptime {
  margin: 0;

  font-size: clamp(14px, 3.5vw, 18px);
  color: rgba(255, 255, 255, 0.5);

  text-align: center;
}

.desc {
  margin-top: 8px;

  font-size: clamp(13px, 3vw, 16px);
  color: rgba(255, 255, 255, 0.3);
}

#result {
  margin-top: 10px;

  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  text-align: center;
}

/* =========================
   Buttons
========================= */

.btn {
  display: inline-block;

  padding: 10px 18px;
  border: 1px solid #3a3a3a;
  border-radius: 999px;

  font-family: inherit;
  font-size: 14px;
  color: #e8e8e8;
  text-decoration: none;

  background: #1e1e1e;

  cursor: pointer;
  outline: none;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;

  -webkit-appearance: none;
  appearance: none;
}

.btn:hover {
  background: #272727;
  border-color: #606060;
  transform: translateY(-2px);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.08);
}

.btn:focus {
  outline: none;
}

.file-row .btn {
  text-align: center;
}

.btn-red {
  width: 44px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #5a2020;
  border-radius: 999px;

  background: #2a1010;

  color: #ff8080;
  font-family: inherit;
  font-weight: 700;

  cursor: pointer;

  transition: 0.2s ease;
}

.btn-red:hover {
  background: #351515;
  border-color: #7a3030;
  box-shadow: 0 0 14px rgba(255, 100, 100, 0.2);
  transform: translateY(-2px);
}

.btn-red:active {
  transform: scale(0.95);
}

.btn-blue {
  width: 44px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #3a3a3a;
  border-radius: 999px;

  background: #1e1e1e;

  color: #d0d0d0;
  font-family: inherit;
  font-weight: 700;

  cursor: pointer;

  transition: 0.2s ease;
}

.btn-blue:hover {
  background: #272727;
  border-color: #606060;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.btn-blue:active {
  transform: scale(0.95);
}

/* =========================
   Inputs
========================= */

input[type="file"] {
  max-width: 250px;

  color: #aaa;
  font-size: 14px;
}

#passInput {
  width: min(220px, 80vw);
  padding: 10px 14px;

  border: 1px solid #333;
  border-radius: 999px;

  background: #181818;

  color: #ccc;
  font-family: inherit;
  font-size: 14px;
  text-align: center;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

#passInput:focus {
  border-color: #666;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.07);
}

/* =========================
   Drop Zone
========================= */

.drop-zone {
  position: relative;
  overflow: hidden;

  width: min(320px, 90vw);
  height: 160px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 2px dashed #2e2e2e;
  border-radius: 16px;

  background: #161616;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.drop-zone:hover {
  border-color: #585858;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}

.drop-zone input {
  display: none;
}

.drop-content {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.drop-content .icon {
  margin-bottom: 6px;

  font-size: 28px;
  opacity: 0.5;
}

.drop-content .title {
  margin: 0;

  font-size: 16px;
  font-weight: 700;
}

.drop-content .sub {
  margin: 2px 0 0;

  font-size: 12px;
  opacity: 0.45;
}

.file-name {
  margin-top: 8px;

  font-size: 12px;
  color: #888;
}

/* =========================
   Toasts
========================= */

#toastContainer {
  position: fixed;
  top: 20px;
  left: 50%;

  transform: translateX(-50%);

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 10px;
  z-index: 9999;
}

.toast {
  padding: 10px 16px;
  border-radius: 999px;

  font-family: inherit;
  font-size: 13px;

  opacity: 0;
  transform: translateY(-8px);

  pointer-events: none;
  white-space: nowrap;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.normal {
  background: #1e1e1e;
  color: #bbb;

  border: 1px solid #3a3a3a;

  box-shadow: 0 0 16px rgba(255, 255, 255, 0.05);
}

.toast.success {
  background: #131f13;
  color: #6dbe6d;

  border: 1px solid #2a4f2a;

  box-shadow: 0 0 16px rgba(100, 200, 100, 0.12);
}

.toast.error {
  background: #1f1313;
  color: #e06060;

  border: 1px solid #4f2a2a;

  box-shadow: 0 0 16px rgba(220, 80, 80, 0.12);
}

/* =========================
   Progress Bar
========================= */

.progress-container {
  display: none;

  width: min(320px, 90vw);
  margin-top: 10px;

  text-align: center;
}

.progress-track {
  position: relative;
  overflow: hidden;

  width: 100%;
  height: 8px;

  border: 1px solid #2a2a2a;
  border-radius: 999px;

  background: #181818;
}

.progress-bar {
  width: 0%;
  height: 100%;

  border-radius: 999px;

  background: #606060;

  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);

  transition: width 0.15s ease;
}

.progress-text {
  margin-top: 6px;

  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

/* =========================
   Modal
========================= */

.modal {
  position: fixed;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.7);

  z-index: 9998;
  padding: 16px;
}

.modal-box {
  width: min(340px, 90vw);

  padding: 22px;

  border: 1px solid #2e2e2e;
  border-radius: 18px;

  background: #161616;

  box-shadow: 0 0 40px rgba(255, 255, 255, 0.05);

  text-align: center;

  animation: modalIn 0.18s ease;
}

.modal-box h2 {
  margin: 0 0 14px;

  font-size: 22px;
  font-weight: 800;

  color: #e8e8e8;
}

#renameInput {
  width: 100%;
  box-sizing: border-box;

  padding: 12px 16px;
  margin-top: 6px;

  border: 1px solid #333;
  border-radius: 999px;

  background: #111111;

  color: #ccc;
  font-family: inherit;
  font-size: 14px;
  text-align: center;

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

#renameInput:focus {
  border-color: #585858;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.06);
}

.modal-buttons {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.modal-close {
  width: 46px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(6px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
