/* ==============================
   RESET
================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  background: #0b0b0d;
  color: #ffffff;

  -webkit-font-smoothing: antialiased;
}

button,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
}


/* ==============================
   HOME
================================ */

.landing-page {
  min-height: 100vh;

  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(112, 70, 255, 0.13),
      transparent 34%
    ),
    #0b0b0d;

  padding-bottom: 70px;
}


/* HEADER */

.site-header {
  width: min(1180px, calc(100% - 36px));

  margin: 0 auto;

  padding: 24px 0 10px;
}

.brand {
  display: flex;
  align-items: center;

  gap: 11px;
}

.brand-mark {
  width: 42px;
  height: 42px;

  border-radius: 13px;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    linear-gradient(
      135deg,
      #7c5cff,
      #4f8cff
    );

  color: #ffffff;

  font-size: 20px;
  font-weight: 900;

  box-shadow:
    0 8px 25px
    rgba(104, 80, 255, 0.25);
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-copy strong {
  font-size: 17px;
}

.brand-copy span {
  margin-top: 2px;

  color: #85858d;

  font-size: 11px;
}


/* HERO */

.hero-section {
  width: min(880px, calc(100% - 36px));

  margin: 55px auto 64px;

  text-align: center;
}

.hero-badge {
  width: fit-content;

  margin: 0 auto 17px;

  padding: 7px 12px;

  border:
    1px solid
    rgba(129, 102, 255, 0.3);

  border-radius: 999px;

  background:
    rgba(111, 82, 255, 0.08);

  color: #a99aff;

  font-size: 12px;
  font-weight: 700;
}

.hero-section h1 {
  max-width: 780px;

  margin: auto;

  font-size:
    clamp(
      38px,
      7vw,
      72px
    );

  line-height: 0.98;

  letter-spacing: -0.04em;

  font-weight: 900;
}

.hero-section h1 span {
  display: block;

  margin-top: 8px;

  color: #8d78ff;
}

.hero-section p {
  max-width: 520px;

  margin: 22px auto 0;

  color: #9a9aa3;

  font-size: 16px;
  line-height: 1.55;
}


/* HOME SECTIONS */

.template-section,
.how-it-works {
  width: min(1180px, calc(100% - 36px));

  margin-left: auto;
  margin-right: auto;
}

.section-heading {
  margin-bottom: 22px;

  display: flex;
  align-items: end;
  justify-content: space-between;

  gap: 30px;
}

.section-kicker {
  display: block;

  margin-bottom: 5px;

  color: #8170ff;

  font-size: 11px;
  font-weight: 800;

  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.section-heading h2 {
  font-size: 27px;

  letter-spacing: -0.025em;
}

.section-heading > p {
  max-width: 360px;

  color: #7f7f88;

  font-size: 13px;
  line-height: 1.5;
}


/* TEMPLATE GRID */

.template-grid {
  display: grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(280px, 1fr)
    );

  gap: 20px;
}

.new-template-card {
  max-width: 470px;

  overflow: hidden;

  border: 1px solid #29292f;

  border-radius: 24px;

  background: #141416;

  box-shadow:
    0 20px 60px
    rgba(0, 0, 0, 0.25);
}

.template-visual {
  min-height: 440px;

  padding: 38px 25px;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    radial-gradient(
      circle at center,
      #18181c,
      #0d0d0f 70%
    );
}


/* TEMPLATE PHONE */

.template-phone {
  position: relative;

  width: 180px;

  aspect-ratio: 9 / 16;

  overflow: hidden;

  border-radius: 15px;

  background: #000000;

  box-shadow:
    0 20px 40px
    rgba(0, 0, 0, 0.5);
}

.template-hook {
  position: absolute;

  top: 18%;
  left: 0;

  width: 100%;

  padding: 13px 9px;

  text-align: center;

  background: #ffffff;
  color: #000000;

  font-size: 12px;
  font-weight: 800;

  line-height: 1.25;
}

.template-image {
  position: absolute;

  top: 38%;
  left: 0;

  width: 100%;

  aspect-ratio: 1 / 1;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    linear-gradient(
      145deg,
      #242429,
      #111114
    );
}

.template-image span {
  color: #696971;

  font-size: 11px;
  font-weight: 700;
}

.template-play {
  position: absolute;

  left: 50%;
  top: 57%;

  transform:
    translate(-50%, -50%);

  width: 52px;
  height: 52px;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  padding-left: 3px;

  background:
    rgba(255, 255, 255, 0.94);

  color: #000;

  font-size: 17px;
}


/* TEMPLATE CONTENT */

.template-content {
  padding: 22px;
}

.template-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 10px;
}

