:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --bg-2: #e9f4f1;
  --text: #111827;
  --muted: #5f6b7a;
  --panel: rgba(255, 255, 255, 0.64);
  --panel-strong: rgba(255, 255, 255, 0.82);
  --border: rgba(25, 35, 55, 0.1);
  --shadow: 0 24px 70px rgba(31, 41, 55, 0.16);
  --accent: #0e8f7b;
  --accent-2: #2563eb;
  --accent-3: #f59e0b;
}

:root.dark {
  color-scheme: dark;
  --bg: #101317;
  --bg-2: #15241f;
  --text: #f5f7fb;
  --muted: #a8b2c1;
  --panel: rgba(22, 27, 34, 0.62);
  --panel-strong: rgba(27, 33, 42, 0.82);
  --border: rgba(255, 255, 255, 0.13);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --accent: #2dd4bf;
  --accent-2: #60a5fa;
  --accent-3: #fbbf24;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(14, 143, 123, 0.2), transparent 28rem),
    radial-gradient(circle at 84% 10%, rgba(245, 158, 11, 0.18), transparent 26rem),
    linear-gradient(135deg, var(--bg), var(--bg-2));
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

ul {
  color: var(--muted);
  line-height: 1.9;
  padding-left: 1.2rem;
}

main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.page-shell {
  min-height: 100vh;
}

.navbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  width: min(1120px, calc(100% - 32px));
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(22px) saturate(150%);
}

.brand,
.nav-links,
.actions,
.panel-topline,
.file-preview,
.mini-grid,
.site-footer,
.footer-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.08) 58%, transparent 72%),
    linear-gradient(135deg, rgba(45, 212, 191, 0.16), rgba(37, 99, 235, 0.16));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26), 0 8px 22px rgba(37, 99, 235, 0.14);
  overflow: hidden;
}

.brand-mark img {
  width: 31px;
  height: 31px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(17, 24, 39, 0.22));
}

.nav-links {
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.nav-form {
  margin: 0;
}

.nav-link-button {
  padding: 0;
  border: 0;
  color: var(--muted);
  font: inherit;
  background: transparent;
  cursor: pointer;
}

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

.nav-toggle,
.theme-toggle {
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: white;
  font-weight: 750;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.24);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(14, 143, 123, 0.25);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.button-ghost {
  color: var(--text);
  border-color: var(--border);
  background: var(--panel-strong);
  box-shadow: none;
}

.button-small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.danger-button {
  background: linear-gradient(135deg, #dc2626, #f97316);
  box-shadow: 0 14px 34px rgba(220, 38, 38, 0.2);
}

.full {
  width: 100%;
}

.account-plan-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  background: var(--panel-strong);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.plan-badge-premium,
.plan-badge-premium_plus,
.plan-badge-admin {
  color: white;
  border-color: rgba(255, 255, 255, 0.28);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

.plan-badge-premium {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.98), rgba(37, 99, 235, 0.98));
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.24);
}

.plan-badge-premium_plus {
  background: linear-gradient(135deg, #f59e0b 0%, #ec4899 46%, #2563eb 100%);
  box-shadow:
    0 16px 36px rgba(236, 72, 153, 0.24),
    0 5px 18px rgba(245, 158, 11, 0.22);
}

.plan-badge-admin {
  background: linear-gradient(135deg, #111827, #0e8f7b);
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.2);
}

.hero,
.page-hero,
.split-section,
.feature-band,
.upload-layout,
.center-section {
  padding: 76px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 42px;
  align-items: center;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(3.25rem, 8vw, 6.5rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-lede,
.page-hero p {
  max-width: 680px;
  font-size: 1.12rem;
}

.compact {
  padding-bottom: 34px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.glass-panel,
.glass-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
}

.glass-panel {
  padding: 28px;
}

.glass-card {
  padding: 26px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.glass-card:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 143, 123, 0.35);
}

.hero-panel {
  min-height: 360px;
  display: grid;
  align-content: center;
  gap: 28px;
}

.panel-topline {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.88rem;
}

.status-pill {
  padding: 7px 10px;
  border-radius: 999px;
  color: #064e3b;
  background: rgba(45, 212, 191, 0.22);
}

.file-preview {
  gap: 14px;
  min-width: 0;
}

.file-preview > div:last-child {
  min-width: 0;
}

.file-preview.large {
  margin-bottom: 18px;
}

.file-preview strong {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.file-preview span {
  display: block;
  max-width: 100%;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.file-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  color: white;
  font-size: 0.84rem;
  font-weight: 850;
  background: linear-gradient(135deg, var(--accent-3), var(--accent));
}

.meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(95, 107, 122, 0.16);
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

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

.mini-grid span {
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.24);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2,
.split-section h2,
.result-panel h2,
.file-panel h2,
.text-page h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0;
  line-height: 1.05;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.glass-card h3,
.pricing-card h2 {
  margin: 0 0 10px;
}

.split-section {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.7fr);
  gap: 28px;
  align-items: center;
}

.cta-card {
  display: grid;
  gap: 12px;
  color: inherit;
}

.cta-card span {
  color: var(--accent);
  font-weight: 800;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 24px;
  align-items: start;
}

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

.dropzone {
  min-height: 230px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 28px;
  border: 1px dashed rgba(14, 143, 123, 0.55);
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.24);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.dropzone.dragging,
.dropzone:hover {
  background: rgba(45, 212, 191, 0.13);
  transform: translateY(-1px);
}

.dropzone.dropzone-error {
  border-color: rgba(220, 38, 38, 0.75);
  background: rgba(220, 38, 38, 0.08);
}

.upload-inline-error {
  margin-top: -8px;
  padding: 10px 12px;
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 8px;
  color: #991b1b;
  font-weight: 700;
  background: rgba(254, 226, 226, 0.72);
}

:root.dark .upload-inline-error {
  color: #fecaca;
  background: rgba(127, 29, 29, 0.32);
}

.plan-note {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.24);
}

.plan-note strong {
  color: var(--text);
}

.dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel-strong);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(14, 143, 123, 0.14);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.alert {
  padding: 12px 14px;
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 8px;
  color: #991b1b;
  background: rgba(254, 226, 226, 0.7);
}

