*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: #2b2d31;
  color: #2d2f33;
  overflow: hidden;
  font-size: 11px;
}

@font-face {
  font-family: "Audio_nugget";
  src: url("../fonts/audio_nugget/AudioNugget.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Hexagothic-Display";
  src: url("../fonts/Hexagothic/Hexagothic-Display.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "KLORY";
  src: url("../fonts/KLORY/KLORY.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pulsewidth";
  src: url("../fonts/pulsewidth/Pulsewidth-1.0.0.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pulsewidth-Dot";
  src: url("../fonts/pulsewidth/Pulsewidth-Dot-1.0.0.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SAIBA-45";
  src: url("../fonts/saiba/Fonts/SAIBA-45.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SAIBA-45-Outline";
  src: url("../fonts/saiba/Fonts/SAIBA-45-Outline.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "jolt";
  src: url("../fonts/jolt/jolt.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tagger-Regular";
  src: url("../fonts/tagger/Tagger-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

button,
input {
  font: inherit;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100%;
}

.canvas-shell {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #1e1f22;
}

.canvas-shell.automatic {
  width: 100%;
  height: 100%;
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.canvas-shell.portrait {
  aspect-ratio: 9 / 16;
  width: auto;
  height: 100%;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
}

.canvas-shell iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
}

.ui-layer {
  position: absolute;
  inset: 0;
  padding: 12px;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
}

.drag-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 28, 31, 0.45);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.v3d-simple-preloader-bar {
  position: relative;
  overflow: visible;
}

.v3d-simple-preloader-bar::before {
  content: "Preparing your premium 3D render";
  position: absolute;
  left: 50%;
  top: -22px;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: #6f4df6;
  letter-spacing: 0.2px;
  white-space: nowrap;
  pointer-events: none;
}

.v3d-simple-preloader-bar::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  transform: translate(50%, -50%) scale(0.6);
  opacity: 0;
  box-shadow:
    10px -6px 0 rgba(255, 255, 255, 0.85),
    16px 4px 0 rgba(255, 255, 255, 0.6),
    8px 8px 0 rgba(255, 255, 255, 0.7),
    18px -2px 0 rgba(255, 255, 255, 0.5);
  animation: preloader-sparkle 1.1s ease-in-out infinite;
  pointer-events: none;
}

@keyframes preloader-sparkle {
  0% {
    opacity: 0;
    transform: translate(50%, -50%) scale(0.6);
  }
  35% {
    opacity: 1;
    transform: translate(50%, -50%) scale(1);
  }
  70% {
    opacity: 0.2;
    transform: translate(50%, -50%) scale(0.7);
  }
  100% {
    opacity: 0;
    transform: translate(50%, -50%) scale(0.6);
  }
}

@media (max-width: 768px) {
  .panel {
    width: min(140px, 100%);
    padding: 8px;
    gap: 2px;
    margin-top: 72px;
  }

  .fab-button {
    padding: 8px 12px;
    gap: 8px;
    font-size: 11px;
    height: 48px;
    min-width: 120px;
  }

  .fab-icon {
    width: 27px;
    height: 27px;
    border-radius: 10px;
  }

  .materials-fab {
    bottom: 10px;
    right: 10px;
  }

  .animations-fab {
    bottom: 10px;
    right: 142px;
  }

  .materials-panel {
    top: auto !important;
    bottom: 10px !important;
    width: min(230px, calc(100% - 20px)) !important;
    height: min(480px, calc(100vh - 120px)) !important;
  }

  .materials-tabs {
    grid-template-columns: 1fr;
  }

  .animations-panel {
    top: auto !important;
    right: 10px !important;
    left: auto !important;
    margin: 0 !important;
    bottom: 10px !important;
    width: min(230px, calc(100% - 20px)) !important;
    height: min(520px, calc(100vh - 140px)) !important;
    overflow: hidden;
    transform: translateX(120%) !important;
  }

  .animations-panel.is-open {
    transform: translateX(0) !important;
  }

  .animations-panel .animations-panel-inner {
    max-height: 100%;
    overflow-y: auto;
  }

  .animations-grid {
    grid-template-columns: 1fr !important;
  }

  .animation-card {
    height: 88px;
  }

  .upload-panel-open.fab-button {
    min-width: 220px;
    padding: 4px 14px;
    font-size: 12px;
    border-width: 6px;
  }

  .upload-panel-open .upload-panel-open-icon {
    width: 18px;
    height: 18px;
  }

  .upload-panel-close {
    width: 30px;
    height: 30px;
  }

  .upload-panel-close img {
    width: 12px;
    height: 12px;
  }

  .tip-popup {
    max-width: min(300px, calc(100% - 20px));
  }

  .tip-popup-inner {
    padding: 10px 12px;
  }

  .tip-popup-text {
    font-size: 11px;
  }

  .tip-popup-image {
    width: 56px;
    height: 56px;
  }

  .upload-panel-shell {
    width: min(220px, 100%);
    display: inline-block;
  }

  .panel-upload {
    width: 100%;
  }

  .panel.panel-upload {
    width: min(220px, 100%);
  }

  .panel-hidden {
    position: fixed;
    left: 15px;
    top: 110px;
    width: min(220px, 100%);
    z-index: 7;
    margin: 0;
  }

  .panel-hidden .tile-row {
    display: none;
  }

  .panel-hidden .toggle-row {
    display: none;
  }

  .panel-hidden .export-section:not(:last-child) {
    display: none;
  }

  .panel-upload .upload-icon,
  .panel-upload .upload-copy {
    display: none;
  }

  .panel-upload .upload-drop {
    padding: 0;
    min-height: auto;
    gap: 0;
    border: none;
  }

  .panel-upload .upload-drop .btn-attention {
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
  }

  .panel-upload .upload-image-section {
    gap: 0;
  }

  .panel-upload .button-row {
    margin-top: 4px;
  }

  .panel-upload .input-toggle {
    margin-bottom: 2px;
  }

  .panel-upload .control-group {
    margin: 0;
    padding: 0;
    gap: 1px;
  }

  .panel-upload .control-group + .control-group {
    margin-top: 0;
  }

  .panel-upload .control-group label {
    margin: 0;
  }

  .panel-upload .range-row {
    gap: 4px;
  }

  .panel-upload .color-row {
    gap: 4px;
  }

  .panel-upload .range-value,
  .panel-upload .color-hex {
    display: none;
  }

  .panel-upload .button-row {
    gap: 6px;
  }

  .panel-upload .rotation-control {
    padding: 0;
    margin: 0;
    gap: 2px;
    width: 100%;
  }

  .panel-upload .rotation-control.is-active {
    padding: 0;
    background: transparent;
  }

  .panel-upload .rotation-control .btn {
    width: 100%;
  }

  .panel-upload .rotation-speed-panel {
    margin-top: 4px;
    gap: 4px;
  }

  .upload-panel-close {
    right: auto;
    left: 50%;
    top: 100%;
    margin-left: 40px;
    margin-top: 55px;
    transform: translate(-50%, 0);
    width: 50px;
    height: 50px;
    padding: 15px;
  }

  .toggle-badge {
    display: none;
  }
}

.drag-overlay.is-active {
  opacity: 1;
  pointer-events: none;
}

.drag-overlay-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 24px 48px rgba(12, 13, 16, 0.2);
  text-align: center;
}

.drag-overlay-icon {
  color: #3b3342;
}

.drag-overlay-title {
  font-size: 13px;
  font-weight: 600;
  color: #2d2f33;
}

.drag-overlay-subtitle {
  font-size: 11px;
  color: #8a8e96;
}

.panel {
  background: #ffffff;
  border-radius: 20px;
  padding: 15px;
  box-shadow: 0 20px 40px rgba(12, 13, 16, 0.25);
  display: flex;
  flex-direction: column;
  gap: 26px;
  pointer-events: auto;
  width: min(320px, 100%);
  font-size: 12px;
  margin-top: 96px;
  max-height: calc(100vh - 140px);
  overflow: auto;
  transform: translateX(-120%);
  animation: panel-slide-in 1.82s cubic-bezier(0.12, 0.9, 0.1, 1) forwards;
}

.upload-panel-shell {
  position: relative;
  width: min(320px, 100%);
  pointer-events: none;
}

.panel-upload {
  position: relative;
  transition: transform 1.82s cubic-bezier(0.12, 0.9, 0.1, 1);
  z-index: 2;
  animation: none;
  transform: translateX(-120%);
  pointer-events: none;
}

.panel-upload.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.upload-panel-close {
  position: absolute;
  right: -43px;
  top: 50%;
  transform: translate(12px, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #d9d9de;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(12, 13, 16, 0.18);
  z-index: 3;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 1.82s cubic-bezier(0.12, 0.9, 0.1, 1) 0.2s,
    transform 1.82s cubic-bezier(0.12, 0.9, 0.1, 1) 0.2s;
}

.upload-panel-close img {
  width: 14px;
  height: 14px;
  transform: rotate(0deg);
  filter: brightness(0);
}

.upload-panel-close.is-hidden {
  opacity: 0;
  transform: translateY(-50%) scale(0.9);
  pointer-events: none;
}

.panel-upload.is-open + .upload-panel-close {
  opacity: 1;
  transform: translate(0, -50%);
}

.panel-upload:not(.is-open) + .upload-panel-close {
  transition-delay: 0s;
}

.upload-panel-open.fab-button {
  position: fixed;
  left: 15px;
  top: 120px;
  background: #2d2f33;
  color: #ffffff;
  border: 8px solid #ffffff;
  border-radius: 2000px;
  padding: 4px 18px;
  gap: 12px;
  text-decoration: none;
  z-index: 6;
  pointer-events: none;
  min-width: 260px;
  font-weight: 700;
  transition: transform 1.82s cubic-bezier(0.12, 0.9, 0.1, 1),
    opacity 1.82s cubic-bezier(0.12, 0.9, 0.1, 1);
  transform: translateX(-120%);
  opacity: 0;
}

.upload-panel-open.fab-button.is-visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.upload-panel-open .upload-panel-open-icon {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.materials-fab {
  position: fixed;
  right: 14px;
  bottom: 14px;
  pointer-events: auto;
  transform: translateX(120%);
  animation: materials-fab-in 1.82s cubic-bezier(0.12, 0.9, 0.1, 1) forwards;
}

.animations-fab {
  position: fixed;
  right: 14px;
  bottom: 94px;
  pointer-events: auto;
  transform: translateX(120%);
  animation: materials-fab-in 1.82s cubic-bezier(0.12, 0.9, 0.1, 1) forwards;
  z-index: 4;
}

@keyframes materials-fab-in {
  from {
    transform: translateX(120%);
  }
  to {
    transform: translateX(0);
  }
}

.tip-info-button {
  position: fixed;
  left: 14px;
  bottom: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #d9d9de;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(12, 13, 16, 0.18);
  cursor: pointer;
  z-index: 6;
}

.tip-info-button img {
  width: 18px;
  height: 18px;
  display: block;
}

.tip-popup {
  position: fixed;
  left: 14px;
  bottom: 14px;
  max-width: min(460px, calc(100% - 28px));
  z-index: 6;
  transform: translateX(-120%);
  transition: transform 1.82s cubic-bezier(0.12, 0.9, 0.1, 1);
}

.tip-popup.is-open {
  transform: translateX(0);
}

.pro-popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 10, 12, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 10;
}

.pro-popup.is-open {
  opacity: 1;
  pointer-events: auto;
}

.pro-popup-card {
  position: relative;
  width: min(640px, 100%);
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 28px 60px rgba(12, 13, 16, 0.32);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
}

.pro-popup-video {
  position: relative;
  background: #111216;
}

.pro-popup-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pro-popup-tag {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 700;
  color: #2d2f33;
}

.pro-popup-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pro-popup-content h3 {
  margin: 0;
  font-size: 20px;
  color: #1d1e22;
}

.pro-popup-line {
  display: block;
}

.pro-popup-content p {
  margin: 0;
  color: #5b5f66;
  line-height: 1.5;
}

.pro-popup-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.pro-popup-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  background: #6f4df6;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(111, 77, 246, 0.35);
}

.pro-popup-cta:hover {
  background: #5a3fe0;
}

.pro-popup-secondary {
  border: none;
  background: transparent;
  color: #7c7f86;
  font-weight: 600;
  cursor: pointer;
}

.pro-popup-trust {
  font-size: 11px;
  color: #8a8e96;
}

.pro-popup-close {
  position: absolute;
  right: 20px;
  top: 20px;
  z-index: 2;
}

@media (max-width: 768px) {
  .materials-panel {
    top: auto !important;
    bottom: 10px !important;
    width: min(230px, calc(100% - 20px)) !important;
    height: min(420px, calc(100vh - 120px)) !important;
  }

  .materials-panel .materials-tabs {
    grid-template-columns: 1fr !important;
  }

  .materials-panel .materials-advanced-row {
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
    row-gap: 6px;
  }

  .materials-panel .materials-advanced-upload {
    width: fit-content !important;
    grid-column: 1 / -1;
    justify-self: start;
  }

  .materials-panel .materials-advanced-info {
    margin-top: 0 !important;
    justify-self: end;
    align-self: start;
    display: none !important;
  }
}

@media (max-width: 720px) {
  .pro-popup-card {
    grid-template-columns: 1fr;
  }

  .pro-popup-video {
    height: 200px;
  }
}

.tip-popup-inner {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 12px 14px;
  box-shadow: 0 24px 48px rgba(12, 13, 16, 0.22);
  display: flex;
  align-items: center;
  gap: 10px;
}

.tip-popup-close {
  position: static;
}

.tip-popup-media {
  background: #ededed;
  border-radius: 12px;
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tip-popup-image {
  width: 70px;
  height: 70px;
  border-radius: 0;
  object-fit: cover;
  display: block;
}

.tip-popup-text {
  font-size: 12px;
  color: #2d2f33;
  max-width: 260px;
  line-height: 1.4;
}

.tip-popup-label {
  font-weight: 600;
  margin-right: 4px;
}

.fab-button {
  border: none;
  border-radius: 20px;
  padding: 14px 18px;
  background: #ffffff;
  color: #2d2f33;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 16px 32px rgba(12, 13, 16, 0.18);
  cursor: pointer;
  height: 72px;
  box-sizing: border-box;
  min-width: 178px;
  justify-content: space-between;
}

.fab-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  object-fit: cover;
}

.animations-fab .fab-icon {
  transition: transform 0.25s ease-in-out;
}

.animations-fab .fab-button:hover .fab-icon {
  transform: rotate(-8deg);
}

.materials-fab .fab-icon {
  transition: transform 0.25s ease-in-out;
}

.materials-fab .fab-button:hover .fab-icon {
  transform: scale(1.06);
}

.materials-panel {
  position: fixed;
  top: 120px;
  right: 14px;
  width: min(300px, calc(100% - 28px));
  height: min(600px, calc(100vh - 140px));
  max-height: calc(100vh - 140px);
  overflow: hidden;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(12, 13, 16, 0.2);
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 1.82s cubic-bezier(0.12, 0.9, 0.1, 1), opacity 1.82s cubic-bezier(0.12, 0.9, 0.1, 1);
  z-index: 5;
}

.animations-panel {
  position: fixed;
  left: 50%;
  bottom: 20px;
  width: min(720px, calc(100% - 28px));
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(12, 13, 16, 0.2);
  pointer-events: auto;
  overflow: hidden;
  transform: translate(-50%, 120%);
  opacity: 0;
  transition: transform 1.82s cubic-bezier(0.12, 0.9, 0.1, 1), opacity 1.82s cubic-bezier(0.12, 0.9, 0.1, 1);
  z-index: 5;
}

.animations-panel.is-open {
  transform: translate(-50%, 0);
  opacity: 1;
}

.animations-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 15px 15px;
}

.animations-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 400;
  color: #2d2f33;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #ffffff;
  padding: 12px 15px;
  margin: 0 -15px;
}

.animations-panel-header h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
}

.animations-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #d9d9de;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.animations-close img {
  width: 11px;
  height: 11px;
  filter: brightness(0);
  transition: filter 0.18s ease;
}

.animations-close:hover {
  background: #2d2f33;
  border-color: #2d2f33;
}

.animations-close:hover img {
  filter: brightness(0) invert(1);
}

.animations-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 12px;
}

.animation-card {
  border: none;
  border-radius: 16px;
  padding: 10px;
  height: 110px;
  background: #1f1f22;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

.animation-card.is-active {
  border: 2px solid #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.animation-card video {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  display: block;
  aspect-ratio: 1 / 1;
}

.animation-card-none {
  background: #e6e6e6;
  color: #6b6b6b;
  font-size: 13px;
  font-weight: 600;
}

.materials-panel.is-open {
  transform: translateX(0);
  opacity: 1;
}

.materials-panel-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: inherit;
  padding: 15px;
  gap: 10px;
}

.materials-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 400;
  color: #2d2f33;
}

.materials-panel-header h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
}

