/* style.css
   Combined stylesheet for 3d_generator.html and Ideation.html
   All inline and embedded CSS has been moved here.
*/

body,
button,
input,
select,
textarea {
  margin: 0;
  background-color: #000000;
  color: white;
  font-family: 'Montserrat', sans-serif;
}

/* Logo Link Styles */
.logo-link {
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.logo-link:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.logo-link:active {
  transform: scale(0.95);
}

body {
  overflow: hidden;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 10px;
}

/* Canvas Drawing Area */
.story-frame {
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.story-frame:hover {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.canvas-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  cursor: crosshair;
  touch-action: none;
}

#canvas-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  cursor: crosshair;
  touch-action: none;
  transition: all 0.3s ease;
  z-index: 0;
}

#canvas-container.landscape-mode,
#canvas-container:not(.portrait-mode) {
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  transform: none !important;
  max-width: none !important;
  max-height: none !important;
}

#canvas-container.portrait-mode {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: min(44vw, calc(90vh * 9 / 16));
  max-width: 45vw;
  max-height: 90vh;
  aspect-ratio: 9 / 16;
  height: auto;
  transform: translate(-50%, -50%) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 0 90px rgba(0, 0, 0, 0.75);
}

#canvas-container.portrait-mode canvas {
  width: 100% !important;
  height: 100% !important;
}

.recording-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  z-index: 60;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.recording-overlay.active {
  display: flex;
}

.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.frame-notes {
  padding: 12px;
  flex-grow: 1;
  background: #171717;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.frame-notes textarea {
  width: 100%;
  height: 80px;
  background: transparent;
  border: none;
  font-size: 12px;
  line-height: 1.5;
  color: #9ca3af;
  resize: none;
  outline: none;
}

.frame-notes textarea:focus {
  color: white;
}

.story-frame.active {
  border-color: #00D3E7;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.tool-btn {
  transition: all 0.2s ease;
}

.tool-btn.active {
  background: rgba(6, 182, 212, 0.2) !important;
  border-color: rgba(6, 182, 212, 0.5) !important;
  color: #00D3E7 !important;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.frame-number {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  color: #00D3E7;
  z-index: 10;
  pointer-events: none;
}

@keyframes pulse-red {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    transform: scale(1);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    transform: scale(1.1);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    transform: scale(1);
  }
}

.mic-recording {
  animation: pulse-red 1.5s infinite;
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

/* Donation Modal */
#donation-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

#donation-modal.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, #0d0d0d 0%, #171717 100%);
  border: 1px solid rgba(6, 182, 212, 0.3);
  box-shadow: 0 0 50px rgba(6, 182, 212, 0.2);
  border-radius: 24px;
  padding: 40px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#donation-modal.active .modal-content {
  transform: scale(1);
}

/* Focus Mode Overlay */
#focus-overlay {
  display: none;
  opacity: 0;
  position: fixed;
  inset: 0;
  background: #000000;
  z-index: 200;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  overflow-y: auto;
  transition: opacity 0.3s ease;
}

#focus-overlay.active {
  display: flex;
  opacity: 1;
}

.focus-content {
  width: 100%;
  max-width: 1400px;
  animation: focus-zoom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes focus-zoom {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.exit-focus-btn {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 210;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px border-white/10;
  border-radius: 12px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  backdrop-filter: blur(10px);
  transition: all 0.2s;
}

/* Export Preview Overlay */
#export-preview-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  z-index: 300;
  flex-direction: column;
  align-items: center;
  padding: 40px;
  overflow-y: auto;
}

/* DesignCreator Editor */
body.design-page {
  background:
    radial-gradient(circle at top, rgba(8, 145, 178, 0.12), transparent 24%),
    linear-gradient(180deg, #09090b 0%, #020202 62%, #000000 100%);
}

.aplus-panel-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.82), rgba(9, 9, 11, 0.94));
  border: 1px solid rgba(63, 63, 70, 0.7);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.aplus-panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e4e4e7;
}

.aplus-helper-copy {
  font-size: 11px;
  line-height: 1.6;
  color: #71717a;
}

.aplus-tip-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.aplus-action-btn,
.aplus-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(63, 63, 70, 0.9);
  background: rgba(17, 24, 39, 0.55);
  color: #d4d4d8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.aplus-action-btn:hover,
.aplus-tool-btn:hover,
.aplus-chip-btn:hover,
.aplus-layer-icon:hover,
.aplus-wide-btn:hover,
.aplus-zoom-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.45);
  color: #ecfeff;
}