.template-number {
  color: #8170ff;

  font-size: 11px;
  font-weight: 800;

  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.template-duration {
  padding: 5px 8px;

  border-radius: 999px;

  background: #202024;

  color: #92929a;

  font-size: 10px;
}

.template-content h3 {
  margin-bottom: 7px;

  font-size: 23px;

  letter-spacing: -0.025em;
}

.template-content > p {
  color: #888891;

  font-size: 13px;

  line-height: 1.5;
}

.template-features {
  margin: 18px 0;

  display: flex;
  flex-wrap: wrap;

  gap: 7px;
}

.template-features span {
  padding: 7px 9px;

  border: 1px solid #303036;

  border-radius: 8px;

  color: #a5a5ac;

  font-size: 10px;
}

.use-template-btn {
  width: 100%;
  min-height: 48px;

  padding: 0 16px;

  border: 0;
  border-radius: 13px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background:
    linear-gradient(
      135deg,
      #765cff,
      #527cff
    );

  color: #ffffff;

  font-size: 14px;
  font-weight: 800;

  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}

.use-template-btn:active {
  transform: scale(0.98);
}

.use-template-btn span {
  font-size: 20px;
}


/* HOW IT WORKS */

.how-it-works {
  margin-top: 75px;
}

.steps-grid {
  display: grid;

  grid-template-columns:
    repeat(3, 1fr);

  gap: 14px;
}

.step-card {
  min-height: 160px;

  padding: 20px;

  border: 1px solid #27272c;

  border-radius: 18px;

  background: #131315;
}

.step-card > span {
  display: block;

  margin-bottom: 27px;

  color: #6f5cff;

  font-size: 11px;
  font-weight: 800;
}

.step-card strong {
  display: block;

  margin-bottom: 7px;

  font-size: 17px;
}

.step-card p {
  color: #7f7f87;

  font-size: 12px;
  line-height: 1.5;
}


/* ==============================
   EDITOR
================================ */

.compact-editor {
  min-height: 100dvh;

  padding: 14px 16px 22px;

  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(118, 92, 255, 0.17),
      transparent 36%
    ),
    #0b0b0d;

  color: #ffffff;
}


/* EDITOR TOP */

.compact-topbar {
  width: 100%;
  max-width: 440px;

  margin: 0 auto 12px;

  display: flex;
  align-items: center;

  gap: 10px;
}

.compact-back {
  width: 42px;
  height: 42px;

  flex: 0 0 42px;

  border: 1px solid #29292f;

  border-radius: 13px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #151517;
  color: #ffffff;

  font-size: 20px;
}

.compact-title {
  min-width: 0;

  flex: 1;

  display: flex;
  flex-direction: column;
}

.compact-title strong {
  font-size: 17px;
  font-weight: 800;

  letter-spacing: -0.02em;
}

.compact-title span {
  margin-top: 2px;

  color: #777780;

  font-size: 11px;
}

.top-export-btn {
  min-height: 42px;

  padding: 0 17px;

  border: 0;

  border-radius: 12px;

  background:
    linear-gradient(
      135deg,
      #765cff,
      #527cff
    );

  color: #ffffff;

  font-size: 13px;
  font-weight: 800;

  box-shadow:
    0 8px 24px
    rgba(104, 80, 255, 0.2);
}


/* WORKSPACE */

.compact-workspace {
  width: 100%;
  max-width: 440px;

  margin: 0 auto;
}

