:root {
  color-scheme: light;
  --bg: #f4f0e8;
  --bg-2: #ebe4d8;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --text: #18212b;
  --muted: #66717d;
  --line: rgba(24, 33, 43, 0.12);
  --accent: #0c6b74;
  --accent-2: #0a5560;
  --danger: #b33c2d;
  --danger-2: #932f22;
  --success: #146a46;
  --warning: #ab6916;
  --shadow: 0 30px 80px rgba(24, 33, 43, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(207, 118, 76, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(12, 107, 116, 0.18), transparent 24%),
    linear-gradient(180deg, #f8f4ed 0%, var(--bg) 52%, var(--bg-2) 100%);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(12, 107, 116, 0.08);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.topbar {
  padding: 18px 16px 0;
}

.topbar-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(24, 33, 43, 0.08);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-link,
.logout-button,
.auth-submit,
#submit-button,
.delete-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.topbar-link {
  padding: 11px 16px;
  color: var(--text);
  background: rgba(24, 33, 43, 0.05);
}

.logout-button,
.delete-button {
  padding: 11px 16px;
  background: var(--danger);
  color: #fff;
}

.auth-submit,
#submit-button {
  width: 100%;
  padding: 16px 22px;
  background: var(--accent);
  color: #fff;
}

.topbar-link:hover,
.logout-button:hover,
.auth-submit:hover,
#submit-button:hover,
.delete-button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.logout-button:hover,
.delete-button:hover {
  background: var(--danger-2);
}

.auth-submit:hover,
#submit-button:hover {
  background: var(--accent-2);
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.panel {
  width: min(100%, 520px);
  padding: 32px;
  border-radius: var(--radius-xl);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.panel-wide {
  width: 100%;
  max-width: none;
}

.auth-copy h1,
.manage-title,
.panel-hero h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.auth-copy p,
.manage-copy,
.panel-hero p,
.dropzone-copy,
.field small,
.project-meta,
.project-empty,
.hero-note {
  color: var(--muted);
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(12, 107, 116, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.auth-copy {
  display: grid;
  gap: 14px;
  margin-bottom: 6px;
}

.auth-submit-row {
  margin-top: 4px;
}

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

.field span {
  font-size: 14px;
  font-weight: 700;
}

.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  font: inherit;
  color: var(--text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus {
  outline: none;
  border-color: rgba(12, 107, 116, 0.45);
  box-shadow: 0 0 0 4px rgba(12, 107, 116, 0.1);
}

.panel-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.panel-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.panel-link-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(24, 33, 43, 0.08);
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.panel-link-card strong {
  font-size: 0.98rem;
}

.panel-link-card span {
  color: var(--muted);
  line-height: 1.5;
}

.panel-link-card:hover {
  transform: translateY(-1px);
  border-color: rgba(12, 107, 116, 0.18);
  background: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.hero-note {
  max-width: 360px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(24, 33, 43, 0.04);
  border: 1px solid rgba(24, 33, 43, 0.06);
  line-height: 1.6;
}

.dropzone {
  display: grid;
  place-items: center;
  padding: 30px 22px;
  border: 2px dashed rgba(12, 107, 116, 0.22);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(246, 250, 250, 0.86));
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.dropzone:hover,
.dropzone.is-active {
  transform: translateY(-1px);
  border-color: rgba(12, 107, 116, 0.55);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(233, 246, 247, 0.94));
}

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

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

.dropzone-copy span {
  font-weight: 800;
}

.dropzone-icon {
  width: 62px;
  height: 62px;
  padding: 14px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: var(--accent);
  background: rgba(12, 107, 116, 0.08);
}

.dropzone-icon svg {
  width: 100%;
  height: 100%;
}

.selected-file,
.published-result,
.status {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 600;
}

.selected-file {
  background: rgba(24, 33, 43, 0.05);
}

.published-result {
  background: rgba(20, 106, 70, 0.08);
  color: #115239;
}

.status {
  margin-top: 18px;
  background: rgba(24, 33, 43, 0.05);
}

.status.is-error {
  background: rgba(179, 60, 45, 0.1);
  border-color: rgba(179, 60, 45, 0.14);
  color: #7e251b;
}

.status.is-success {
  background: rgba(20, 106, 70, 0.1);
  border-color: rgba(20, 106, 70, 0.14);
  color: #115239;
}

.status.is-loading {
  background: rgba(171, 105, 22, 0.1);
  border-color: rgba(171, 105, 22, 0.14);
  color: #8a540f;
}

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

.manage-total {
  min-width: 110px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(12, 107, 116, 0.08);
  color: var(--accent);
  text-align: center;
  font-weight: 800;
}

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

.project-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(24, 33, 43, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.project-main {
  display: grid;
  gap: 10px;
}

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

.project-link {
  word-break: break-all;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-tag {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-tag.is-open {
  background: rgba(20, 106, 70, 0.1);
  color: var(--success);
}

.project-tag.is-overwritten {
  background: rgba(171, 105, 22, 0.1);
  color: var(--warning);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.95rem;
}

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

.project-empty {
  padding: 34px 20px;
  text-align: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px dashed rgba(24, 33, 43, 0.12);
}

.messageFooter {
    text-align: center;
    color: #8f8f8f;
}

@media (max-width: 900px) {
  .panel-hero,
  .manage-header,
  .project-card,
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-note {
    max-width: none;
  }

  .panel-links {
    grid-template-columns: 1fr;
  }

  .project-actions,
  .project-actions .delete-button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 20px, 1120px);
    padding: 20px 0 30px;
  }

  .panel {
    padding: 22px;
    border-radius: 24px;
  }

  .topbar {
    padding: 12px 10px 0;
  }

  .topbar-inner {
    border-radius: 24px;
  }

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

  .topbar-link,
  .logout-button {
    text-align: center;
  }

  .project-meta {
    display: grid;
    gap: 8px;
  }
}