.aplus-tool-btn.is-active,
.aplus-chip-btn.is-active,
.aplus-toggle-active {
  background: rgba(6, 182, 212, 0.18);
  border-color: rgba(6, 182, 212, 0.55);
  color: #67e8f9;
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.14);
}

.aplus-chip-btn {
  width: 100%;
  min-width: 0;
  min-height: var(--ui-btn-sm-min-h);
  padding: var(--ui-btn-sm-py) 10px;
  border-radius: var(--ui-btn-sm-radius);
  border: 1px solid rgba(63, 63, 70, 0.8);
  background: rgba(17, 24, 39, 0.45);
  color: #d4d4d8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: normal;
  line-height: 1.25;
  transition: all 0.2s ease;
}

.aplus-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  min-height: 58px;
  text-align: left;
}

.aplus-preset-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: inherit;
}

.aplus-preset-meta {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #71717a;
}

.aplus-preset-btn.is-active .aplus-preset-meta {
  color: #b6f6ff;
}

.aplus-field-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aplus-field-block span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #71717a;
}

.aplus-input,
.aplus-title-input,
.aplus-select-sm {
  width: 100%;
  border: 1px solid rgba(63, 63, 70, 0.8);
  background: rgba(9, 9, 11, 0.9);
  color: #fafafa;
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 13px;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.aplus-input:focus,
.aplus-title-input:focus,
.aplus-select-sm:focus,
.aplus-layer-name:focus {
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.14);
}

.aplus-title-input {
  padding: 0;
  border: none;
  background: transparent;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: white;
}

.aplus-color-input {
  width: 100%;
  min-height: 44px;
  padding: 4px;
  border: 1px solid rgba(63, 63, 70, 0.8);
  border-radius: 14px;
  background: rgba(9, 9, 11, 0.9);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
}

.aplus-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 10px;
}

.aplus-color-input::-webkit-color-swatch {
  border: none;
  border-radius: 10px;
}

.aplus-color-input::-moz-color-swatch {
  border: none;
  border-radius: 10px;
}

.aplus-wide-btn {
  width: 100%;
  min-height: 44px;
  min-width: 0;
  border: 1px solid rgba(6, 182, 212, 0.28);
  border-radius: 14px;
  background: rgba(6, 182, 212, 0.12);
  color: #b6f6ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  line-height: 1.1;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: normal;
  line-height: 1.35;
  transition: all 0.2s ease;
}

.aplus-wide-btn.muted {
  border-color: rgba(63, 63, 70, 0.72);
  background: rgba(17, 24, 39, 0.55);
  color: #d4d4d8;
}

.aplus-workspace-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  border-radius: 32px;
  border: 1px solid rgba(63, 63, 70, 0.8);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(3, 7, 18, 0.86)),
    radial-gradient(circle at top, rgba(34, 211, 238, 0.08), transparent 40%);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.aplus-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(18rem, 1fr);
  min-height: 0;
}

.aplus-header-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 20px;
  align-items: start;
}

.aplus-header-copy {
  min-width: 0;
}

.aplus-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.aplus-header-select {
  width: auto;
  min-width: 172px;
  max-width: 200px;
  min-height: var(--ui-btn-sm-min-h);
  border-radius: var(--ui-btn-sm-radius);
  border-color: rgba(63, 63, 70, 0.7);
  background: rgba(9, 9, 11, 0.72);
}

.aplus-workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(63, 63, 70, 0.7);
  background: rgba(0, 0, 0, 0.26);
}

.aplus-filmstrip-shell {
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(63, 63, 70, 0.7);
  background:
    linear-gradient(180deg, rgba(9, 9, 11, 0.9), rgba(9, 9, 11, 0.78)),
    radial-gradient(circle at top, rgba(34, 211, 238, 0.08), transparent 45%);
}

.aplus-filmstrip-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.aplus-filmstrip-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(116px, 116px);
  gap: 12px;
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 229, 255, 0.24) transparent;
}

.aplus-filmstrip-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(63, 63, 70, 0.76);
  background: rgba(17, 24, 39, 0.58);
  color: #e4e4e7;
  text-align: left;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.aplus-filmstrip-item:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.38);
}

.aplus-filmstrip-item.is-active {
  border-color: rgba(0, 229, 255, 0.58);
  background: rgba(6, 182, 212, 0.16);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.12);
}

.aplus-filmstrip-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(39, 39, 42, 0.92), rgba(17, 24, 39, 0.96));
  border: 1px solid rgba(63, 63, 70, 0.72);
}

.aplus-filmstrip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.aplus-filmstrip-name {
  font-size: 11px;
  font-weight: 700;
  color: #fafafa;
  white-space: normal;
  line-height: 1.2;
}

.aplus-filmstrip-meta {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #71717a;
}