.materials-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #d9d9de;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.materials-close img {
  width: 11px;
  height: 11px;
  filter: brightness(0);
  transition: filter 0.18s ease;
}

.materials-close:hover {
  background: #2d2f33;
  border-color: #2d2f33;
}

.materials-close:hover img {
  filter: brightness(0) invert(1);
}

.materials-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 6px 0;
}

.materials-tab {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  background: #ebebeb;
  color: #2d2f33;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.materials-tab img {
  width: 18px;
  height: 18px;
  filter: brightness(0);
  transition: filter 0.18s ease;
}

.materials-tab:hover {
  background: #2d2f33;
  color: #ffffff;
  border-color: #2d2f33;
}

.materials-tab:hover img {
  filter: brightness(0) invert(1);
}

.materials-tab.is-active {
  background: #3b3342;
  color: #ffffff;
}

.materials-tab.is-active img {
  filter: brightness(0) invert(1);
}

.materials-scroll {
  flex: 1;
  background: #f1f1f1;
  border-radius: 20px;
  padding: 10px;
  overflow: auto;
  max-height: none;
}

.materials-presets,
.materials-custom {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.materials-custom .control-group {
  gap: 10px;
}

.materials-custom > .control-group:first-child {
  margin-top: 6px;
}

.materials-advanced {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  margin-top: 6px;
  border-top: 1px solid #e0e0e0;
}

.materials-advanced-header {
  font-size: 13px;
  font-weight: 600;
  color: #2d2f33;
  padding-left: 10px;
}

.materials-advanced-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 8px;
}

