:root {
  --bg: #e6ecef;
  --bg-deep: #d5dee3;
  --surface: #f7fafb;
  --ink: #122027;
  --muted: #5a6b73;
  --teal: #0a6f6c;
  --teal-dark: #085855;
  --amber: #e39b2b;
  --coral: #d4554a;
  --blue: #2f6fed;
  --green: #2f9e6b;
  --violet: #6b5bd6;
  --line: rgba(18, 32, 39, 0.1);
  --shadow: 0 18px 40px rgba(18, 32, 39, 0.08);
  --radius: 18px;
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(10, 111, 108, 0.14), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(227, 155, 43, 0.16), transparent 55%),
    linear-gradient(180deg, #edf2f4 0%, var(--bg) 45%, #dde6ea 100%);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(247, 250, 251, 0.82);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.2rem;
}

.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.7rem;
  background: linear-gradient(145deg, var(--teal), #149a8f 55%, var(--amber));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border: 2px solid #fff;
  border-radius: 0.35rem;
  border-left-color: transparent;
  transform: rotate(45deg);
}

.nav-links {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(10, 111, 108, 0.1);
  color: var(--teal-dark);
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  padding: 3.2rem 0 1.6rem;
  animation: rise 0.7s ease both;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  max-width: 11ch;
}

.hero p {
  margin: 1rem 0 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.unlimited-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), #f0b84a);
  color: #3a2708;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px rgba(227, 155, 43, 0.28);
  animation: pulseSoft 2.4s ease-in-out infinite;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(47, 158, 107, 0.12);
  color: #1f7a4f;
  font-weight: 700;
  font-size: 0.9rem;
}

.privacy-pill span {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(47, 158, 107, 0.18);
}

.section {
  padding: 1.4rem 0 2.5rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  animation: rise 0.6s ease both;
}

.tool-card:nth-child(2) { animation-delay: 0.05s; }
.tool-card:nth-child(3) { animation-delay: 0.1s; }
.tool-card:nth-child(4) { animation-delay: 0.15s; }
.tool-card:nth-child(5) { animation-delay: 0.2s; }
.tool-card:nth-child(6) { animation-delay: 0.25s; }

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(10, 111, 108, 0.28);
  box-shadow: 0 22px 44px rgba(18, 32, 39, 0.12);
}

.tool-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 0.9rem;
}

.tool-icon.pdf { background: linear-gradient(145deg, #d4554a, #b53a31); }
.tool-icon.img { background: linear-gradient(145deg, #2f9e6b, #1f7a4f); }
.tool-icon.merge { background: linear-gradient(145deg, #0a6f6c, #149a8f); }
.tool-icon.split { background: linear-gradient(145deg, #6b5bd6, #4f43ad); }
.tool-icon.video { background: linear-gradient(145deg, #2f6fed, #1f4fc0); }
.tool-icon.audio { background: linear-gradient(145deg, #e39b2b, #c47d12); }
.tool-icon.gif { background: linear-gradient(145deg, #d4554a, #e39b2b); }

.tool-card h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a {
  color: var(--teal-dark);
  font-weight: 700;
}

.site-footer a:hover {
  text-decoration: underline;
}

.tool-page {
  padding: 2rem 0 3rem;
}

.tool-page-header {
  margin-bottom: 1.4rem;
  animation: rise 0.55s ease both;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--teal-dark);
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.tool-page-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.04em;
}

.tool-page-header p {
  margin: 0.55rem 0 0;
  color: var(--muted);
  max-width: 40rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  animation: rise 0.65s ease both;
}

.dropzone {
  border: 2px dashed rgba(10, 111, 108, 0.35);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(10, 111, 108, 0.04), transparent),
    #fff;
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--teal);
  background: rgba(10, 111, 108, 0.06);
  transform: scale(1.01);
}

.dropzone strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.dropzone span {
  color: var(--muted);
}

.file-input {
  display: none;
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.field-label {
  font-weight: 700;
  color: var(--ink);
}

.format-select {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235a6b73' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
  border-radius: 999px;
  padding: 0.7rem 2.4rem 0.7rem 1rem;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  min-width: 12rem;
  cursor: pointer;
}

.format-select:focus {
  outline: 2px solid rgba(10, 111, 108, 0.35);
  outline-offset: 2px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1rem;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.25rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--teal-dark);
}

.btn-secondary {
  background: rgba(18, 32, 39, 0.08);
  color: var(--ink);
}

.preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.preview-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.preview-item img,
.preview-item video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #eef3f5;
}

.preview-item figcaption {
  padding: 0.45rem 0.55rem;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status {
  margin-top: 1rem;
  min-height: 1.4rem;
  color: var(--muted);
  font-weight: 600;
}

.status.error {
  color: var(--coral);
}

.status.ok {
  color: #1f7a4f;
}

.progress {
  margin-top: 0.75rem;
  height: 8px;
  border-radius: 999px;
  background: rgba(18, 32, 39, 0.08);
  overflow: hidden;
  display: none;
}

.progress.show {
  display: block;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--amber));
  transition: width 0.2s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseSoft {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 2.2rem;
  }
}