.aplus-filmstrip-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100%;
  min-height: 116px;
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(63, 63, 70, 0.76);
  background: rgba(9, 9, 11, 0.58);
  color: #71717a;
  font-size: 12px;
  line-height: 1.6;
}

.aplus-stage-badge,
.aplus-meta-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.14);
  color: #a5f3fc;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.editor-stage-shell {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(14, 165, 233, 0.06), transparent 38%),
    linear-gradient(180deg, rgba(3, 7, 18, 0.95), rgba(2, 6, 23, 0.98));
}

.editor-stage-shell.space-pan,
.editor-stage-shell.is-panning {
  cursor: grab;
}

.editor-stage-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.3;
}

.editor-stage-shell .canvas-container {
  position: absolute !important;
  inset: 0 !important;
}

#editor-canvas,
.editor-stage-shell canvas {
  display: block;
}

.drop-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.drop-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.drop-overlay-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 340px;
  text-align: center;
  padding: 28px 24px;
  border-radius: 24px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(9, 9, 11, 0.92);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.12);
}

.aplus-inspector-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(63, 63, 70, 0.76);
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.74), rgba(9, 9, 11, 0.96));
}

.aplus-inspector-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.aplus-inspector-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f4f4f5;
}

.aplus-inspector-copy {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.55;
  color: #71717a;
}

.aplus-divider-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #67e8f9;
}

.aplus-layer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 18px;
  border: 1px solid rgba(63, 63, 70, 0.72);
  background: rgba(17, 24, 39, 0.46);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.aplus-layer-row.is-active {
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.5);
}

.aplus-layer-row.is-hidden {
  opacity: 0.56;
}

.aplus-layer-row:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.32);
}

.aplus-layer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid rgba(63, 63, 70, 0.76);
  background: rgba(9, 9, 11, 0.84);
  color: #d4d4d8;
  transition: all 0.2s ease;
}

.aplus-layer-icon.danger:hover {
  border-color: rgba(248, 113, 113, 0.52);
  color: #fca5a5;
}

.aplus-layer-name {
  width: 100%;
  border: none;
  background: transparent;
  color: #fafafa;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  padding: 0;
}

.aplus-layer-drag {
  cursor: grab;
}

.aplus-layer-ghost {
  opacity: 0.35;
}

.aplus-zoom-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--ui-btn-sm-min-h);
  padding: 4px 8px;
  border-radius: var(--ui-btn-sm-radius);
  border: 1px solid rgba(63, 63, 70, 0.7);
  background: rgba(9, 9, 11, 0.72);
}

.aplus-zoom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(63, 63, 70, 0.76);
  background: rgba(17, 24, 39, 0.62);
  color: #e4e4e7;
  transition: all 0.2s ease;
}

.aplus-zoom-label {
  min-width: 52px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fafafa;
}

.aplus-select-sm {
  min-width: 132px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.aplus-zoom-group,
.aplus-select-sm {
  flex-shrink: 0;
  white-space: nowrap;
}

.toolbar-btn {
  flex-shrink: 0;
}

textarea.aplus-input {
  resize: vertical;
}

@media (max-width: 1280px) {
  #main-sidebar {
    width: 17.5rem;
  }

  #editor-inspector {
    min-width: 17rem;
  }

  .aplus-header-shell {
    grid-template-columns: 1fr;
  }

  .aplus-header-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 1080px) {
  body.design-page {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  #main-sidebar {
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(63, 63, 70, 0.7);
  }

  body.design-page main {
    min-height: 0;
  }

  .aplus-editor-layout {
    display: flex;
    flex-direction: column;
  }

  #editor-inspector {
    width: 100%;
    min-width: 0;
    border-left: 0;
    border-top: 1px solid rgba(63, 63, 70, 0.7);
  }

  .aplus-workspace-shell {
    min-height: 58vh;
  }
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

#export-preview-overlay.active {
  display: flex;
}

.preview-canvas-container {
  max-width: 90%;
  box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-bottom: 40px;
}

.preview-canvas-container canvas {
  width: 100%;
  height: auto;
}

/* Additional helper classes */
.logo-fallback {
  display: none;
}

:root {
  --ui-btn-lg-min-h: 48px;
  --ui-btn-lg-radius: 12px;
  --ui-btn-lg-px: 16px;
  --ui-btn-lg-py: 12px;
  --ui-btn-lg-font: 11px;
  --ui-btn-lg-gap: 8px;
  --ui-btn-lg-letter: 0.02em;

  --ui-btn-sm-min-h: 38px;
  --ui-btn-sm-radius: 10px;
  --ui-btn-sm-px: 12px;
  --ui-btn-sm-py: 8px;
  --ui-btn-sm-font: 10px;
  --ui-btn-sm-gap: 6px;
  --ui-btn-sm-letter: 0.04em;
}