.video-shell {
  width: 100%;
}


/* ==============================
   REEL 9:16
================================ */

.compact-reel {
  position: relative;

  width: min(48vw, 205px);

  aspect-ratio: 9 / 16;

  margin: 0 auto;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  border: 1px solid #232329;
  border-radius: 13px;

  background: #000000;

  box-shadow:
    0 18px 45px
    rgba(0, 0, 0, 0.55);
}


/*
  top space and bottom space
  automatically stay equal
*/

.reel-space {
  flex: 1 1 0;

  min-height: 0;

  background: #000000;
}


/* HOOK */

.compact-hook {
  position: relative;

  z-index: 2;

  flex: 0 0 auto;

  width: 100%;

  padding: 8px 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #ffffff;
  color: #080808;

  text-align: center;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Helvetica Neue",
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 12px;
  font-weight: 700;

  line-height: 1.26;

  letter-spacing: -0.015em;

  white-space: pre-wrap;

  overflow-wrap: anywhere;
}

.compact-hook.arabic-hook {
  direction: rtl;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Arabic",
    "SF Pro Text",
    "Geeza Pro",
    "Segoe UI",
    Tahoma,
    Arial,
    sans-serif;

  font-size: 13px;

  font-weight: 700;

  line-height: 1.4;

  letter-spacing: 0;

  text-align: center;
}


/* IMAGE 1:1 */

.compact-image-box {
  position: relative;

  flex: 0 0 auto;

  width: 100%;

  aspect-ratio: 1 / 1;

  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    linear-gradient(
      145deg,
      #18181c,
      #0e0e10
    );
}

.compact-image-box span {
  color: #55555e;

  font-size: 11px;
  font-weight: 700;
}

#previewImage {
  position: absolute;

  inset: 0;

  display: none;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;

  opacity: 0;
}


/* ==============================
   PLAY CONTROL
================================ */

.video-player-controls {
  width: min(74vw, 315px);

  margin: 12px auto 15px;

  display: flex;
  align-items: center;

  gap: 9px;
}

.video-play-btn {
  position: relative;

  width: 42px;
  height: 42px;

  flex: 0 0 42px;

  border: 0;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  padding-left: 2px;

  background:
    linear-gradient(
      135deg,
      #765cff,
      #527cff
    );

  color: #ffffff;

  font-size: 13px;

  box-shadow:
    0 0 0 0
    rgba(118, 92, 255, 0.35);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.video-play-btn:hover {
  transform: scale(1.06);
}

.video-play-btn:active {
  transform: scale(0.92);
}

.video-play-btn:not(.is-playing) {
  animation:
    playPulse
    2s ease-in-out infinite;
}

@keyframes playPulse {

  0% {
    box-shadow:
      0 0 0 0
      rgba(118, 92, 255, 0.35);
  }

  60% {
    box-shadow:
      0 0 0 9px
      rgba(118, 92, 255, 0);
  }

  100% {
    box-shadow:
      0 0 0 0
      rgba(118, 92, 255, 0);
  }
}

.video-time {
  display: flex;

  gap: 3px;

  color: #8d8d96;

  font-size: 10px;

  white-space: nowrap;
}

.mini-progress {
  flex: 1;

  height: 4px;

  overflow: hidden;

  border-radius: 999px;

  background: #29292f;
}

.mini-progress-fill {
  width: 0%;
  height: 100%;

  border-radius: inherit;

  background:
    linear-gradient(
      90deg,
      #765cff,
      #527cff
    );
}


/* ==============================
   EDITOR FIELDS
================================ */

.compact-fields {
  display: grid;

  grid-template-columns:
    1.15fr 0.85fr;

  gap: 9px;
}

.compact-field {
  min-width: 0;

  padding: 10px;

  border: 1px solid #28282e;

  border-radius: 14px;

  background: #151517;
}

.compact-field label {
  display: block;

  margin-bottom: 7px;

  color: #92929b;

  font-size: 11px;
  font-weight: 700;
}

.compact-field textarea {
  display: block;

  width: 100%;
  height: 48px;

  resize: none;

  padding: 8px 9px;

  border: 1px solid #29292f;

  outline: none;

  border-radius: 9px;

  background: #0d0d0f;
  color: #ffffff;

  text-align: center;

  font-size: 12px;

  line-height: 1.3;
}

.compact-field textarea::placeholder {
  color: #55555e;
}

.compact-field textarea:focus {
  border-color: #6e5cff;
}

.image-field input {
  width: 100%;

  color: #8e8e97;

  font-size: 10px;
}

#editorStatus {
  min-height: 14px;

  margin-top: 7px;

  text-align: center;

  color: #74747d;

  font-size: 10px;
}


