@font-face {
  font-family: "Press Start 2P";
  src: url("./fonts/e3t4euO8T-267oIAQAu6jDQyK3nVivVqN-XZtg.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b1224;
  --panel: #0f182f;
  --panel-strong: #0c1428;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #22c55e;
  --accent-2: #38bdf8;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
  --radius: 12px;
  --tile-min: 200px;
  --tile-gap: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 18% 20%, #142040 0%, transparent 28%),
              radial-gradient(circle at 82% 15%, #1b294d 0%, transparent 30%),
              radial-gradient(circle at 50% 80%, #11203a 0%, transparent 30%),
              var(--bg);
  color: var(--text);
  font-family: "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  padding: 16px 18px 22px;
}

.lock-scroll {
  overflow: hidden;
}

.lock-footer .footer-mark {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.layout {
  width: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.header {
  background: linear-gradient(145deg, #0c172d 0%, #0f1f38 60%, #0c172d 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.add-btn,
.theme-btn,
.edit-toggle,
.export-btn,
.import-btn,
.preset-btn,
.fav-toggle,
.reset-btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.15);
  color: #e0f2fe;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: background 0.14s ease, transform 0.16s ease, box-shadow 0.16s ease;
  transform: translateZ(0);
  will-change: transform;
}

.add-btn:hover,
.theme-btn:hover,
.edit-toggle:hover,
.export-btn:hover,
.import-btn:hover,
.preset-btn:hover,
.fav-toggle:hover,
.reset-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}

.add-btn:active,
.theme-btn:active,
.edit-toggle:active,
.export-btn:active,
.import-btn:active,
.preset-btn:active,
.fav-toggle:active,
.reset-btn:active,
.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.reset-btn {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: #fecdd3;
}

.reset-btn:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.55);
}

.fav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.fav-toggle.active {
  background: rgba(243, 146, 0, 0.2);
  border-color: rgba(243, 146, 0, 0.6);
  color: #f39200;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.menu-toggle {
  display: none;
}

@media (min-width: 901px) {
  .header-actions {
    gap: 12px;
  }
  .action-group {
    flex-wrap: nowrap;
    align-items: stretch;
    height: 52px;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
  }
  .action-group > button {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    height: 100%;
    white-space: nowrap;
    line-height: 1.1;
  }
  .action-group-io {
    background: rgba(110, 191, 255, 0.06);
    border-color: rgba(110, 191, 255, 0.28);
  }
  .action-group-transfer {
    background: rgba(110, 191, 255, 0.08);
    border-color: rgba(110, 191, 255, 0.32);
  }
  .action-group-tools {
    background: rgba(243, 146, 0, 0.08);
    border-color: rgba(243, 146, 0, 0.35);
  }
}

@media (max-width: 900px) {
  .header-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .header-actions.collapsed .fav-toggle,
  .header-actions.collapsed .preset-btn,
  .header-actions.collapsed .export-btn,
  .header-actions.collapsed .import-btn,
  .header-actions.collapsed #rabattBtn,
  .header-actions.collapsed .edit-toggle,
  .header-actions.collapsed .reset-btn,
  .header-actions.collapsed .add-btn {
    display: none;
  }
  .header-actions.collapsed .action-group {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }
}

.footer-mark {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  pointer-events: auto;
  user-select: none;
  z-index: 20;
  font-family: "Press Start 2P", monospace;
  font-size: 8px;
}

.footer-left {
  cursor: pointer;
}

.footer-left span:hover,
.footer-left span:focus-visible,
.footer-left a:hover,
.footer-left a:focus-visible {
  color: #f39200;
}

.footer-mark > div {
  pointer-events: auto;
}

.footer-left .divider {
  margin: 0 8px;
  color: var(--muted);
}

.footer-link {
  color: inherit;
  text-decoration: none;
}

.info-banner {
  margin: 4px 2px 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
}

.privacy-linkback {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.15);
  color: #e0f2fe;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-decoration: none;
}

.privacy-linkback:hover {
  background: rgba(56, 189, 248, 0.25);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.14);
}

.privacy-linkback.danger {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.12);
  color: #fecdd3;
}