.materials-advanced-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
}

.materials-advanced-label {
  font-size: 12px;
  color: #2d2f33;
}

.materials-advanced-upload {
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  background: #e6e6e6;
  color: #2d2f33;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.materials-advanced-info {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: transparent;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.materials-advanced-info img {
  width: 20px;
  height: 20px;
  display: block;
}

.materials-custom-section h4 {
  margin: 0 0 12px;
  padding-left: 10px;
  font-size: 12px;
  font-weight: 400;
  color: #2d2f33;
}

.materials-texture-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.materials-texture-card {
  border: none;
  background: #ffffff;
  border-radius: 18px;
  padding: 0;
  aspect-ratio: 1 / 1;
  box-shadow: inset 0 0 0 1px rgba(59, 51, 66, 0.1);
  cursor: pointer;
  overflow: hidden;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.materials-texture-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 14px;
}

.materials-texture-card.is-empty {
  background: #ffffff;
}

.materials-section + .materials-section {
  margin-top: 22px;
}

.materials-section h4 {
  margin: 0 0 14px;
  padding-left: 10px;
  font-size: 12px;
  font-weight: 400;
  color: #2d2f33;
}

.materials-presets > .materials-section:first-child h4 {
  margin-top: 6px;
}

.materials-section h4 span {
  font-weight: 700;
  color: #38306c;
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.materials-card {
  border: none;
  background: #ffffff;
  border-radius: 18px;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(59, 51, 66, 0.1);
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.materials-card img {
  width: 100%;
  display: block;
  border-radius: 14px;
  object-fit: cover;
  transition: filter 0.18s ease;
}

.materials-card:hover {
  background: #2d2f33;
  box-shadow: inset 0 0 0 1px rgba(59, 51, 66, 0.18);
}

.materials-card:hover img {
  filter: brightness(0.85) contrast(1.05);
}

.input-toggle {
  display: flex;
  order: 0;
  margin: -15px -15px 0;
  padding: 0;
  background: #f4f4f6;
  border-bottom: 1px solid #e6e7ec;
  border-radius: 20px 20px 0 0;
}

.toggle-btn {
  flex: 1;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 0;
  padding: 14px 12px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  color: #8b8f99;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  gap: 6px;
}

.toggle-badge {
  padding: 2px 7px;
  border-radius: 999px;
  background: #753ff5;
  color: #ffffff;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.toggle-btn.is-active {
  background: #ffffff;
  color: #3b3342;
  border-color: #e6e7ec;
}

.toggle-btn:first-child {
  border-top-left-radius: 20px;
}

.toggle-btn:last-child {
  border-top-right-radius: 20px;
}

.toggle-btn:hover {
  color: #5a5d66;
}

.upload-image-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  order: 1;
}

.text-input-section {
  display: none;
  flex-direction: column;
  gap: 10px;
  order: 1;
}

.text-input-box {
  border: 1px dashed rgba(59, 51, 66, 0.4);
  border-radius: 20px;
  padding: 16px 14px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  text-align: center;
  --text-field-width: 260px;
}

.text-input-label {
  font-weight: 400;
  font-size: 12px;
  color: #2d2f33;
}

.text-input {
  border: 1px solid #d4d6db;
  border-radius: 999px;
  height: 38px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  color: #2d2f33;
  background: #ffffff;
  text-align: center;
  width: min(var(--text-field-width), 100%);
  line-height: 38px;
  box-shadow: inset 0 1px 2px rgba(16, 17, 20, 0.08);
}

.text-font-select {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.text-font-dropdown {
  width: min(var(--text-field-width), 100%);
  border: 1px solid #d4d6db;
  border-radius: 999px;
  height: 38px;
  padding: 0 38px 0 18px;
  font-size: 13px;
  font-weight: 400;
  line-height: 38px;
  background: #ffffff;
  color: #2d2f33;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%235a5d66' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.text-font-dropdown.is-hidden {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  height: 0;
  width: 0;
}

.font-picker {
  position: relative;
  width: min(var(--text-field-width), 100%);
}

.font-picker-toggle {
  width: 100%;
  border: 1px solid #d4d6db;
  border-radius: 999px;
  height: 38px;
  padding: 0 38px 0 18px;
  font-size: 13px;
  font-weight: 400;
  line-height: 38px;
  background: #ffffff;
  color: #2d2f33;
  cursor: pointer;
  text-align: left;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%235a5d66' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.font-picker-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow: auto;
  border: 1px solid #d4d6db;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(18, 19, 23, 0.12);
  padding: 6px;
  display: none;
  z-index: 5;
}

.font-picker.is-open .font-picker-list {
  display: block;
}

.font-picker-option {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #2d2f33;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.font-picker-option:hover,
.font-picker-option.is-selected {
  background: #f2f3f7;
}

.font-upload-input {
  display: none;
}

.font-picker-upload {
  border-top: 1px dashed rgba(59, 51, 66, 0.2);
  margin-top: 6px;
  padding-top: 8px;
}

.font-picker-upload-button {
  width: 100%;
  border: 1px solid #d4d6db;
  border-radius: 10px;
  background: #f7f8fa;
  color: #2d2f33;
  font-size: 11px;
  font-weight: 500;
  padding: 8px 12px;
  cursor: pointer;
}

.font-picker-upload-button:hover {
  background: #eceef2;
}

.font-random-button {
  width: min(var(--text-field-width), 100%);
  border: 1px solid #d4d6db;
  border-radius: 999px;
  background: #f7f8fa;
  color: #2d2f33;
  font-size: 11px;
  font-weight: 500;
  padding: 8px 12px;
  cursor: pointer;
}

.font-random-button:hover {
  background: #eceef2;
}

.advanced-options {
  width: 100%;
  border-top: 1px dashed rgba(59, 51, 66, 0.25);
  padding-top: 10px;
  margin-top: 8px;
}

.advanced-options summary {
  list-style: none;
  cursor: pointer;
  font-size: 11px;
  font-weight: 400;
  color: #5a5d66;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.advanced-options summary::-webkit-details-marker {
  display: none;
}

.advanced-options summary::after {
  content: "▾";
  font-size: 11px;
  transform: translateY(-1px);
}

.advanced-options[open] summary::after {
  content: "▴";
}

.advanced-options .text-font-select {
  margin-top: 16px;
}

.advanced-options .text-kerning-group {
  margin-top: 18px;
}

.text-kerning-group {
  width: 100%;
}

.advanced-options .text-kerning-group {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.text-kerning-group label {
  margin: 0;
}

.kerning-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #d4d6db;
  border-radius: 999px;
  background: #ffffff;
}

.kerning-button {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: #f0f0f3;
  color: #2d2f33;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kerning-button:hover {
  background: #e2e3e7;
}

.kerning-value {
  min-width: 24px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #2d2f33;
}

.text-input::placeholder {
  color: #8a8e96;
  font-weight: 500;
}

.text-input:focus {
  outline: none;
}


.mode-text .upload-image-section {
  display: none;
}

.mode-text .text-input-section {
  display: flex;
}

.panel-upload .control-group {
  order: 2;
}

.panel-upload .button-row {
  order: 3;
}

.rotation-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 15px;
  margin: 0 -15px;
}

.rotation-control.is-active {
  padding: 8px 15px;
  background: rgba(45, 47, 51, 0.04);
}

.rotation-speed-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.rotation-speed-panel label {
  padding-left: 10px;
  color: #6f737c;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #2d2f33;
}

@keyframes panel-slide-in {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(0);
  }
}

.panel-header h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f0f0f3;
  color: #8c8e93;
  cursor: pointer;
}

