:root {
  color-scheme: dark;
  --bg: #0f1512;
  --bg-2: #131b17;
  --surface: #182420;
  --surface-2: #1f2e28;
  --border: #2a3d34;
  --text: #e8f0eb;
  --muted: #93a89c;
  --accent: #3ecf8e;
  --accent-2: #2fb87a;
  --accent-soft: rgba(62, 207, 142, 0.14);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Sora", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1100px 600px at 78% -10%, rgba(62, 207, 142, 0.10), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(47, 184, 122, 0.08), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--accent-2);
}

h1, h2, h3 {
  line-height: 1.15;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.container {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.muted {
  color: var(--muted);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(15, 21, 18, 0.75);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  color: var(--text);
  font-size: 1.1rem;
}

.brand:hover {
  color: var(--text);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06110b;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 6px 16px rgba(62, 207, 142, 0.35);
}

.brand-mark-lg {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 2rem;
  margin: 0 auto 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06110b;
  box-shadow: 0 10px 24px rgba(62, 207, 142, 0.3);
}

.btn-primary:hover {
  color: #06110b;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero {
  padding: 5.5rem 0 4rem;
}

.hero-inner {
  max-width: 760px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
}

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 620px;
  margin: 1rem 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.site-footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 0;
}

.error-page h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.error-page .btn {
  margin-top: 1.5rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-weight: 600;
}

.nav-cta {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent) !important;
  border: 1px solid var(--border);
}

.nav-cta:hover {
  background: var(--accent);
  color: #06110b !important;
}

.btn-small {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

.form-page {
  padding: 4rem 0 5rem;
}

.form-wrap {
  max-width: 520px;
}

.form-wrap h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
}

.form-lede {
  margin: 0.75rem 0 1.75rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.92rem;
}

.field input[type="password"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.field input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 200px;
  padding: 1.75rem 1.25rem;
  border-radius: var(--radius);
  border: 1.5px dashed var(--border);
  background:
    radial-gradient(500px 180px at 50% 0%, var(--accent-soft), transparent 70%),
    var(--surface);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.dropzone.is-dragover {
  background:
    radial-gradient(500px 180px at 50% 0%, rgba(62, 207, 142, 0.22), transparent 70%),
    var(--surface-2);
}

.dropzone.has-file {
  border-style: solid;
  border-color: var(--accent-2);
}

.dropzone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.35rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 20px rgba(62, 207, 142, 0.28);
  position: relative;
}

.dropzone-icon::before,
.dropzone-icon::after {
  content: "";
  position: absolute;
  background: #06110b;
  border-radius: 2px;
}

.dropzone-icon::before {
  width: 4px;
  height: 18px;
  left: 22px;
  top: 15px;
}

.dropzone-icon::after {
  width: 18px;
  height: 4px;
  left: 15px;
  top: 22px;
}

.dropzone-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.dropzone-hint {
  font-size: 0.92rem;
}

.dropzone-file {
  margin-top: 0.65rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px rgba(62, 207, 142, 0.35);
  transition: width 0.12s ease-out;
}

.form-error {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid #6b2e2e;
  background: rgba(180, 60, 60, 0.15);
  color: #f0b4b4;
  font-weight: 600;
}

.form-error[hidden],
.result-box[hidden],
.progress-wrap[hidden],
.dropzone-file[hidden] {
  display: none !important;
}

.result-box {
  margin: 0 0 1.5rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.result-box .muted {
  margin: 0 0 0.4rem;
}

.result-link {
  word-break: break-all;
  font-weight: 700;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.nav a {
  color: var(--muted);
}

.nav a:hover {
  color: var(--text);
}

.nav form {
  margin: 0;
}

.files-wrap {
  max-width: 760px;
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.file-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.file-id {
  font-size: 0.9rem;
}

.file-settings {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.file-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
}

.file-actions .name-input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.domain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.domain-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(0, 1.4fr) auto;
  gap: 0.65rem;
  align-items: center;
}

.domain-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.domain-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.domain-link {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--muted);
  font-size: 0.8rem;
}

.file-preview {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.file-type {
  display: inline-flex;
  width: fit-content;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.file-link {
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rename-form {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.file-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  min-width: 0;
}

.delete-form {
  margin: 0;
  flex-shrink: 0;
}

.btn-icon-danger {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid #6b2e2e;
  background: rgba(180, 60, 60, 0.15);
  color: #f0b4b4;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn-icon-danger:hover {
  background: rgba(180, 60, 60, 0.28);
  border-color: #a34444;
  transform: translateY(-1px);
}

.rename-form input[type="text"],
.field input[type="text"] {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.rename-form input[type="text"]:focus,
.field input[type="text"]:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.form-success {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.result-name {
  margin: 0.55rem 0 0;
}

@media (max-width: 720px) {
  .domain-row {
    grid-template-columns: 1fr;
  }

  .file-actions {
    flex-wrap: wrap;
  }

  .btn-icon-danger {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 3.5rem 0 2.5rem;
  }

  .form-page {
    padding: 2.5rem 0 3.5rem;
  }
}