/* ==============================
   CUSTOM POPUP
================================ */

.editor-popup {
  position: fixed;

  inset: 0;

  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background:
    rgba(5, 5, 8, 0.72);

  backdrop-filter: blur(8px);

  opacity: 0;

  visibility: hidden;

  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.editor-popup.show {
  opacity: 1;

  visibility: visible;
}

.editor-popup-card {
  width: min(100%, 310px);

  padding: 23px 20px 18px;

  border: 1px solid #303037;

  border-radius: 20px;

  background:
    linear-gradient(
      180deg,
      #19191d,
      #121214
    );

  text-align: center;

  box-shadow:
    0 30px 80px
    rgba(0, 0, 0, 0.6);

  transform:
    translateY(12px)
    scale(0.96);

  transition:
    transform 0.2s ease;
}

.editor-popup.show
.editor-popup-card {
  transform:
    translateY(0)
    scale(1);
}

.editor-popup-icon {
  width: 48px;
  height: 48px;

  margin: 0 auto 13px;

  border-radius: 14px;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    rgba(118, 92, 255, 0.12);

  color: #9b8cff;

  font-size: 22px;
}

.editor-popup-card strong {
  display: block;

  margin-bottom: 7px;

  font-size: 17px;
}

.editor-popup-card p {
  color: #8f8f98;

  font-size: 12px;

  line-height: 1.5;
}

.editor-popup-btn {
  width: 100%;
  height: 42px;

  margin-top: 17px;

  border: 0;

  border-radius: 11px;

  background:
    linear-gradient(
      135deg,
      #765cff,
      #527cff
    );

  color: #ffffff;

  font-size: 13px;
  font-weight: 800;
}


/* ==============================
   TABLET / PC
================================ */

@media (min-width: 760px) {

  .site-header {
    padding-top: 30px;
  }

  .hero-section {
    margin-top: 85px;
    margin-bottom: 85px;
  }

  .new-template-card {
    max-width: 420px;
  }

  .template-grid {
    grid-template-columns:
      repeat(
        3,
        minmax(0, 1fr)
      );
  }

  .template-visual {
    min-height: 390px;
  }

  .template-phone {
    width: 165px;
  }

  .compact-editor {
    padding-top: 26px;
  }

  .compact-topbar,
  .compact-workspace {
    max-width: 500px;
  }

  .compact-reel {
    width: 210px;
  }
}


/* ==============================
   MOBILE
================================ */

@media (max-width: 759px) {

  .site-header {
    width:
      calc(100% - 32px);

    padding-top: 18px;
  }

  .hero-section {
    width:
      calc(100% - 32px);

    margin-top: 42px;
    margin-bottom: 52px;

    text-align: left;
  }

  .hero-badge {
    margin-left: 0;
  }

  .hero-section h1 {
    font-size: 43px;
  }

  .hero-section p {
    margin-left: 0;

    font-size: 14px;
  }

  .template-section,
  .how-it-works {
    width:
      calc(100% - 32px);
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 9px;
  }

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

  .new-template-card {
    width: 100%;
    max-width: none;
  }

  .template-visual {
    min-height: 390px;

    padding: 30px 20px;
  }

  .template-phone {
    width: 165px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .how-it-works {
    margin-top: 58px;
  }
}


/* SMALL PHONE HEIGHT */

@media (max-height: 700px) {

  .compact-editor {
    padding-top: 7px;
  }

  .compact-topbar {
    margin-bottom: 7px;
  }

  .compact-reel {
    width:
      min(41vw, 172px);
  }

  .video-player-controls {
    margin-top: 7px;
    margin-bottom: 8px;
  }

  .compact-field {
    padding: 8px;
  }

  .compact-field textarea {
    height: 42px;
  }
}


/* ==============================
   HOOK TEXT SIZE CONTROL
============================== */

.hook-size-control {
  margin-top: 14px;
}

.hook-size-control label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #c9c9d2;
}

#hookSizeValue {
  font-size: 11px;
  opacity: 0.75;
}