.upload-drop {
  border: 1px dashed rgba(59, 51, 66, 0.4);
  border-radius: 20px;
  padding: 36px 18px;
  min-height: 230px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: #8a8e96;
}

.upload-drop .btn-attention {
  min-width: 160px;
}

.upload-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  color: #9fa2a9;
}

.upload-copy {
  margin: 0;
  font-size: 12px;
  color: #9fa2a9;
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
}

.upload-copy-strong {
  font-weight: 600;
  color: inherit;
}

.upload-copy-soft {
  font-weight: 400;
  color: inherit;
}

.icon-svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

.icon-svg-lg {
  width: 52px;
  height: 52px;
  stroke-width: 2.8;
}


.control-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 12px;
  color: #2d2f33;
}

.control-group label {
  font-weight: 400;
  letter-spacing: 0;
}

.materials-custom .control-group label {
  padding-left: 10px;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.range-slider {
  flex: 1;
  accent-color: #3b3342;
  -webkit-appearance: none;
  appearance: none;
  --thumb-size: 24px;
  height: 24px;
  border-radius: 999px;
  --range-progress: 0%;
  --range-fill: 0px;
  background-color: #e6e6e6;
  background-image: linear-gradient(90deg, rgba(59, 51, 66, 0.4), rgba(59, 51, 66, 0.4));
  background-size: var(--range-fill) 100%;
  background-repeat: no-repeat;
  outline: none;
  cursor: pointer;
}

.range-slider:hover {
  background-color: #dedede;
}

.range-slider::-webkit-slider-runnable-track {
  height: 24px;
  border-radius: 999px;
  background: transparent;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3b3342;
  border: none;
  box-shadow: 0 10px 14px -8px rgba(59, 51, 66, 0.35);
  margin-top: 0;
  cursor: pointer;
}

.range-slider::-moz-range-track {
  height: 24px;
  border-radius: 999px;
  background: #e6e6e6;
}

.range-slider::-moz-range-progress {
  height: 24px;
  border-radius: 999px;
  background: rgba(59, 51, 66, 0.4);
}

.range-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3b3342;
  border: none;
  box-shadow: 0 10px 14px -8px rgba(59, 51, 66, 0.35);
  cursor: pointer;
}