.nav-card-btn,
.creator-btn,
.style-btn,
.type-btn,
.template-card {
  min-height: var(--ui-btn-lg-min-h) !important;
  border-radius: var(--ui-btn-lg-radius) !important;
  padding: var(--ui-btn-lg-py) var(--ui-btn-lg-px) !important;
  font-size: var(--ui-btn-lg-font) !important;
  font-weight: 700 !important;
  letter-spacing: var(--ui-btn-lg-letter) !important;
  white-space: normal !important;
  line-height: 1.1 !important;
  text-align: center;
}

.nav-card-btn,
.creator-btn,
.style-btn {
  display: flex;
  align-items: center;
  gap: var(--ui-btn-lg-gap);
}

.nav-card-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.nav-card-subtitle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.creator-mini-btn,
.toolbar-btn,
.ratio-btn,
.aplus-chip-btn,
.mode-btn,
.align-btn,
.fill-btn,
.res-btn,
.orient-btn,
.fps-btn,
.qual-btn,
.format-btn,
.preset-btn,
.tool-btn {
  min-height: var(--ui-btn-sm-min-h) !important;
  border-radius: var(--ui-btn-sm-radius) !important;
  padding: var(--ui-btn-sm-py) var(--ui-btn-sm-px) !important;
  font-size: var(--ui-btn-sm-font) !important;
  font-weight: 700 !important;
  letter-spacing: var(--ui-btn-sm-letter) !important;
}

.aspect-ratio-16-9 {
  aspect-ratio: 16/9;
}

.color-btn[data-color="#00D3E7"] {
  background: #00D3E7;
}

.color-btn[data-color="#ffffff"] {
  background: #ffffff;
}

.color-btn[data-color="#22c55e"] {
  background: #22c55e;
}

.color-btn[data-color="#a855f7"] {
  background: #a855f7;
}

.color-btn[data-color="#ff4444"] {
  background: #ff4444;
}

/* Design Creator */
.design-page {
  overflow: hidden;
}

.logo-fallback {
  display: none;
}

.creator-btn,
.creator-mini-btn,
.ratio-btn,
.mode-btn,
.align-btn,
.fill-btn,
.template-card,
.icon-card {
  border: 1px solid rgba(63, 63, 70, 0.7);
  background: rgba(24, 24, 27, 0.8);
  color: #d4d4d8;
  border-radius: 14px;
  transition: all 0.2s ease;
}

.creator-btn,
.icon-card,
.template-card {
  min-height: var(--ui-btn-lg-min-h);
  padding: var(--ui-btn-lg-py) var(--ui-btn-lg-px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--ui-btn-lg-gap);
  font-size: var(--ui-btn-lg-font);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ui-btn-lg-letter);
}

.creator-mini-btn,
.ratio-btn,
.mode-btn,
.align-btn,
.fill-btn {
  min-height: var(--ui-btn-sm-min-h);
  padding: var(--ui-btn-sm-py) var(--ui-btn-sm-px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ui-btn-sm-gap);
  font-size: var(--ui-btn-sm-font);
  font-weight: 700;
  width: 100%;
  min-width: 0;
  text-align: center;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: normal;
  word-break: break-word;
}

.aplus-chip-btn {
  min-height: 40px;
  padding-inline: 8px !important;
  font-size: 9px !important;
  letter-spacing: 0.03em !important;
}

.creator-btn:hover,
.creator-mini-btn:hover,
.ratio-btn:hover,
.mode-btn:hover,
.align-btn:hover,
.fill-btn:hover,
.template-card:hover,
.icon-card:hover,
.toolbar-btn:hover,
.layer-item:hover {
  border-color: rgba(6, 182, 212, 0.45);
  color: #e4fbff;
  transform: translateY(-1px);
}

.creator-mini-btn.danger:hover {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.creator-mini-btn:disabled,
.aplus-wide-btn:disabled,
.toolbar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.active-action,
.ratio-btn.active,
.mode-btn.active,
.align-btn.active,
.fill-btn.active,
.template-card.active,
.icon-card.active,
.active-toggle,
.layer-item.selected {
  background: rgba(6, 182, 212, 0.16);
  border-color: rgba(6, 182, 212, 0.55);
  color: #7dd3fc;
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.12);
}