#hookSize {
  width: 100%;
  cursor: pointer;
}


.hook-width-control {
  margin-top: 18px;
}

.hook-width-control label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 700;
}

.hook-width-control input {
  width: 100%;
}

.hook-height-control {
  margin-top: 18px;
  width: 100%;
}

.hook-height-control label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #c9c9d2;
}

#hookHeightValue {
  font-size: 11px;
  opacity: 0.75;
}

#hookHeight {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  cursor: pointer;
}


#hookSize,
#hookHeight {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  margin: 0;
  box-sizing: border-box;
}

.hook-size-control,
.hook-height-control {
  width: 100%;
  box-sizing: border-box;
}


.image-field {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
}

.image-field > label {
  font-size: 14px;
  font-weight: 700;
  color: #c9c9d2;
}

.image-field input[type="file"] {
  width: 100%;
  padding: 18px 14px;
  border: 1px dashed rgba(130, 130, 150, 0.45);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  color: #8d8d98;
  box-sizing: border-box;
}

.image-field input[type="file"]::file-selector-button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-right: 10px;
  font-weight: 700;
  cursor: pointer;
}



/* ==============================
   IMAGE UPLOAD CARD
============================== */

.image-field {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.image-field > label {
  font-size: 14px;
  font-weight: 700;
  color: #c9c9d2;
}

/* Hide native file input visually */
.image-field input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Custom upload zone */
.image-upload-box {
  width: 100%;
  min-height: 110px;
  border: 1px dashed rgba(150, 150, 170, 0.35);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 18px 14px;
  box-sizing: border-box;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.image-upload-box:active {
  transform: scale(0.985);
}

.image-upload-box:hover {
  border-color: rgba(120, 110, 255, 0.65);
  background: rgba(120, 110, 255, 0.05);
}

/* + icon */
.image-upload-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 10px;

  font-size: 25px;
  font-weight: 400;
  line-height: 1;

  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

/* Add Image / Change Image */
.image-upload-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f1f5;
  text-align: center;
}

/* File name */
.image-upload-name {
  width: 100%;
  margin-top: 7px;

  font-size: 11px;
  color: #888894;
  text-align: center;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Selected state */
.image-upload-box.has-image {
  border-style: solid;
  border-color: rgba(120, 110, 255, 0.4);
}

.image-upload-box.has-image .image-upload-icon {
  background: rgba(120, 110, 255, 0.12);
}
/* ==============================
   EXPORT QUALITY MODAL
============================== */

.export-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background: rgba(4, 4, 8, 0.72);
  backdrop-filter: blur(14px);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}

.export-modal.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.export-modal-card {
  width: 100%;
  max-width: 430px;

  background:
    linear-gradient(
      180deg,
      rgba(24, 24, 32, 0.98),
      rgba(14, 14, 20, 0.98)
    );

  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;

  padding: 20px;

  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55);

  transform:
    translateY(18px)
    scale(0.97);

  transition:
    transform 0.24s ease;
}

.export-modal.show .export-modal-card {
  transform:
    translateY(0)
    scale(1);
}

.export-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;

  margin-bottom: 20px;
}

.export-modal-header h3 {
  margin: 0 0 5px;

  font-size: 21px;
  font-weight: 800;

  color: #ffffff;
}

.export-modal-header p {
  margin: 0;

  font-size: 13px;
  color: #8f8f9d;
}