.range-value {
  min-width: 32px;
  text-align: right;
  font-weight: 600;
  color: #9fa2a9;
  font-size: 11px;
  cursor: pointer;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-input {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(59, 51, 66, 0.12);
  transition: box-shadow 0.2s ease;
}

.color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-input::-webkit-color-swatch {
  border: 2px solid #f4f4f6;
  border-radius: 50%;
}

.color-input::-moz-color-swatch {
  border: 2px solid #f4f4f6;
  border-radius: 50%;
}

.color-input:hover {
  box-shadow: 0 10px 18px rgba(59, 51, 66, 0.2);
}

.color-hex {
  font-size: 11px;
  color: #b3b6bf;
  letter-spacing: 0.02em;
}

.color-value {
  font-weight: 600;
  color: #7e828b;
  font-size: 11px;
}

.button-row {
  display: flex;
  gap: 12px;
}

.button-row-stack {
  flex-direction: column;
  gap: 16px;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-dark {
  background: #3b3342;
  color: #ffffff;
}

.btn-muted {
  background: #a6a6a6;
  color: #ffffff;
}

.btn-dark:hover {
  background: #2f2835;
}

.btn-muted:hover {
  background: #8f8f8f;
}

.btn-wide {
  width: 100%;
}

.btn-center {
  justify-content: center;
}

.btn-icon-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #6f4df6;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  border: 2px solid #ffffff;
  margin-right: 4px;
}

.pro-badge-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  margin-right: 0;
  z-index: 1;
}