.creator-mini-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pill-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.25);
  background: rgba(6, 182, 212, 0.12);
  color: #a5f3fc;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.toolbar-btn {
  min-height: var(--ui-btn-sm-min-h);
  padding: var(--ui-btn-sm-py) 16px;
  border-radius: var(--ui-btn-sm-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ui-btn-sm-gap);
  border: 1px solid rgba(63, 63, 70, 0.7);
  font-size: var(--ui-btn-sm-font);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ui-btn-sm-letter);
  transition: all 0.2s ease;
  white-space: normal;
  line-height: 1;
  text-align: center;
}

.toolbar-btn.secondary {
  background: rgba(9, 9, 11, 0.72);
  color: #d4d4d8;
}

.toolbar-btn.primary {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.4), rgba(6, 182, 212, 0.1));
  border-color: rgba(6, 182, 212, 0.6);
  color: #ecfeff;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.2);
}

.aplus-premium-export-btn {
  position: relative;
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #00D3E7 0%, #0891b2 100%);
  color: white;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.4);
  white-space: normal;
  line-height: 1.2;
  text-align: center;
  border: none;
  cursor: pointer;
  overflow: hidden;
}

.aplus-premium-export-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.6);
  filter: brightness(1.1);
}

.aplus-premium-export-btn.muted {
  background: rgba(24, 24, 27, 0.65);
  border: 1px solid rgba(63, 63, 70, 0.4);
  color: #71717a;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.aplus-premium-export-btn.muted:hover {
  background: rgba(39, 39, 42, 0.95);
  border-color: rgba(34, 211, 238, 0.3);
  color: #f4f4f5;
  box-shadow: 0 6px 25px rgba(34, 211, 238, 0.1);
  transform: translateY(-2px);
}

.aplus-premium-export-btn:active {
  transform: translateY(0) scale(0.98);
}

.aplus-premium-export-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: 0.5s;
  pointer-events: none;
}

.aplus-premium-export-btn:hover::after {
  left: 100%;
}

.design-workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 320px;
  gap: 20px;
}

.workspace-panel {
  min-height: 0;
  overflow-y: auto;
  border: 1px solid rgba(39, 39, 42, 0.9);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(9, 9, 11, 0.92) 0%, rgba(24, 24, 27, 0.82) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.workspace-section {
  padding: 18px;
  border-bottom: 1px solid rgba(39, 39, 42, 0.85);
}

.workspace-section:last-child {
  border-bottom: none;
}

.workspace-heading {
  font-size: 11px;
  font-weight: 800;
  color: #f4f4f5;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.workspace-copy {
  margin-top: 10px;
  color: #71717a;
  font-size: 12px;
  line-height: 1.6;
}

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

.canvas-stage-wrap {
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(6, 182, 212, 0.07), transparent 28%), rgba(9, 9, 11, 0.9);
}

.canvas-stage-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.45;
  pointer-events: none;
}

.canvas-stage {
  width: min(100%, 860px);
  position: relative;
  padding: 0;
  border-radius: 22px;
}

.chrome-frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
}

.canvas-stage-inner {
  width: 100%;
  max-height: calc(100vh - 200px);
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.5);
}

.canvas-stage-inner.show-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  opacity: 0.25;
}

.alignment-guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.guide {
  position: absolute;
  background: rgba(0, 229, 255, 0.8);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.35);
}

.guide-vertical {
  top: 0;
  bottom: 0;
  width: 1px;
  left: 50%;
}

.guide-horizontal {
  left: 0;
  right: 0;
  height: 1px;
  top: 50%;
}

.design-element {
  position: absolute;
  transform-origin: center center;
  user-select: none;
}

.design-element.selected {
  outline: 1px dashed rgba(125, 211, 252, 0.95);
  outline-offset: 4px;
}

.design-element.locked {
  opacity: 0.7;
}

.element-content {
  width: 100%;
  height: 100%;
  cursor: move;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.element-text {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 2px;
  white-space: pre-wrap;
  line-break: auto;
  word-break: break-word;
}

.element-shape {
  width: 100%;
  height: 100%;
}

.element-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.element-icon i {
  line-height: 1;
}

.transform-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #ecfeff;
  border: 2px solid #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.18);
}

.handle-nw { top: -9px; left: -9px; cursor: nwse-resize; }
.handle-ne { top: -9px; right: -9px; cursor: nesw-resize; }
.handle-sw { bottom: -9px; left: -9px; cursor: nesw-resize; }
.handle-se { bottom: -9px; right: -9px; cursor: nwse-resize; }
.handle-rotate {
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  cursor: grab;
}

.panel-label {
  color: #a1a1aa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.creator-input,
.creator-select,
.color-input,
.range-input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(63, 63, 70, 0.8);
  background: rgba(9, 9, 11, 0.8);
  color: #f4f4f5;
  padding: 12px 14px;
}

