:root {
  color-scheme: light dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #101217;
  color: #f5f7fa;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  gap: 16px;
}

.subtitle {
  color: #b9c0cc;
}

.card {
  background: #1a1f29;
  border: 1px solid #2b3340;
  border-radius: 14px;
  padding: 16px;
}

h1,
h2 {
  margin-top: 0;
}

.drop-zone {
  border: 2px dashed #475167;
  border-radius: 12px;
  display: block;
  padding: 24px;
  text-align: center;
  cursor: pointer;
}

.drop-zone.drag-over {
  border-color: #6ea8fe;
  background: rgba(110, 168, 254, 0.1);
}

.drop-zone input {
  display: none;
}

.preview-wrap {
  background-image: linear-gradient(45deg, #2d3748 25%, transparent 25%),
    linear-gradient(-45deg, #2d3748 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #2d3748 75%),
    linear-gradient(-45deg, transparent 75%, #2d3748 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  border-radius: 12px;
  padding: 8px;
}

.preview {
  min-height: 240px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
}

.preview canvas {
  max-width: 100%;
  max-height: 360px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

input,
select,
button {
  border-radius: 8px;
  border: 1px solid #445066;
  padding: 8px;
  background: #10151e;
  color: inherit;
}

.row {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.size-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #2d3748;
  border-radius: 10px;
}

.panel-title {
  margin: 0 0 10px 0;
  font-size: 15px;
  color: #c9d1dc;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox input {
  width: 18px;
  height: 18px;
}

.primary {
  margin-top: 14px;
  font-weight: 600;
  background: #2f81f7;
  border-color: #2f81f7;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.download-link {
  margin-top: 14px;
  color: #8ab4ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.download-link:hover {
  color: #a5c7ff;
}

.download-link-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.result-preview {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed #3a4558;
  border-radius: 10px;
  padding: 10px;
}

.result-preview img,
.result-preview video {
  max-width: 100%;
  border-radius: 8px;
}

.hidden {
  display: none;
}

.muted {
  color: #9aa5b5;
}

.footer-note {
  color: #95a0b1;
  font-size: 13px;
  text-align: center;
  padding-bottom: 20px;
}

.footer-main {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #c1cad8;
}

.footer-small {
  margin: 6px 0 0 0;
  font-size: 11px;
  line-height: 1.4;
}

.footer-small a {
  color: #8ab4ff;
}

.footer-small a:hover {
  color: #a5c7ff;
}
