body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: #f8f9fb;
}

header {
  background: #dfdfdf;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  flex-wrap: nowrap;
}

.logo-crop {
  max-width: 180px;
  height: 60px;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-crop img {
  width: 100%;
  height: auto;
  position: relative;
  top: -60px;
  display: block;
}

.nav-toggle {
  display: none !important;
}
.nav-label {
  display: none;
  font-size: 1.8rem;
  color: black;
  cursor: pointer;
}

nav {
  display: flex;
  gap: 1.5rem;
}
nav button {
  background: none;
  border: none;
  font-size: 0.97rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  padding: 0.7rem 1rem;
  color: #222;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
nav button:hover {
  color: #0070f3;
  background: #eff3fd;
}

.caret {
  font-size: 0.7em;
  margin-left: 0.3em;
}

.dropdown {
  position: relative;
}
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 7px;
  min-width: 220px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  padding: 0.5rem 0;
  z-index: 1;
}
.dropdown-content a {
  display: block;
  padding: 0.6rem 1rem;
  color: #31374c;
  font-size: 0.98rem;
  text-decoration: none;
  border-radius: 4px;
}
.dropdown-content a:hover {
  background-color: #f2f4fb;
}
.dropdown:hover .dropdown-content {
  display: block;
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .nav-label {
    display: block;
    margin-left: auto;
    padding: 0.5rem 1rem;
  }
  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 0 1rem 1rem;
  }
  .nav-toggle:checked + .nav-label + nav {
    display: flex;
  }
  .dropdown {
    width: 100%;
  }
  .dropdown > button {
    width: 100%;
    text-align: left;
    padding: 0.75rem 0;
    border-top: 1px solid #ccc;
  }
  .dropdown-content {
    position: static;
    background: none;
    border: none;
    box-shadow: none;
    padding-left: 1rem;
  }
  .dropdown-content a {
    color: #000;
  }
}

main, #app-container {
  max-width: 800px;
  margin: 2.5rem auto 2rem auto;
  padding: 2rem 2rem 1.5rem 2rem;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 18px rgba(52,119,246,0.04), 0 1.5px 6px rgba(0,0,0,0.02);
}
@media (max-width: 700px) {
  main, #app-container {
    padding: 1rem 0.5rem;
  }
}

h1 {
  margin-bottom: 0.25rem;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -1px;
}

input, select, button, label {
  margin-top: 0.7rem;
  display: block;
  font-size: 1.08rem;
}
input[type="file"] {
  margin-bottom: 1rem;
}
input[type="number"], select {
  border-radius: 8px;
  border: 1px solid #d3d8e2;
  padding: 0.5em 0.8em;
  background: #f9fafd;
  box-sizing: border-box;
}
input[type="checkbox"] {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  accent-color: #3477f6;
  vertical-align: middle;
}
button {
  margin-top: 1.2rem;
  background: #3477f6;
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 0.78rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(52,119,246,0.06);
  transition: background 0.18s, box-shadow 0.18s;
  letter-spacing: 0.02em;
}
button:hover {
  background: #265ec9;
  box-shadow: 0 3px 14px rgba(52,119,246,0.09);
}
canvas {
  max-width: 100%;
  display: block;
  margin-top: 0.8rem;
  border: 1.5px solid #e7e9f4;
  border-radius: 10px;
  background: #f7f8fb;
  box-shadow: 0 0.5px 2.5px rgba(52,119,246,0.03);
}
.row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0.8rem;
}
label {
  font-weight: 500;
  margin-bottom: 0.15rem;
  color: #32394b;
  align-self: center;
}
#previewLabel {
  color: #616e7c;
  font-size: 1.02rem;
  margin-bottom: 0.5rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.tool-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.tool-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.tool-card a {
  display: block;
  color: #0070f3;
  text-decoration: none;
  margin: 0.25rem 0;
  font-size: 0.95rem;
}
.tool-card a:hover {
  text-decoration: underline;
}
footer {
  background: #222;
  color: #ccc;
  text-align: center;
  padding: 1rem;
  margin-top: 3rem;
  border-radius: 0 0 12px 12px;
}
footer a {
  color: #ccc;
  margin: 0 1rem;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* --- Modern, Inline Size Controls --- */
.size-row {
  display: flex;
  align-items: center;
  gap: 0.7em;
  margin-bottom: 1.1em;
  flex-wrap: wrap;
}
.size-row label {
  margin-top: 0;
  font-weight: 500;
  align-self: center;
}
.size-row input[type="number"] {
  width: 5.2em;
  padding: 0.35em 0.65em;
  font-size: 1rem;
  border-radius: 7px;
  border: 1px solid #d3d8e2;
  background: #f9fafd;
  line-height: 1.2;
  height: 2.2em;
  box-sizing: border-box;
  vertical-align: middle;
}
.lock-btn {
  background: #f2f4fa;
  border: 1.5px solid #d3d8e2;
  color: #3477f6;
  border-radius: 7px;
  font-size: 1.3em;
  width: 2.35em;
  height: 2.35em;
  min-width: 2.35em;
  min-height: 2.35em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  box-sizing: border-box;
  padding: 0;
  margin-left: 0.2em;
  vertical-align: middle;
}
.lock-btn img, .lock-btn svg, .lock-btn span {
  display: block;
  width: 1.3em;
  height: 1.3em;
  margin: auto;
}
.lock-btn:focus {
  outline: 2px solid #3477f6;
}
@media (max-width: 700px) {
  main, #app-container {
    padding: 1rem 0.5rem;
  }
  .size-row {
    flex-wrap: wrap;
    gap: 0.5em 1em;
  }
  .size-row label,
  .size-row input,
  .lock-btn {
    margin-top: 0.2em;
  }
  .lock-btn {
    width: 2.8em;
    height: 2.8em;
    min-width: 2.8em;
    min-height: 2.8em;
  }
}