.color-input {
  min-height: 48px;
  padding: 8px;
}

.range-input {
  --range-percent: 50%;
  --range-accent: #00D3E7;
  --range-accent-soft: rgba(0, 229, 255, 0.22);
  --range-track: rgba(39, 39, 42, 0.95);
  appearance: none;
  -webkit-appearance: none;
  min-height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  accent-color: var(--range-accent);
}

.range-input:focus-visible {
  outline: none;
}

.range-input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--range-accent) 0%,
    var(--range-accent) var(--range-percent),
    var(--range-track) var(--range-percent),
    var(--range-track) 100%
  );
  box-shadow:
    inset 0 0 0 1px rgba(63, 63, 70, 0.82),
    0 0 0 6px rgba(0, 229, 255, 0.04);
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border-radius: 999px;
  border: 2px solid var(--range-accent);
  background: #ecfeff;
  box-shadow:
    0 0 0 4px var(--range-accent-soft),
    0 0 18px rgba(0, 229, 255, 0.28);
}

.range-input::-moz-range-track {
  height: 6px;
  border: none;
  border-radius: 999px;
  background: var(--range-track);
  box-shadow:
    inset 0 0 0 1px rgba(63, 63, 70, 0.82),
    0 0 0 6px rgba(0, 229, 255, 0.04);
}

.range-input::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--range-accent);
}

.range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid var(--range-accent);
  border-radius: 999px;
  background: #ecfeff;
  box-shadow:
    0 0 0 4px var(--range-accent-soft),
    0 0 18px rgba(0, 229, 255, 0.28);
}

.layer-item {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(39, 39, 42, 0.9);
  background: rgba(10, 10, 14, 0.9);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  transition: all 0.2s ease;
}

.layer-title {
  font-size: 12px;
  font-weight: 700;
  color: #fafafa;
}

.layer-meta {
  font-size: 10px;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.template-card,
.icon-card {
  flex-direction: column;
  text-transform: none;
  letter-spacing: normal;
  min-height: 132px;
}

.template-card {
  align-items: stretch;
  justify-content: flex-start;
  padding: 10px !important;
  gap: 10px;
  overflow: hidden;
}

.template-preview-shell {
  width: 100%;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(9, 9, 11, 0.94) 0%, rgba(24, 24, 27, 0.9) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  aspect-ratio: 4 / 5;
}

.template-card[data-template-layout="horizontal"] .template-preview-shell {
  aspect-ratio: 16 / 9;
}

.template-preview {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.template-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0 2px 2px;
}

.template-name,
.icon-card span {
  font-size: 11px;
  font-weight: 700;
}

.template-caption {
  font-size: 10px;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.template-description {
  font-size: 11px;
  color: #a1a1aa;
  line-height: 1.45;
  text-wrap: balance;
}

.icon-card i {
  font-size: 20px;
  color: #7dd3fc;
}

@media (max-width: 1280px) {
  .design-workspace {
    grid-template-columns: 220px minmax(0, 1fr) 290px;
  }
}

@media (max-width: 1100px) {
  body.design-page {
    overflow: auto;
  }

  .design-workspace {
    grid-template-columns: 1fr;
  }

  .workspace-panel {
    max-height: none;
  }

  .canvas-stage-inner {
    max-height: none;
  }
}

@media (max-width: 768px) {
  body.design-page {
    display: block;
    height: auto;
    min-height: 100vh;
  }

  #main-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(39, 39, 42, 0.8);
  }

  .canvas-stage-wrap {
    padding: 16px;
  }

  .canvas-stage {
    width: 100%;
  }
}

.asset-link-card {
  position: relative;
  min-height: 118px;
  padding: 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(39, 39, 42, 0.9);
  background: linear-gradient(
    180deg,
    rgba(9, 9, 11, 0.94) 0%,
    rgba(24, 24, 27, 0.86) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.asset-link-card:hover {
  border-color: rgba(6, 182, 212, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.08);
}

.asset-link-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 12px;
  height: 12px;
  color: #52525b;
  transition: color 0.2s ease;
}

.asset-link-card:hover .asset-link-icon {
  color: #67e8f9;
}

.ideation-note-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(39, 39, 42, 0.9);
  background: linear-gradient(
    180deg,
    rgba(9, 9, 11, 0.9) 0%,
    rgba(24, 24, 27, 0.74) 100%
  );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.creator-icon-btn {
  width: var(--ui-btn-sm-min-h);
  height: var(--ui-btn-sm-min-h);
  border-radius: var(--ui-btn-sm-radius);
  border: 1px solid rgba(63, 63, 70, 0.75);
  background: rgba(24, 24, 27, 0.82);
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.creator-icon-btn:hover {
  border-color: rgba(6, 182, 212, 0.45);
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.12);
}

.creator-icon-btn.danger:hover {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.08);
}

.ideation-frame-card {
  border-radius: 22px;
  background: linear-gradient(
    180deg,
    rgba(9, 9, 11, 0.98) 0%,
    rgba(24, 24, 27, 0.92) 100%
  );
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.ideation-frame-toolbar {
  backdrop-filter: blur(10px);
}

.ideation-frame-notes {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.ideation-pro-page .canvas-container {
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    #09090b;
  background-size: 160px 160px, 160px 160px, auto;
  border-radius: 0;
}

.ideation-pro-page .canvas-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
  opacity: 0.7;
}

.ideation-pro-page .drop-overlay {
  border-radius: 0 !important;
}

.ideation-pro-page #storyboard-grid {
  background:
    radial-gradient(circle at top, rgba(6, 182, 212, 0.05), transparent 24%),
    linear-gradient(180deg, rgba(9, 9, 11, 0.4), rgba(0, 0, 0, 0));
}

.ideation-pro-page #focus-inline-area .aspect-ratio-16-9,
.ideation-pro-page #focus-inline-area canvas {
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    #09090b !important;
  background-size: 160px 160px, 160px 160px, auto !important;
}

