:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-2: #0f1722;
  --surface: rgba(12, 18, 28, 0.78);
  --surface-strong: rgba(9, 14, 22, 0.88);
  --surface-soft: rgba(15, 23, 34, 0.6);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f5fa;
  --muted: #c3d0de;
  --muted-strong: #a9b6c4;
  --accent: #f4b247;
  --accent-strong: #ffcc6e;
  --accent-cool: #2ee6c7;
  --shadow-soft: 0 16px 32px rgba(0, 0, 0, 0.32);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  --glow: 0 0 0 1px rgba(244, 178, 71, 0.25), 0 12px 30px rgba(244, 178, 71, 0.2);
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 18px;
  --radius-lg: 24px;
  --blur: 14px;
  --transition: 200ms ease;
  --focus-ring: 0 0 0 3px rgba(105, 240, 215, 0.22);
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --nav-bg: rgba(10, 16, 24, 0.95);
  --nav-border: rgba(255, 255, 255, 0.08);
  --nav-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --nav-link: rgba(255, 255, 255, 0.78);
  --nav-link-hover: rgba(255, 255, 255, 0.92);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.page,
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 90px;
  position: relative;
  z-index: 1;
}

.section {
  padding: 28px 0;
}

.section--hero {
  padding-top: 32px;
}

.section--footer {
  padding-bottom: 56px;
}

h1,
h2,
h3 {
  color: var(--text);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1.1;
  font-weight: 700;
}

h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: 1.2;
  font-weight: 700;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.card--interactive {
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card--interactive:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}

.btn,
.button,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}

.btn.primary,
.btn--primary {
  background: linear-gradient(135deg, rgba(244, 178, 71, 0.95), rgba(255, 204, 110, 0.9));
  color: #2a1b08;
  border-color: rgba(255, 210, 138, 0.7);
  box-shadow: 0 12px 25px rgba(244, 178, 71, 0.35);
}

.btn.secondary,
.btn--secondary {
  background: var(--surface-soft);
}

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

.btn:hover,
.button:hover {
  transform: translateY(-1px);
}

.chip,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(10, 16, 24, 0.6);
  font-size: 0.75rem;
  color: var(--muted);
}

.input,
.text-input,
.select-input,
.textarea-input,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.textarea-input,
textarea {
  min-height: 120px;
  resize: vertical;
}

.input:focus-visible,
.text-input:focus-visible,
.select-input:focus-visible,
.textarea-input:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: rgba(105, 240, 215, 0.45);
}

.drop-zone,
.dropzone {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: rgba(10, 16, 24, 0.55);
  text-align: center;
  color: var(--muted);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--nav-bg);
  border: 1px solid var(--nav-border);
  box-shadow: var(--nav-shadow);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}

.brand {
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.2vw, 18px);
  flex-wrap: nowrap;
  white-space: nowrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--nav-link);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 6px 10px;
  border-radius: 999px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--nav-link-hover);
}

.nav-links a.active {
  background: rgba(105, 240, 215, 0.12);
  border: 1px solid rgba(105, 240, 215, 0.28);
  color: #d8fff4;
}

.nav-links a.nav-cta {
  background: linear-gradient(135deg, rgba(105, 240, 215, 0.18), rgba(80, 200, 255, 0.12));
  border: 1px solid rgba(105, 240, 215, 0.3);
  box-shadow: 0 10px 24px rgba(20, 40, 46, 0.35);
}

.nav-links a.nav-cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(105, 240, 215, 0.28), rgba(80, 200, 255, 0.18));
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.mega-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: min(980px, 92vw);
  padding: 18px 20px 16px;
  border-radius: 20px;
  background: rgba(10, 16, 24, 0.78);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  z-index: 50;
}

.mega-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: none;
}


.nav-mega.is-open .mega-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 16px 20px;
  align-items: start;
  justify-items: start;
}

.mega-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.mega-col + .mega-col {
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.mega-col h4 {
  margin: 0 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

.mega-col a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.92rem;
  width: 100%;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.mega-col a:hover,
.mega-col a:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  color: var(--nav-link-hover);
  outline: none;
}

.mega-icon {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(105, 240, 215, 0.8), rgba(80, 200, 255, 0.6));
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(105, 240, 215, 0.3);
}

.col-red .mega-icon {
  background: linear-gradient(135deg, #ff6b6b, #c23b3b);
  box-shadow: 0 0 0 1px rgba(255, 107, 107, 0.35);
}

.col-amber .mega-icon {
  background: linear-gradient(135deg, #ffcc6e, #f4b247);
  box-shadow: 0 0 0 1px rgba(244, 178, 71, 0.35);
}

.col-green .mega-icon {
  background: linear-gradient(135deg, #59f0a7, #2bbf7a);
  box-shadow: 0 0 0 1px rgba(46, 230, 199, 0.35);
}

.col-blue .mega-icon {
  background: linear-gradient(135deg, #6fb8ff, #3f7fd8);
  box-shadow: 0 0 0 1px rgba(95, 155, 255, 0.35);
}

.mega-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: flex-start;
}

.mega-all {
  text-decoration: none;
  color: var(--accent-strong);
  font-weight: 600;
  padding: 0;
  border-radius: 0;
  background: none;
  border: 0;
  box-shadow: none;
  transition: color var(--transition);
}

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

@media (max-width: 900px) {
  .mega-panel {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 12px;
    opacity: 1;
    pointer-events: auto;
    box-shadow: var(--shadow-soft);
  }
  .nav-mega.is-open .mega-panel {
    transform: none;
  }
  .mega-grid {
    grid-template-columns: 1fr;
  }
  .mega-col + .mega-col {
    padding-left: 0;
    border-left: none;
  }
}

@supports not (backdrop-filter: blur(2px)) {
  .topbar,
  .card,
  .drop-zone {
    backdrop-filter: none;
    background: var(--surface-strong);
  }
}

body.perf-lite::before,
body.perf-lite::after {
  opacity: 0.25;
}

@media (max-width: 768px) {
  body.perf-lite::before,
  body.perf-lite::after {
    display: none;
  }
}

body.perf-lite .topbar,
body.perf-lite .hero,
body.perf-lite .privacy-banner,
body.perf-lite .quick-drop,
body.perf-lite .tool-panel,
body.perf-lite .tool-card,
body.perf-lite .drop-zone,
body.perf-lite .viewer-shell,
body.perf-lite .panel,
body.perf-lite .card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

@media (max-width: 768px) {
  .page,
  .container {
    padding: 26px 18px 80px;
  }
  h1 {
    font-size: clamp(2rem, 7vw, 2.6rem);
  }
  h2 {
    font-size: clamp(1.4rem, 4vw, 1.9rem);
  }
}

@media (max-width: 480px) {
  .page,
  .container {
    padding: 22px 16px 70px;
  }
  .nav-tag {
    display: none;
  }
  .nav-links a {
    font-size: 0.78rem;
    padding: 6px 8px;
  }
}

/* Mega Menu Slider Navigation Fix */
.mega-panel button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(10, 16, 24, 0.8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.mega-panel button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mega-panel button:first-of-type { left: 10px; }
.mega-panel button:last-of-type { right: 10px; }

.mega-panel svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  display: block;
}

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