:root {
  --bg: #f5f5f7;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-border: rgba(15, 15, 15, 0.06);
  --text: #0f0f10;
  --muted: #6f6f76;
  --line: rgba(17, 17, 19, 0.14);
  --line-strong: rgba(17, 17, 19, 0.24);
  --accent: #111111;
  --success: #12724f;
  --error: #b42318;
  --shadow: 0 40px 90px rgba(17, 17, 19, 0.12);
  --glow: 0 0 120px rgba(255, 255, 255, 0.9);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  /* background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.96), transparent 28%),
    linear-gradient(180deg, #fafafa 0%, #f3f3f5 100%); */
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.9), transparent 45%);
  filter: blur(8px);
}

.title {
  color: #09090a;
  font-family: "Montserrat", sans-serif;
  font-weight: 300;
  margin-bottom: -150px;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 96px 16px 32px;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
  padding: 20px 16px 0;
}

.topbar-inner {
  width: min(100%, 1100px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topnav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 17, 19, 0.06);
}

.topnav-link.is-active {
  color: #ffffff;
  background: #111111;
}

.panel {
  position: relative;
  width: min(100%, 760px);
  padding: 28px;
  border-radius: 34px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow), var(--glow);
  backdrop-filter: blur(14px);
}

.panel-wide {
  width: min(100%, 980px);
}

.auth-form,
.upload-form {
  display: grid;
  gap: 20px;
}

.auth-submit-row {
  padding-top: 20px;
  display: grid;
}

.auth-submit {
  justify-self: center;
}

.auth-copy {
  display: grid;
  gap: 12px;
  text-align: center;
  margin-bottom: 4px;
}

.auth-badge {
  justify-self: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 19, 0.08);
  background: rgba(17, 17, 19, 0.04);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.auth-copy p {
  max-width: 420px;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.6;
}

.field {
  display: grid;
  gap: 10px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.field input {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font: inherit;
  color: inherit;
  background: rgba(255, 255, 255, 0.84);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field input::placeholder {
  color: #999aa1;
}

.field input:focus,
.dropzone:focus,
.dropzone.is-active {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(17, 17, 19, 0.05);
}

.dropzone {
  border: 3px dashed rgba(17, 17, 19, 0.12);
  border-radius: 28px;
  padding: 44px 28px 40px;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.94));
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.dropzone:hover {
  transform: translateY(-2px);
  border-color: rgba(17, 17, 19, 0.22);
  box-shadow: 0 16px 40px rgba(17, 17, 19, 0.06);
}

.dropzone-content {
  display: grid;
  justify-items: center;
  text-align: center;
}

.dropzone-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(17, 17, 19, 0.06);
  box-shadow: 0 12px 30px rgba(17, 17, 19, 0.05);
}

.dropzone-icon svg {
  width: 38px;
  height: 38px;
  stroke: #111111;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dropzone-content strong {
  max-width: 420px;
  font-size: clamp(2rem, 4.4vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.dropzone-copy {
  margin: 12px 0 10px;
  font-size: 1rem;
  color: var(--muted);
}

.dropzone-copy span {
  color: var(--accent);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dropzone-content small {
  color: var(--muted);
  font-size: 0.9rem;
}

.selected-file {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(17, 17, 19, 0.08);
  background: rgba(17, 17, 19, 0.03);
  color: var(--text);
  font-size: 0.95rem;
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  box-shadow: 0 12px 24px rgba(17, 17, 19, 0.16);
}

.logout-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(17, 17, 19, 0.22);
}

.logout-button:active {
  transform: translateY(0);
}

button[type="submit"] {
  justify-self: center;
  min-width: 240px;
  height: 58px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #1c1c1e 0%, #09090a 100%);
  color: #fff;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  box-shadow: 0 14px 28px rgba(17, 17, 19, 0.2);
}

button[type="submit"]:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(17, 17, 19, 0.24);
}

button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.7;
}

.status {
  min-height: 24px;
  margin-top: 18px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.6;
}

.status.is-loading {
  color: var(--muted);
}

.status.is-success {
  color: var(--success);
}

.status.is-error {
  color: var(--error);
}

.status a {
  color: inherit;
  font-weight: 800;
}

.manage-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.manage-title {
  margin: 14px 0 10px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.manage-copy {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.manage-total {
  flex-shrink: 0;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(17, 17, 19, 0.04);
  border: 1px solid rgba(17, 17, 19, 0.06);
  font-size: 0.95rem;
  font-weight: 800;
}

.project-list {
  display: grid;
  gap: 14px;
}

.project-card,
.project-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(17, 17, 19, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.project-empty {
  justify-content: center;
  color: var(--muted);
  text-align: center;
}

.project-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.project-slug {
  font-size: 1.05rem;
}

.project-link {
  color: var(--accent);
  text-decoration: none;
  word-break: break-word;
}

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

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-actions {
  flex-shrink: 0;
}

.delete-button {
  min-width: 112px;
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  box-shadow: 0 12px 24px rgba(17, 17, 19, 0.16);
}

.delete-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(17, 17, 19, 0.22);
}

@media (max-width: 640px) {
  .topbar {
    padding-top: 14px;
  }

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

  .topnav {
    width: 100%;
  }

  .topnav-link {
    flex: 1;
  }

  .panel {
    padding: 18px;
    border-radius: 28px;
  }

  .dropzone {
    padding: 36px 18px 32px;
    border-radius: 24px;
  }

  .dropzone-content strong {
    font-size: 1.8rem;
  }

  button[type="submit"] {
    width: 100%;
    min-width: 0;
  }

  .logout-button {
    width: 100%;
    min-width: 0;
  }

  .manage-header,
  .project-card {
    flex-direction: column;
    align-items: stretch;
  }

  .manage-total,
  .delete-button {
    width: 100%;
  }
}