.ideation-pro-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(6, 182, 212, 0.08), transparent 26%),
    #000;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
}

.storyboard-lab-shell {
  min-height: 100vh;
  padding: 18px 18px 120px;
}

.storyboard-lab-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(39, 39, 42, 0.82);
}

.storyboard-lab-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.storyboard-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.45);
  background: rgba(6, 182, 212, 0.12);
  color: #c4f5ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.storyboard-kicker,
.storyboard-mode-title {
  color: #71717a;
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.storyboard-project-title {
  margin-top: 16px;
  width: min(100%, 760px);
  background: transparent;
  border: none;
  outline: none;
  color: #fafafa;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 800;
  line-height: 1.05;
}

.storyboard-mode-block {
  text-align: right;
}

.storyboard-mode-value {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #34d399;
  font-size: 14px;
  font-weight: 700;
}

.storyboard-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 18px rgba(52, 211, 153, 0.45);
}

.storyboard-save-status {
  margin-top: 12px;
  color: #52525b;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.storyboard-toolbar,
.storyboard-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.storyboard-toolbar {
  padding: 18px 0 10px;
}

.storyboard-control-bar {
  padding-bottom: 10px;
}

.storyboard-toolbar-group,
.storyboard-tools-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.storyboard-inline-controls {
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(39, 39, 42, 0.9);
  background: rgba(9, 9, 11, 0.9);
}

.storyboard-control-label {
  color: #71717a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.storyboard-inline-input {
  min-width: 54px;
  width: 54px;
  min-height: 40px;
  padding: 4px;
}

.storyboard-inline-range {
  width: 160px;
  padding: 8px 10px;
}

.storyboard-grid-wrap {
  padding-top: 14px;
}

.storyboard-scene-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  align-items: start;
}

.storyboard-scene-card {
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(63, 63, 70, 0.82);
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.96) 0%, rgba(0, 0, 0, 0.98) 100%);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
  transform: translateY(0);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.storyboard-scene-card:nth-child(3n + 2) {
  margin-top: 6px;
}

.storyboard-scene-card:nth-child(3n) {
  margin-top: 12px;
}

.storyboard-scene-card::before {
  content: '';
  position: absolute;
  inset: 10px 10px -10px 10px;
  border-radius: 22px;
  background: rgba(24, 24, 27, 0.55);
  z-index: -1;
  transform: translateY(14px);
}

.storyboard-scene-card.active {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(6, 182, 212, 0.16),
    0 0 28px rgba(6, 182, 212, 0.12);
}

.storyboard-scene-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.35);
}

.storyboard-scene-card-header {
  min-height: 68px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(39, 39, 42, 0.75);
  display: flex;
  align-items: center;
}

.storyboard-scene-name {
  color: #fafafa;
  font-size: 20px;
  font-weight: 800;
}

.storyboard-scene-stage-wrap {
  position: relative;
  padding: 18px 16px 16px;
}

.storyboard-scene-index {
  position: absolute;
  left: 16px;
  top: 14px;
  color: #00D3E7;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  z-index: 2;
}

.storyboard-scene-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-top: 10px;
  border-radius: 0 0 18px 18px;
  overflow: hidden;
  background: #000;
}

.storyboard-scene-grid-bg,
.storyboard-drawing-layer {
  position: absolute;
  inset: 0;
}