.btn-attention {
  position: relative;
  overflow: hidden;
  --breathe-duration: 2.6s;
  animation: button-breathe var(--breathe-duration) ease-in-out infinite;
}

.btn-attention::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.22) 45%,
    rgba(255, 255, 255, 0) 80%
  );
  opacity: 0.35;
  animation: button-highlight var(--breathe-duration) ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}

.btn-attention > span,
.btn-attention > svg {
  position: relative;
  z-index: 1;
}

.btn-attention.is-stopped {
  animation: none;
}

.btn-attention.is-stopped::after {
  animation: none;
  opacity: 0;
}

@keyframes button-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

@keyframes button-highlight {
  0%,
  100% {
    transform: translateX(-18%);
  }
  50% {
    transform: translateX(18%);
  }
}

.btn.is-rotating .icon-btn-inline {
  animation: icon-spin 2.2s linear infinite;
  transform-origin: 50% 50%;
}

@keyframes icon-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.icon-btn-inline {
  width: 24px;
  height: 24px;
}

.is-hidden {
  display: none;
}

.tile,
.toggle,
.export-btn,
.anim-card {
  border: none;
}

.tile-row,
.toggle-row,
.stack-buttons,
.animation-row {
  display: none;
}

.panel-hidden .tile-row,
.panel-hidden .toggle-row,
.panel-hidden .stack-buttons,
.panel-hidden .animation-row {
  display: flex;
}