.export-modal-close {
  width: 34px;
  height: 34px;

  border: 0;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.06);
  color: #bcbcc6;

  font-size: 24px;
  line-height: 1;

  cursor: pointer;
}

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

.export-quality-option {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 15px 16px;

  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;

  background: rgba(255, 255, 255, 0.025);

  color: #ffffff;
  text-align: left;

  cursor: pointer;

  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.export-quality-option:active {
  transform: scale(0.985);
}

.export-quality-option.selected {
  border-color: rgba(112, 91, 255, 0.8);

  background:
    linear-gradient(
      135deg,
      rgba(104, 76, 255, 0.14),
      rgba(65, 94, 255, 0.09)
    );

  box-shadow:
    0 0 0 1px
    rgba(112, 91, 255, 0.12)
    inset;
}

.export-quality-option strong {
  display: block;

  margin-bottom: 4px;

  font-size: 15px;
  font-weight: 800;
}

.export-quality-option > div > span {
  font-size: 12px;
  color: #8e8e9a;
}

.export-quality-title-row {
  display: flex;
  align-items: center;
  gap: 8px;

  flex-wrap: wrap;
}

.recommended-badge {
  display: inline-flex;
  align-items: center;

  min-height: 20px;

  padding: 3px 7px;

  border-radius: 999px;

  background:
    linear-gradient(
      135deg,
      #6b4cff,
      #4b63ff
    );

  color: #ffffff !important;

  font-size: 9px !important;
  font-weight: 800;

  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.export-quality-meta {
  flex-shrink: 0;

  padding-left: 8px;

  text-align: right;
}

.export-quality-meta span {
  font-size: 11px !important;
  font-weight: 700;

  color: #b8b8c3 !important;
}

.export-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;

  margin-top: 20px;
}

.export-cancel-btn,
.export-confirm-btn {
  min-height: 48px;

  border: 0;
  border-radius: 14px;

  font-size: 14px;
  font-weight: 800;

  cursor: pointer;
}

.export-cancel-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #c5c5cf;
}

.export-confirm-btn {
  background:
    linear-gradient(
      135deg,
      #6b4cff,
      #4765ff
    );

  color: #ffffff;

  box-shadow:
    0 10px 28px
    rgba(86, 76, 255, 0.24);
}


/* ==============================
   EXPORT PROGRESS
============================== */

.export-progress-view {
  display: none;
  text-align: center;
  padding: 8px 0 2px;
}

.export-progress-view.show {
  display: block;
}

.export-progress-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.export-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255,255,255,.1);
  border-top-color: #7161ff;
  border-radius: 50%;
  animation: exportSpin .8s linear infinite;
}

@keyframes exportSpin {
  to {
    transform: rotate(360deg);
  }
}

.export-progress-view h3 {
  margin: 0 0 7px;
  font-size: 19px;
  color: #fff;
}

.export-progress-view p {
  margin: 0 0 18px;
  font-size: 13px;
  color: #92929f;
}

.export-progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.export-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    #704cff,
    #536dff
  );
  transition: width .18s ease;
}