.privacy-linkback.danger:hover {
  background: rgba(239, 68, 68, 0.18);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.18);
}

.privacy-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-meta {
  text-align: left;
}

body.auth-locked .layout {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.rabatt-summary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

.summary-row strong,
.summary-row span:last-child {
  color: var(--text);
  font-weight: 700;
}

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

.rabatt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 4px;
  overflow-x: auto;
}

.rabatt-col {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
}

.rabatt-col h4 {
  margin: 0 0 8px;
  color: var(--text);
}

.rabatt-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.rabatt-input-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 8px;
}

.rabatt-select {
  height: 42px;
  padding: 0 12px;
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.18), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.rabatt-select:hover {
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.28), rgba(255, 255, 255, 0.08));
  border-color: var(--accent);
  transform: translateY(-1px);
}

.rabatt-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

@media (max-width: 960px) {
  body {
    padding: 12px 14px 18px;
  }
  .header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .layout-controls {
    width: 100%;
    gap: 6px;
  }
  .search {
    width: 100%;
    max-width: none;
  }
  .header button {
    width: 100%;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 640px) {
  body {
    padding: 10px 12px 16px;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(clamp(140px, var(--tile-min), 160px), 1fr));
    gap: 10px;
  }
  .tile {
    padding: 12px;
  }
}

@media (max-width: 520px) {
  .layout-controls {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  .layout-controls label {
    display: none;
  }
  .layout-controls .range-progress {
    display: none;
  }
  :root {
    --tile-min: clamp(110px, calc((100vw - 28px) / 2), 150px);
    --tile-gap: 6px;
  }
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(clamp(110px, calc((100vw - 28px) / 2), 150px), 1fr));
    gap: var(--tile-gap);
  }
}

.search {
  flex: 1;
  min-width: 220px;
  max-width: 380px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0.2px;
}

.search:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.range-progress {
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #f39200 0%,
    #f39200 var(--range-progress, 0%),
    rgba(255, 255, 255, 0.12) var(--range-progress, 0%),
    rgba(255, 255, 255, 0.12) 100%
  );
  outline: none;
  cursor: pointer;
}

.range-progress::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f39200;
  border: 2px solid #0f182f;
  box-shadow: 0 0 0 2px rgba(243, 146, 0, 0.35);
}

.range-progress::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f39200;
  border: 2px solid #0f182f;
  box-shadow: 0 0 0 2px rgba(243, 146, 0, 0.35);
}

.range-progress::-moz-range-progress {
  background: #f39200;
  height: 6px;
  border-radius: 999px;
}

.range-progress::-moz-range-track {
  background: rgba(255, 255, 255, 0.12);
  height: 6px;
  border-radius: 999px;
}

.title-block h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.5px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--tile-min), 1fr));
  gap: var(--tile-gap);
  justify-items: stretch;
  padding-bottom: 96px;
}

.tile {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: default;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tile.inactive {
  opacity: 0.35;
  filter: grayscale(0.65) saturate(0.6);
  border-color: rgba(255, 255, 255, 0.12);
}

.tile.inactive:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.tile.dragging .handle,
.tile.dragging a,
.tile.dragging * {
  visibility: hidden;
}

.tile.hidden {
  display: none;
}

.tile::after {
  content: "";
  position: absolute;
  inset: -40% 40% 40% -40%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.1), transparent 55%);
  opacity: 0.5;
  pointer-events: none;
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(34, 197, 94, 0.28), rgba(37, 99, 235, 0.22));
  opacity: 0.15;
  pointer-events: none;
}

.tile h2 {
  margin: 0 0 6px;
  font-size: 15px;
  letter-spacing: 0.4px;
}

.tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.tile a {
  display: block;
  color: inherit;
  text-decoration: none;
  position: relative;
  z-index: 1;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  height: 100%;
  padding: 8px 42px 34px 0;
}

.tile:hover {
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(34, 197, 94, 0.2), 0 0 0 6px rgba(34, 197, 94, 0.08);
}

.tile:active {
  transform: translateY(-1px) scale(0.995);
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.5);
}

.drag-ghost {
  position: fixed;
  top: -9999px;
  left: -9999px;
  pointer-events: none;
  opacity: 0.7;
}