.notice {
  padding: 12px 14px;
  border: 1px solid rgba(14, 143, 123, 0.22);
  border-radius: 8px;
  color: #065f46;
  background: rgba(209, 250, 229, 0.72);
}

.share-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 18px 0;
  min-width: 0;
}

.qr-code {
  width: 180px;
  height: 180px;
  border-radius: 8px;
  background: white;
}

.compact-share {
  margin: 8px 0 0;
}

.file-share-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  min-width: 0;
}

.details-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

.details-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.details-list dt {
  color: var(--muted);
}

.details-list dd {
  min-width: 0;
  max-width: 68%;
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.center-section {
  display: grid;
  place-items: center;
}

.file-panel,
.text-page,
.auth-panel {
  width: min(760px, 100%);
}

.auth-panel {
  display: grid;
  gap: 18px;
}

.auth-panel h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
}

.auth-switch {
  margin: 0;
  text-align: center;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 800;
}

.wrap-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.account-section .glass-panel h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.1;
}

.account-dashboard {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 24px 0 84px;
}

.upload-manager {
  min-width: 0;
}

.manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}

.manager-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.08;
}

.manager-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.32fr) auto;
  gap: 14px;
  align-items: end;
  margin: 18px 0 22px;
}

.filter-actions {
  display: flex;
  gap: 10px;
}

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

.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.34fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
  min-width: 0;
}

.upload-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.upload-row-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.upload-row-copy strong,
.upload-row-copy small {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.upload-row-copy small {
  color: var(--muted);
}

.upload-row-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  min-width: 0;
}

.upload-row-meta span {
  overflow-wrap: anywhere;
}

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

.upload-row-actions form {
  margin: 0;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 26px;
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.empty-state h3 {
  margin: 0;
}

.pricing-grid {
  grid-template-columns: repeat(4, 1fr);
  padding: 30px 0 84px;
}

.pricing-card {
  display: grid;
  align-content: start;
}

.pricing-card.featured {
  border-color: rgba(37, 99, 235, 0.34);
  background: var(--panel-strong);
}

.price {
  margin: 6px 0;
  color: var(--text);
  font-size: 2.4rem;
  font-weight: 850;
}

.stats-card {
  display: grid;
  gap: 16px;
}

.stats-card span {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.stats-card strong {
  color: var(--text);
  font-size: 1.7rem;
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 30px auto;
  justify-content: space-between;
  gap: 22px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 6px 0 0;
}

.footer-links {
  gap: 16px;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel-strong);
    backdrop-filter: blur(22px);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-form,
  .nav-link-button {
    width: 100%;
    text-align: left;
  }

  .hero,
  .split-section,
  .upload-layout,
  .account-dashboard,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .page-hero,
  .split-section,
  .feature-band,
  .upload-layout,
  .center-section {
    padding: 46px 0;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 3.2rem;
  }

  .mini-grid,
  .form-grid,
  .plan-note,
  .filter-bar,
  .upload-row,
  .file-share-tools {
    grid-template-columns: 1fr;
  }

  .plan-note {
    display: grid;
  }

  .manager-header,
  .filter-actions,
  .upload-row-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  main,
  .navbar,
  .site-footer {
    width: min(100% - 20px, 1120px);
  }

  .glass-panel,
  .glass-card {
    padding: 20px;
  }

  .share-box {
    grid-template-columns: 1fr;
  }

  .details-list div {
    display: grid;
  }

  .details-list dd {
    max-width: 100%;
    text-align: left;
  }
}