.export-progress-percent {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.export-stop-btn {
  width: 100%;
  margin-top: 20px;
  padding: 13px 16px;

  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;

  background: rgba(255,255,255,.04);
  color: #d7d7df;

  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.export-stop-btn:active {
  transform: scale(.98);
}



/* Hook Font */

.hook-font-control {
  margin-top: 22px;
}

.hook-font-control label {
  display: block;
  margin-bottom: 10px;
  color: #a7a7b2;
  font-size: 14px;
  font-weight: 700;
}

.hook-font-control select {
  width: 100%;
  height: 48px;
  padding: 0 42px 0 14px;

  color: #f4f4f7;
  background: #151518;

  border: 1px solid #2b2b31;
  border-radius: 12px;

  font-size: 15px;
  font-weight: 600;

  outline: none;
  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;

  background-image:
    linear-gradient(45deg, transparent 50%, #8e8e9a 50%),
    linear-gradient(135deg, #8e8e9a 50%, transparent 50%);

  background-position:
    calc(100% - 18px) 20px,
    calc(100% - 13px) 20px;

  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.hook-font-control select:focus {
  border-color: #665cff;
  box-shadow: 0 0 0 3px rgba(102, 92, 255, 0.12);
}


/* Image + Font compact card */

.image-field {
  min-height: 0;
  gap: 10px;
}

.image-upload-box {
  min-height: 82px;
  padding: 10px;
  border-radius: 12px;
}

.image-upload-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 22px;
  margin-bottom: 6px;
}

.image-upload-title {
  font-size: 12px;
}

.image-upload-name {
  margin-top: 4px;
  font-size: 10px;
}

.hook-font-control {
  width: 100%;
  margin: 0;
}

.hook-font-control label {
  display: block;
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 700;
  color: #92929b;
}

.hook-font-control select {
  display: block;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #29292f;
  border-radius: 10px;
  outline: none;
  background: #0d0d0f;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}







/* EDITOR TOP */

.compact-topbar {
  width: 100%;
  max-width: 440px;

  margin: 0 auto 14px;

  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;

  padding: 7px;

  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.045),
      rgba(255, 255, 255, 0.015)
    );

  box-shadow:
    0 10px 35px rgba(0, 0, 0, 0.18);
}


/* BACK */

.compact-back {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;

  position: relative;

  padding: 0;
  margin: 0;

  border: 1px solid rgba(118, 92, 255, 0.28);
  border-radius: 12px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.055),
      rgba(118, 92, 255, 0.055)
    ),
    #0d0d15;

  color: transparent;
  font-size: 0;

  cursor: pointer;

  box-shadow:
    0 7px 18px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);

  appearance: none;
  -webkit-appearance: none;
}

.compact-back::before {
  content: "←";

  position: absolute;
  left: 50%;
  top: 50%;

  transform: translate(
    -50%,
    calc(-50% - 2px)
  );

  color: #ffffff;

  font-family: Arial, sans-serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
}
/* TITLE */

.compact-title {
  min-width: 0;

  display: flex;
  flex-direction: column;
  justify-content: center;

  gap: 2px;
}

.compact-title strong {
  font-size: 15px;
  line-height: 1.15;

  font-weight: 800;

  letter-spacing: -0.02em;

  color: #ffffff;
}

.compact-title span {
  font-size: 10px;
  line-height: 1.2;

  font-weight: 600;

  color: #777780;
}


/* EXPORT */

.top-export-btn {
  min-height: 44px;

  padding: 0 16px;

  border: 0;
  border-radius: 12px;

  background:
    linear-gradient(
      135deg,
      #765cff,
      #527cff
    );

  color: #ffffff;

  font-size: 12px;
  font-weight: 800;

  cursor: pointer;

  box-shadow:
    0 8px 22px rgba(104, 80, 255, 0.22);
}

/* VIRAL1S APP LOADER */

.app-loader {
  position: fixed;
  inset: 0;

  z-index: 99999;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 18px;

  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(118, 92, 255, 0.14),
      transparent 34%
    ),
    #070711;

  opacity: 1;
  visibility: visible;

  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

.app-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-brand {
  color: #ffffff;

  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
}

.loader-brand span {
  background:
    linear-gradient(
      135deg,
      #765cff,
      #527cff
    );

  -webkit-background-clip: text;
  background-clip: text;

  color: transparent;
}

.loader-line {
  width: 92px;
  height: 3px;

  overflow: hidden;

  border-radius: 999px;

  background:
    rgba(255, 255, 255, 0.08);
}

.loader-line-fill {
  width: 42%;
  height: 100%;

  border-radius: inherit;

  background:
    linear-gradient(
      90deg,
      #765cff,
      #527cff
    );

  animation:
    viralLoaderMove 0.85s ease-in-out infinite;
}

@keyframes viralLoaderMove {
  0% {
    transform: translateX(-130%);
  }

  50% {
    transform: translateX(140%);
  }

  100% {
    transform: translateX(330%);
  }
}