.tag {
  display: none;
}

.favorite {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 2;
  width: auto;
  height: auto;
  padding: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  display: grid;
  place-items: center;
  font-size: 16px;
  cursor: pointer;
  border: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.12s ease, transform 0.12s ease, filter 0.2s ease;
}

@media (hover: hover) {
  .favorite:hover {
    transform: translateY(-1px) scale(1.08);
    color: rgba(243, 146, 0, 0.8);
    filter: drop-shadow(0 0 6px rgba(243, 146, 0, 0.5));
  }
}

.favorite.on {
  color: #f39200;
}

.favorite:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .favorite {
    width: auto;
    height: auto;
    padding: 10px;
    font-size: 17px;
  }
}

.actions {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
  display: none;
}

.action-btn {
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.action-btn:hover {
  background: rgba(248, 113, 113, 0.18);
  color: #fecdd3;
}

.action-btn:active {
  transform: translateY(1px);
}

.inactive-row {
  gap: 8px;
}

.inactive-title {
  color: var(--muted);
  font-size: 13px;
}

.inactive-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.inactive-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.edit-mode .actions { display: flex; }
.edit-mode .tile { animation: wiggle 0.9s ease-in-out infinite; cursor: pointer; }

@keyframes wiggle {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(1deg); }
}

.edit-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.12);
  color: #e0f2fe;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.3px;
  cursor: pointer;
  z-index: 2;
  transition: background 0.12s ease, transform 0.12s ease;
}

.edit-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  transform: translateY(-1px);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 10;
  padding: 20px;
  overflow-y: auto;
}

.modal.open { display: flex; }

.modal-content {
  width: min(520px, 100%);
  background: #0f182f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.changelog-list {
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.muted-small {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 8px;
}

.form-row {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}


.category-section {
  display: grid;
  gap: 8px;
  align-items: start;
}

.category-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 2px;
}

.category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 8px 10px;
}

.category-item input[type="checkbox"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

label {
  font-size: 13px;
  color: var(--muted);
}

input[type="text"],
input[type="url"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 16px;
}

input[type="search"],
input[type="number"],
input[type="color"] {
  font-size: 16px;
}

/* Entferne Browser-Spinner bei Zahleneingaben */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.btn.primary {
  background: var(--accent);
  color: #0b1224;
  border-color: rgba(34, 197, 94, 0.6);
}

.btn.danger {
  background: #ef4444;
  color: #fff;
  border-color: rgba(248, 113, 113, 0.7);
}

.btn:hover { opacity: 0.9; }

.image-list {
  display: grid;
  gap: 12px;
  padding: 4px 2px;
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 6px;
}

.image-item {
  display: grid;
  grid-template-columns: 28px 90px 1fr auto;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
}

.image-item.simple {
  grid-template-columns: 90px 1fr;
  padding-left: 10px;
}

.image-item.simple .image-thumb {
  grid-column: 1;
}

.image-item.simple .image-meta {
  grid-column: 2;
}

.image-thumb {
  width: 90px;
  height: 70px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.image-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0; /* allow ellipsis to shrink inside grid */
}

.image-name {
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: stretch;
  justify-content: center;
}

.remove-icon {
  color: #ef4444;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  padding: 6px 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.remove-icon:hover {
  background: transparent;
}

.remove-icon:active {
  transform: translateY(1px);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-weight: 600;
  min-width: 60%;
}

.preview-modal-content {
  width: min(780px, 96vw);
  background: #0f182f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.preview-body {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  max-height: 60vh;
  overflow: auto;
}

.preview-image {
  max-width: 100%;
  max-height: 58vh;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

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

.resize-size-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.resize-size-btn.active {
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(34, 197, 94, 0.6);
  color: #bbf7d0;
}

.drop-zone {
  border: 2px dashed rgba(56, 189, 248, 0.4);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 0.12s ease, background 0.12s ease;
}

.drop-zone.inline {
  padding: 12px;
  font-size: 13px;
}

.drop-zone.dragover {
  border-color: rgba(34, 197, 94, 0.7);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

@media (max-width: 640px) {
  body { padding: 18px; }
  .header { flex-direction: column; align-items: flex-start; }
}