.panel-hidden {
  margin-left: 10px;
  margin-right: 0;
  width: min(280px, 100%);
}

.panel-hidden {
  gap: 16px;
}

.export-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.export-section-title {
  margin: 0;
  padding-left: 10px;
  font-size: 12px;
  font-weight: 400;
  color: #2d2f33;
}

.panel-hidden .tile-row,
.panel-hidden .toggle-row {
  gap: 12px;
}

.panel-hidden .stack-buttons {
  flex-direction: column;
  gap: 10px;
}

.panel-hidden .animation-row {
  flex-wrap: wrap;
  gap: 8px;
}

.tile,
.toggle,
.anim-card {
  flex: 1;
  border-radius: 18px;
  padding: 16px 12px;
  background: #b8b8bb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.tile.is-active,
.toggle.is-active,
.anim-card.is-active {
  background: #5a5a5c;
}

.export-btn {
  border-radius: 999px;
  padding: 12px 16px;
  background: #9b9b9e;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.export-btn.export-dark {
  background: #3b3342;
  color: #ffffff;
}

.panel-hidden .toggle-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.panel-hidden .toggle {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #2d2f33;
  font-weight: 500;
  border-radius: 999px;
  padding: 0 10px 0 72px;
  position: relative;
  min-height: 40px;
  display: block;
  box-sizing: border-box;
  line-height: 1.2;
}

.panel-hidden .toggle-label {
  display: block;
  text-align: left;
}

.panel-hidden .toggle.is-active {
  color: #2d2f33;
}

.panel-hidden .toggle::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 48px;
  height: 26px;
  border-radius: 13px;
  background: #e0e0e3;
  transform: translateY(-50%);
}

.panel-hidden .toggle::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(12, 13, 16, 0.2);
  transform: translateY(-50%);
  transition: left 0.2s ease, background 0.2s ease;
}

.panel-hidden .toggle.is-active::before {
  background: #4b4bc1;
}

.panel-hidden .toggle.is-active::after {
  left: 32px;
}

.export-size-icon {
  width: 58px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.export-size-portrait {
  width: 30px;
  height: 56px;
}

#Option-1,
#Option-2 {
  display: none;
}

@media (max-width: 720px) {
  .ui-layer {
    padding: 8px;
  }
}