.inline-label,
#formatSelect {
  display: inline-block;
  vertical-align: middle;
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
}
.inline-label {
  font-weight: 500;
  margin-right: 0.6em;
  color: #32394b;
}
#formatSelect {
  min-width: 110px;
  padding: 0.42em 0.7em;
  font-size: 1.08rem;
  border-radius: 8px;
  border: 1px solid #d3d8e2;
  background: #f9fafd;
  box-sizing: border-box;
}

#tool-info {
  max-width: 700px;
  margin: 1.5rem auto 2rem auto;
  padding: 2rem 2rem 1.5rem 2rem;
  background: #f8fafd;      /* <-- THIS will pop! */
  border-radius: 15px;
  box-shadow: 0 4px 18px rgba(52,119,246,0.04), 0 1.5px 6px rgba(0,0,0,0.02);
  border: 1px solid #e9eff8;
}


#tool-info {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1.5rem;
  background-color: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  font-family: sans-serif;
}

#tool-info h2 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.4rem;
  color: #333;
}

#tool-info p,
#tool-info li {
  color: #444;
  line-height: 1.6;
}

#tool-info ol {
  padding-left: 1.2rem;
}

.tool-video {
  margin-top: 2rem;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.tool-faq {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.tool-faq h2 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: #333;
}

.tool-faq p {
  margin-bottom: 1rem;
  line-height: 1.5;
}
.share-box {
  margin-top: 18px;
  padding: 16px 12px;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  text-align: center;
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
}

.share-head {
  margin-bottom: 8px;
  font-size: 1.18rem;
  color: #224;
  font-weight: 700;
}

.share-text {
  margin-bottom: 16px;
  font-size: 1rem;
  color: #333;
  font-weight: 500;
}

.share-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.share-buttons button,
.share-buttons a {
  display: inline-block;
  box-sizing: border-box;
  font: inherit;
  line-height: 1.2;
  font-size: 1rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 6px;
  border: none;
  background: #4a90e2;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, transform 0.14s;
  box-shadow: 0 1px 4px rgba(74, 144, 226, 0.08);
  vertical-align: middle;
  margin: 0;
}
.share-buttons button:hover,
.share-buttons a:hover {
  background: #2263a8;
  transform: translateY(-2px) scale(1.04);
}


.copy-confirm {
  display: none;
  color: #209445;
  font-size: 0.98rem;
  margin-top: 7px;
  animation: fadeOut 1.5s forwards;
}

@keyframes fadeOut {
  0% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; display: none; }
}