.storyboard-scene-grid-bg {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.6;
  pointer-events: none;
}

.storyboard-drawing-layer {
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.ideation-pro-page .ideation-action-btn {
  justify-content: flex-start;
  text-align: left;
  padding-inline: 16px !important;
  gap: 12px;
}

.ideation-pro-page .ideation-action-btn i {
  flex-shrink: 0;
}

.ideation-pro-page .ideation-action-btn span {
  display: block;
  font-size: 11px;
  line-height: 1.15;
  letter-spacing: 0.04em;
}

@media (max-width: 1200px) {
  .storyboard-scene-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .storyboard-lab-shell {
    padding: 14px 14px 120px;
  }

  .storyboard-lab-header {
    flex-direction: column;
  }

  .storyboard-mode-block {
    text-align: left;
  }

  .storyboard-mode-value {
    justify-content: flex-start;
  }

  .storyboard-scene-stack {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .storyboard-inline-range {
    width: 120px;
  }
}
/* --- Mobile Responsive System --- */
.mobile-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: #00D3E7; /* Matching play button cyan */
  color: white;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-sidebar-toggle:hover {
  background: #00D3E7;
  transform: scale(1.05);
}

@media (max-width: 1024px) {
  .generator-sidebar-toggle {
    bottom: 80px !important; /* Position it above the timeline grid */
  }
}

@media (max-width: 1024px) {
  .mobile-sidebar-toggle-integrated {
    display: flex !important;
  }
  
  #timeline-overlay {
    width: min(90%, 450px) !important;
    bottom: 12px !important;
    right: 50% !important;
    transform: translateX(50%) !important;
    gap: 12px !important;
    padding: 10px !important;
  }
}

@media (max-width: 1024px) {
  .mobile-sidebar-toggle {
    display: flex;
  }

  body.flex {
    flex-direction: column;
    overflow-x: hidden;
  }

  #main-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 900;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 280px;
    background: #000;
  }

  #main-sidebar.sidebar-open {
    transform: translateX(0);
  }

  main, .flex-1.relative.w-full.h-full {
    width: 100% !important;
    max-width: 100vw !important;
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
  }
}

@media (max-width: 640px) {
  #main-sidebar {
    width: 85%;
  }
}

/* --- Design Creator Mobile Fixes --- */
@media (max-width: 1024px) {
  .aplus-editor-layout {
    display: flex;
    flex-direction: column;
  }
  
  #editor-inspector {
    display: none; /* Hide property panel by default on mobile to prioritize canvas */
    border-left: none;
    border-top: 1px solid rgba(63, 63, 70, 0.5);
  }

  .aplus-filmstrip-header .aplus-inspector-copy {
    display: none; /* Hide subtext to save vertical space */
  }

  .aplus-filmstrip-shell {
    padding: 10px 12px;
    height: auto;
    min-height: 100px;
  }

  .editor-stage-shell {
    min-height: 350px; /* Force minimum height for editing space */
  }

  /* Button Text Overflow Fixes */
  .creator-btn, .nav-card-btn, .aplus-premium-export-btn {
    font-size: 10px !important;
    padding-inline: 10px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .creator-btn span, .nav-card-btn span {
    font-size: 10px !important;
  }
}

/* --- Export Preview Mobile Fixes --- */
@media (max-width: 768px) {
  #export-preview-overlay {
    padding: 20px 16px !important;
  }

  #export-preview-overlay > div {
    padding: 0 !important;
  }

  #export-preview-overlay .flex.items-center.justify-between.w-full.mb-8 {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px !important;
  }

  #export-preview-overlay .flex.items-center.gap-3 {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  #export-preview-overlay #preview-format-select {
    flex: 1;
    min-width: 80px;
  }

  #export-preview-overlay .preview-canvas-container {
    margin-bottom: 24px !important;
  }

  #export-preview-overlay #final-preview-img {
    max-height: 50vh !important;
    width: auto;
    object-fit: contain;
  }

  #export-preview-overlay .grid.grid-cols-1.md\:grid-cols-3 {
    gap: 10px !important;
    padding-bottom: 40px !important;
  }

  /* Compact Share Cards for Mobile */
  #export-preview-overlay button.p-6 {
    padding: 16px !important;
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
    gap: 12px !important;
  }

  #export-preview-overlay .w-12.h-12 {
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0 !important;
  }

  #export-preview-overlay .w-12.h-12 i {
    width: 18px !important;
    height: 18px !important;
  }

  #export-preview-overlay h3.text-sm {
    font-size: 12px !important;
    margin: 0 !important;
  }

  #export-preview-overlay p.text-\[9px\] {
    margin: 0 !important;
  }
}
