/* Section: logo layer tool */
.ll-app {
  --bg: #0d1117;
  --bg-2: #121826;
  --panel: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.14);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #a5b4fc;
  --accent-2: #d8b4fe;
  --gen: #fb7185;
  --gen-2: #ef4444;
  --gen-3: #be123c;
  --danger: #f87171;
  --ok: #34d399;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

.ll-app .ll-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}

.ll-app .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ll-app .brand {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ll-app h1 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
  font-weight: 800;
  line-height: 1.1;
}

.ll-app .brand-tool {
  width: fit-content;
  font-weight: 800;
  background-image: linear-gradient(to right, #a5b4fc, #d8b4fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.ll-app .brand p, .ll-app .muted, .ll-app .hint, .ll-app .empty-hint {
  color: var(--muted);
}

.ll-app .brand p {
  margin: 4px 0 0;
  font-size: 13px;
}

.ll-app .top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.ll-app .export-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ll-app .export-name-wrap span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.ll-app .export-name {
  width: 148px;
  flex: 0 1 148px;
  min-width: 96px;
}

.ll-app .format-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.ll-app .format-toggle[hidden] {
  display: none;
}

.ll-app .fmt-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.ll-app .fmt-btn.is-on {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent);
}

.ll-app .mode-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.ll-app .mode-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
}

.ll-app .mode-tab:hover { border-color: rgba(165, 180, 252, 0.4); color: var(--text); }

.ll-app .mode-tab.is-on {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #a855f7);
}

.ll-app .layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.ll-app .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px 16px 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.ll-app section { padding: 12px 0; border-bottom: 1px solid var(--line); }
.ll-app section:last-child { border-bottom: 0; }

.ll-app h2 {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background-image: linear-gradient(to right, #a5b4fc, #d8b4fe);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  width: max-content;
}

.ll-app .drop {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  cursor: pointer;
  background: var(--bg-2);
}

.ll-app .drop:hover, .ll-app .drop.over { border-color: var(--accent); }

.ll-app .row { display: flex; gap: 8px; flex-wrap: wrap; }

.ll-app .btn, .ll-app .presets button {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
}

.ll-app .btn:disabled { opacity: 0.4; cursor: not-allowed; }

.ll-app .btn.primary {
  background: linear-gradient(to right, #fb7185, #ef4444 55%, #be123c);
  color: #fff;
  border-color: transparent;
  font-weight: 800;
  padding: 10px 18px;
}

.ll-app .btn.primary:hover { filter: brightness(1.08); }
.ll-app .btn.ghost { background: transparent; }
.ll-app .file-btn { display: inline-flex; align-items: center; }

.ll-app .name-input {
  flex: 1;
  min-width: 90px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 10px;
}

.ll-app .library {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
  min-height: 28px;
}

.ll-app .thumb {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(45deg, #1e293b 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(-45deg, #1e293b 25%, transparent 25%) 0 6px / 12px 12px,
    #0b1220;
  overflow: hidden;
  cursor: pointer;
}

.ll-app .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ll-app .thumb.active { outline: 2px solid #818cf8; }

.ll-app .thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: #000a;
  color: #fff;
  cursor: pointer;
}

.ll-app .slider, .ll-app .xy label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 0;
  font-size: 13px;
}

.ll-app .slider span { display: flex; justify-content: space-between; }
.ll-app .slider em { font-style: normal; color: var(--accent); }

.ll-app input[type="range"] { width: 100%; accent-color: #818cf8; }

.ll-app .xy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ll-app .xy input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 8px;
}

.ll-app .presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.ll-app .presets button { padding: 6px; font-size: 12px; }
.ll-app .presets button:hover { border-color: var(--accent); }

.ll-app .hint { font-size: 12px; margin: 8px 0 0; }

.ll-app .batch-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.ll-app .batch-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.ll-app .batch-list li:last-child { border-bottom: 0; }
.ll-app .batch-list li:hover { background: rgba(99, 102, 241, 0.08); }
.ll-app .batch-list li.active { background: rgba(99, 102, 241, 0.16); }
.ll-app .batch-list li .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ll-app .batch-list li .tag {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ll-app .batch-list li button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
}
.ll-app .batch-list li button:hover { color: var(--danger); }
.ll-app #clearBatchBtn { margin-top: 8px; }

.ll-app .disabled { opacity: 0.45; pointer-events: none; }

.ll-app .stage-wrap { min-width: 0; }

.ll-app .stage {
  min-height: 520px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.ll-app .stage.empty { background: repeating-conic-gradient(#121826 0 25%, #0d1117 0 50%) 0 0 / 28px 28px; }

.ll-app .stage-stack {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.ll-app .stage-inner {
  position: relative;
  line-height: 0;
  max-width: 100%;
}

#preview,
.ll-app video {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 230px);
  background: #000;
}

#preview[hidden],
.ll-app video[hidden] { display: none; }

.ll-app video::-webkit-media-controls {
  display: none !important;
}

.ll-app .player {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #0b1220;
  border-top: 1px solid var(--line);
  line-height: 1.2;
}

.ll-app .player[hidden] { display: none; }

.ll-app .play-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 12px;
  min-width: 72px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.ll-app .play-btn:hover { border-color: var(--accent); }

.ll-app .player input[type="range"] {
  flex: 1;
  min-width: 80px;
  accent-color: #818cf8;
}

.ll-app .time {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.ll-app #logo {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: center center;
  cursor: grab;
  user-select: none;
  pointer-events: auto;
}

.ll-app #logo:active { cursor: grabbing; }

.ll-app .empty-hint {
  position: absolute;
  max-width: 360px;
  text-align: center;
  padding: 16px;
}

.ll-app .stage:not(.empty) .empty-hint { display: none; }

.ll-app .status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.ll-app .status.error { border-color: var(--danger); color: #fecaca; }
.ll-app .status.ok { border-color: var(--ok); }

.ll-app .bar {
  height: 6px;
  background: #1e293b;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
}

.ll-app .bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(to right, #6366f1, #a855f7);
}

.ll-app .place-panel section {
  border-bottom: 0;
  padding-top: 4px;
}

.ll-app .saved-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}

.ll-app .saved-hint a { color: #818cf8; }

.ll-app .ll-quota {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  max-width: 16rem;
  line-height: 1.35;
}

.ll-app .ll-quota a { color: #818cf8; }

@media (max-width: 1100px) {
  .ll-app .layout { grid-template-columns: 1fr; }
  .ll-app .top { flex-wrap: wrap; }
}
