@font-face {
  font-family: Montserrat;
  src: url("assets/Montserrat-VariableFont_wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg-950: #000;
  --bg-900: #171717;
  --bg-800: #222;
  --primary-500: #ff317d;
  --primary-400: #ff3386;
  --white: #fff;
  --muted: rgba(255, 255, 255, 0.5);
  --border: hsla(0, 0%, 59.2%, 0.35);
  --header-height: 64px;
}

* {
  box-sizing: border-box;
}

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

html {
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body {
  width: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--white);
  background: var(--bg-900);
  font-family: Montserrat, system-ui, sans-serif;
  font-size: 14px;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  display: block;
  max-width: 100%;
}

/* Shared header */
.pix-header {
  position: sticky;
  z-index: 99;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background: #111;
}

.pix-head-core {
  width: 100%;
  height: 100%;
}

.pix-head__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding: 0 20px 0 16px;
}

.pix-head__left,
.pix-head__links,
.pix-head__right,
.pix-logo {
  display: flex;
  align-items: center;
}

.pix-head__left {
  gap: 40px;
}

.pix-logo {
  gap: 9px;
  min-width: 142px;
}

.pix-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.pix-log__txt {
  margin: 0;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.5px;
}

.pix-head__links {
  gap: 10px;
}

.pix-head__nav-link {
  padding: 9px 15px;
  color: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
}

.pix-head__nav-link:hover,
.pix-head__nav-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.pix-head__right {
  gap: 12px;
}

.login-btn {
  padding: 9px 12px;
  border: 0;
  background: transparent;
  font-weight: 550;
}

.pink-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 22px;
  color: #fff;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff317d, #ff6b9d);
  font-weight: 700;
}

.mobile-nav-btn {
  display: none;
}

/* Explore */
.page-explore {
  min-height: calc(100vh - var(--header-height));
}

.pix-hot-templates {
  height: 86px;
  padding: 0 16px;
}

.pix-hot-templates img {
  width: 389px;
  height: 86px;
  object-fit: contain;
}

.pix-pink-title {
  position: fixed;
  opacity: 0;
  pointer-events: none;
}

.page-explore__wrapper {
  width: calc(100% - 15px);
  min-height: 100vh;
  padding: 0 16px 14px;
}

.do-wf__container {
  display: flex;
  width: calc(100% + 15px);
  gap: 16px;
}

.do-wf__column {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 16px;
}

.do-wf__item {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.16);
}

.do-wf__item.ratio-08 {
  aspect-ratio: 0.8 / 1;
}

.do-wf__item.ratio-066 {
  aspect-ratio: 0.666667 / 1;
}

.do-wf__item.ratio-056 {
  aspect-ratio: 0.5625 / 1;
}

.explore-media-card,
.explore-media-card img {
  width: 100%;
  height: 100%;
}

.explore-media-card img {
  object-fit: cover;
  transition: transform 0.35s ease;
}

.do-wf__item:hover img {
  transform: scale(1.025);
}

.explore-media-card::after {
  position: absolute;
  inset: 45% 0 0;
  content: "";
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
}

.explore-media__title {
  position: absolute;
  z-index: 2;
  right: 15px;
  bottom: 16px;
  left: 15px;
  margin: 0;
  font-size: 17px;
  font-style: italic;
  font-weight: 700;
  text-shadow: 0 2px 7px #000;
}

.explore-media__collect {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 0.2s;
}

.do-wf__item:hover .explore-media__collect {
  opacity: 1;
}

.do-wf__btn {
  min-width: 160px;
  height: 48px;
  padding: 12px 32px;
  color: #fff;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(135deg, #ff317d, #ff6b9d);
  font-weight: 700;
}

/* Tool pages */
.tool-page {
  --side-width: 604px;
}

.tools-wrapper {
  display: flex;
  align-items: flex-start;
  width: calc(100% - 15px);
  height: calc(100vh - var(--header-height));
  min-height: 680px;
  gap: 16px;
  padding: 16px;
}

.tool-controller {
  display: flex;
  width: var(--side-width);
  height: 100%;
  flex: 0 0 var(--side-width);
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-900);
}

.tools-effects-title {
  flex: 0 0 auto;
  padding: 20px 16px 0 20px;
  font-size: 16px;
  font-weight: 500;
}

.tool-scroll {
  overflow-y: auto;
  padding: 10px 20px 0;
}

.tool-section {
  margin-bottom: 16px;
}

.tool-label {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 500;
}

.model-select,
.settings-card,
.prompt-card,
.template-select-card {
  border-radius: 8px;
  background: var(--bg-800);
}

.model-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 16px;
}

.model-select span:first-child {
  color: rgba(255, 255, 255, 0.55);
}

.model-select strong {
  margin-left: 8px;
  color: #fff;
}

.upload-zone {
  display: flex;
  min-height: 176px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 22px;
  color: rgba(255, 255, 255, 0.62);
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: var(--bg-800);
  text-align: center;
}

.upload-icon {
  position: relative;
  width: 48px;
  height: 39px;
  margin-bottom: 13px;
  color: rgba(255, 255, 255, 0.8);
  border: 2px solid currentColor;
  border-radius: 7px;
}

.upload-icon::before {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  height: 14px;
  content: "";
  border-top: 2px solid currentColor;
  transform: skewY(-22deg);
}

.upload-icon::after {
  position: absolute;
  top: -8px;
  right: -6px;
  padding: 0 3px;
  content: "↑";
  background: var(--bg-800);
  font-size: 19px;
}

.upload-zone strong {
  color: #fff;
  font-size: 13px;
  font-weight: 550;
}

.upload-notes {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.32);
  font-size: 11px;
  line-height: 1.6;
}

.prompt-card {
  position: relative;
  min-height: 116px;
  padding: 12px 19px 32px 16px;
}

.prompt-card textarea {
  width: 100%;
  height: 72px;
  resize: none;
  padding: 0;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1.45;
}

.prompt-card textarea::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.prompt-count {
  position: absolute;
  right: 16px;
  bottom: 12px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
}

.settings-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 0 8px;
  font-size: 14px;
  font-weight: 500;
}

.settings-card {
  overflow: hidden;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-row span:first-child {
  color: rgba(255, 255, 255, 0.58);
}

.setting-value {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 550;
}

.switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 12px;
  background: var(--primary-500);
}

.switch::after {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.template-select-card {
  position: relative;
  height: 325px;
  overflow: hidden;
}

.template-select-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.template-select-card::after {
  position: absolute;
  inset: 50% 0 0;
  content: "";
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.template-selected-copy {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 15px;
  left: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.change-template {
  padding: 8px 12px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.55);
}

.tip {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
}

.tip b {
  color: var(--primary-500);
}

.tool-action {
  margin-top: auto;
  padding: 16px 20px;
}

.generate-btn {
  display: flex;
  width: 100%;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff317d, #ff6b9d);
  font-weight: 700;
}

.do-example-media {
  display: flex;
  min-width: 0;
  height: 100%;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-900);
}

.do-exp-media__title {
  flex: 0 0 auto;
  padding: 20px 16px 0;
  font-size: 16px;
  font-weight: 500;
}

.do-exp-media__player {
  min-height: 0;
  flex: 1;
  margin: 14px 16px 16px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.4);
}

.do-exp-media__player video,
.do-exp-media__player img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* Pricing */
.page-pricing {
  min-height: 100vh;
  background: var(--bg-900);
}

.pricing-hero-banner {
  position: relative;
  min-height: 810px;
  overflow: hidden;
}

.pricing-hero__media {
  position: absolute;
  inset: 0;
}

.pricing-hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.pricing-hero__media::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent 45%),
    linear-gradient(180deg, transparent 75%, var(--bg-900));
}

.pricing-hero__content {
  position: relative;
  z-index: 2;
  padding-top: 60px;
}

.pricing-hero__words {
  width: 606px;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  text-align: center;
}

.pricing-hero__words h1 {
  margin: 0 0 14px;
  font-size: 32px;
  font-weight: 700;
}

.pricing-hero__words p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.pricing-hero__cards {
  display: grid;
  max-width: 1160px;
  min-height: 500px;
  grid-template-columns: 1fr 1fr 0.72fr;
  gap: 10px;
  margin: 0 auto;
  padding: 110px 16px 30px;
}

.price-plan {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(23, 23, 23, 0.94);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.price-plan.premium {
  border-color: rgba(255, 49, 125, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 49, 125, 0.14), transparent 42%),
    rgba(23, 23, 23, 0.96);
}

.price-plan h2 {
  margin: 0 0 22px;
  font-size: 22px;
}

.price-plan__price {
  margin-bottom: 20px;
  font-size: 14px;
}

.price-plan__price strong {
  font-size: 36px;
}

.price-plan .pink-btn,
.price-plan .outline-btn {
  width: 100%;
  margin-bottom: 24px;
}

.outline-btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.plan-features {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.plan-features li {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}

.plan-features li::before {
  margin-right: 8px;
  color: #00bd7e;
  content: "✓";
}

.price-plan.credits {
  align-self: center;
  min-height: 260px;
}

.pricing-section {
  width: min(1376px, calc(100% - 64px));
  margin: 0 auto;
  padding: 50px 0;
}

.pricing-heading {
  margin: 0 0 28px;
  text-align: center;
}

.pricing-heading h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.pricing-heading p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
}

.pricing-feature-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.pricing-feature-card {
  position: relative;
  height: 248px;
  overflow: hidden;
  padding: 24px;
  border: 2px solid var(--bg-800);
  border-radius: 8px;
  background: var(--bg-800) url("assets/bitmap.png") center/cover;
}

.pricing-feature-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(34, 34, 34, 0.5);
}

.pricing-feature-card > * {
  position: relative;
  z-index: 1;
}

.feature-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 74px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #8d63ff, #d05cff);
  font-size: 20px;
}

.pricing-feature-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.pricing-feature-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  line-height: 1.55;
}

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

.pricing-comment-card {
  min-height: 260px;
  padding: 20px;
  border-radius: 12px;
  background: var(--bg-800);
}

.pricing-comment-card blockquote {
  min-height: 140px;
  margin: 18px 0;
  color: #bfbfc2;
  font-size: 12px;
  line-height: 1.65;
}

.stars {
  color: #ffc45d;
  letter-spacing: 2px;
}

.comment-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-user img {
  width: 35px;
  height: 35px;
  border: 1px solid var(--primary-500);
  border-radius: 50%;
  object-fit: cover;
}

.comment-user strong,
.comment-user small {
  display: block;
}

.comment-user small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
}

.pricing-faq-list {
  display: grid;
  gap: 12px;
  max-width: 1040px;
  margin: 0 auto;
}

.faq-card {
  overflow: hidden;
  border: 1px solid var(--bg-800);
  border-radius: 16px;
  background: var(--bg-800);
  box-shadow: 0 5px 15px rgba(25, 33, 61, 0.06);
}

.faq-head {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 20px;
}

.faq-trigger {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
  font-size: 22px;
  transition: transform 0.2s;
}

.faq-answer {
  display: none;
  margin: 0;
  padding: 0 32px 20px;
  color: #bfbfc2;
  font-size: 14px;
  line-height: 1.66;
}

.faq-card.is-open .faq-answer {
  display: block;
}

.faq-card.is-open .faq-trigger {
  transform: rotate(45deg);
}

.pricing-final {
  padding: 50px 32px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 80% 30%, rgba(255, 49, 125, 0.26), transparent 30%),
    var(--bg-800);
  text-align: center;
}

.pricing-final h2 {
  margin: 0 0 12px;
  font-size: 30px;
}

.pricing-final p {
  max-width: 720px;
  margin: 0 auto 22px;
  color: #bfbfc2;
}

.footer-section {
  margin-top: 30px;
  padding: 38px 0 24px;
  background: var(--bg-800);
}

.footer-wrapper {
  width: min(1376px, calc(100% - 64px));
  margin: 0 auto;
}

.footer-subscribe {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-subscribe h3,
.footer-subscribe p {
  margin: 0;
}

.footer-subscribe p {
  margin-top: 6px;
  color: #bfbfc2;
  font-size: 12px;
}

.subscribe-form {
  display: flex;
  width: 420px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  background: #171717;
}

.subscribe-form input {
  min-width: 0;
  flex: 1;
  padding: 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
}

.footer-last {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  color: #bfbfc2;
  font-size: 12px;
}

.footer-last a {
  margin-left: 20px;
}

/* Shared dialogs and popovers */
.do-dialog-layer {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.7);
  animation: dialog-fade 0.18s ease;
}

.do-dialog-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg-800);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.35);
  animation: dialog-rise 0.22s ease;
}

.ico-close {
  position: absolute;
  z-index: 5;
  top: 18px;
  right: 20px;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 5px;
  place-items: center;
  color: rgba(255, 255, 255, 0.3);
  border: 0;
  background: transparent;
}

.ico-close:hover {
  color: #fff;
}

.ico-close::before,
.ico-close::after {
  position: absolute;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.ico-close::before {
  transform: rotate(45deg);
}

.ico-close::after {
  transform: rotate(-45deg);
}

.login-dialog {
  width: min(680px, calc(100vw - 32px));
  min-height: 620px;
}

.login-layer__content {
  padding: 48px 120px 28px;
}

.do-dialog__title {
  margin: 0;
  color: #fff;
  text-align: center;
  font-size: 28px;
}

.do-dialog__sub-title {
  margin: 6px 0 26px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  font-size: 14px;
}

.auth-field {
  display: block;
  margin-bottom: 18px;
}

.auth-field__label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.auth-field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  outline: 0;
  background: var(--bg-900);
}

.auth-field input:focus {
  border-color: var(--primary-500);
}

.auth-forgot {
  display: block;
  margin: -6px 0 18px auto;
  padding: 0;
  color: var(--primary-500);
  border: 0;
  background: transparent;
  font-size: 14px;
}

.auth-button {
  display: flex;
  width: 100%;
  height: 58px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 650;
}

.auth-button--primary {
  color: #fff;
  border: 0;
  background: var(--primary-500);
}

.auth-button--google {
  color: #fff;
  border: 2px solid #f97316;
  background: transparent;
}

.auth-button--google:hover {
  background: rgba(249, 115, 22, 0.1);
  transform: translateY(-1px);
}

.auth-button--google img {
  width: 26px;
  height: 26px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  content: "";
}

.auth-switch,
.auth-legal {
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  font-size: 14px;
  line-height: 1.55;
}

.auth-switch {
  margin: 24px 0 16px;
}

.auth-switch button,
.auth-legal a {
  padding: 0;
  color: var(--primary-500);
  border: 0;
  background: transparent;
}

.auth-legal {
  margin: 0;
  font-size: 12px;
}

.auth-message {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

/* Explore detail */
.explore-detail-dialog {
  display: grid;
  width: 83.23vw;
  max-width: 1598px;
  height: 84.44vh;
  min-height: 500px;
  max-height: 912px;
  grid-template-columns: minmax(0, 1fr) 456px;
  border-radius: 8px;
}

.explore-detail__media {
  position: relative;
  display: grid;
  min-width: 0;
  padding: 20px 24px;
  place-items: center;
  background: #000;
}

.explore-detail__media > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-switch {
  position: absolute;
  top: 50%;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  border: 0;
  border-radius: 3px;
  background: var(--bg-800);
  transform: translateY(-50%);
}

.detail-switch:hover {
  background: #3a4553;
  transform: translateY(-50%) scale(1.05);
}

.detail-prev {
  left: 10px;
}

.detail-next {
  right: 10px;
}

.explore-detail__side {
  min-width: 0;
  padding: 20px 12px 20px 20px;
  background: var(--bg-900);
}

.explore-detail__scroller {
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  border-radius: 8px;
  background: var(--bg-800);
}

.explore-detail__scroller h2 {
  margin: 0 38px 18px 0;
  font-size: 24px;
}

.detail-original {
  height: 264px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-900);
}

.detail-original img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  display: grid;
  gap: 12px;
}

.detail-meta__row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.detail-meta__row strong {
  color: #fff;
  font-weight: 500;
}

.detail-prompt {
  margin: 18px 0;
  padding: 13px;
  border-radius: 8px;
  background: var(--bg-900);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  line-height: 1.55;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
}

.detail-tag {
  padding: 3px 8px;
  border: 1px solid var(--bg-800);
  border-radius: 4px;
  background: var(--bg-900);
  font-size: 12px;
}

.detail-use {
  width: 100%;
  min-height: 42px;
  border-radius: 16px;
}

/* Template chooser */
.template-dialog {
  width: 69.375vw;
  min-width: 1006px;
  max-width: 1332px;
  height: 88.667vh;
  max-height: 912px;
  border-radius: 8px;
}

.template-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  padding: 0 64px 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.template-dialog__head h2 {
  margin: 0;
  font-size: 22px;
}

.template-search {
  width: 300px;
  height: 36px;
  padding: 0 14px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 100px;
  outline: 0;
  background: var(--bg-900);
}

.template-dialog__body {
  height: calc(100% - 70px);
  overflow-y: auto;
  padding: 20px 24px 28px;
}

.template-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.template-choice {
  position: relative;
  overflow: hidden;
  aspect-ratio: 300 / 400;
  padding: 0;
  color: #fff;
  border: 2px solid transparent;
  border-radius: 11px;
  background: var(--bg-900);
}

.template-choice.is-selected {
  border-color: var(--primary-500);
}

.template-choice img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.template-choice span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 2px 8px #000;
}

.template-choice::after {
  position: absolute;
  inset: 50% 0 0;
  content: "";
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

/* Select popover */
.pix-select-popover {
  position: fixed;
  z-index: 1100;
  min-width: 180px;
  padding: 5px;
  border: 1px solid #333;
  border-radius: 8px;
  background: var(--bg-800);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
}

.pix-select-option {
  display: flex;
  width: 100%;
  height: 34px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 3px;
  padding: 5px 10px;
  color: rgba(255, 255, 255, 0.72);
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  font-size: 14px;
}

.pix-select-option:last-child {
  margin-bottom: 0;
}

.pix-select-option:hover {
  background: #333;
}

.pix-select-option.is-selected {
  color: #fff;
  border-color: #3a3a3a;
  background: #2d2d2d;
}

.setting-row,
.model-select {
  cursor: pointer;
}

.settings-card.is-collapsed {
  display: none;
}

.settings-title span:last-child {
  transition: transform 0.2s;
}

.settings-title.is-collapsed span:last-child {
  transform: rotate(180deg);
}

.switch {
  width: 28px;
  height: 12px;
  cursor: pointer;
  background: #555;
}

.switch::after {
  top: -2px;
  right: auto;
  left: 0;
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.switch.is-on {
  background: var(--primary-500);
}

.switch.is-on::after {
  transform: translateX(12px);
}

.change-template {
  padding: 5px 10px;
  border: 0;
  border-radius: 100px;
  background: var(--primary-500);
}

.upload-zone.has-preview {
  min-height: 176px;
  background-position: center;
  background-size: cover;
  text-shadow: 0 2px 8px #000;
}

.upload-zone.has-preview .upload-icon,
.upload-zone.has-preview .upload-notes {
  display: none;
}

body.dialog-open {
  overflow: hidden;
}

@keyframes dialog-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dialog-rise {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1000px) {
  .pix-head__links {
    display: none;
  }

  .tools-wrapper {
    height: auto;
    min-height: 0;
    flex-direction: column;
  }

  .tool-controller,
  .do-example-media {
    width: 100%;
    height: auto;
    flex: none;
  }

  .do-example-media {
    min-height: 620px;
  }

  .pricing-feature-list,
  .pricing-comments {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .explore-detail-dialog {
    grid-template-columns: 1fr 360px;
  }

  .template-dialog {
    width: calc(100vw - 32px);
    min-width: 0;
  }

  .template-picker-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 760px) {
  .pix-log__txt,
  .login-btn {
    display: none;
  }

  .pix-logo {
    min-width: 0;
  }

  .pix-head__right .pink-btn {
    min-height: 36px;
    padding: 0 14px;
    font-size: 12px;
  }

  .pix-hot-templates img {
    width: min(389px, 100%);
  }

  .page-explore__wrapper {
    width: 100%;
  }

  .do-wf__container {
    gap: 10px;
  }

  .do-wf__column {
    gap: 10px;
  }

  .do-wf__column:nth-child(n + 3) {
    display: none;
  }

  .tool-page {
    --side-width: 100%;
  }

  .tools-wrapper {
    width: 100%;
    padding: 10px;
  }

  .pricing-section,
  .footer-wrapper {
    width: calc(100% - 32px);
  }

  .pricing-feature-list,
  .pricing-comments {
    grid-template-columns: 1fr;
  }

  .faq-head {
    padding: 17px 18px;
    font-size: 15px;
  }

  .faq-answer {
    padding: 0 18px 18px;
  }

  .footer-subscribe,
  .footer-last {
    align-items: flex-start;
    flex-direction: column;
  }

  .subscribe-form {
    width: 100%;
  }

  .login-layer__content {
    padding: 48px 24px 28px;
  }

  .explore-detail-dialog {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    grid-template-columns: 1fr;
  }

  .explore-detail__media {
    min-height: 45vh;
  }

  .explore-detail__side {
    min-height: 0;
  }

  .template-dialog {
    width: 100vw;
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }

  .template-dialog__head {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 18px 56px 16px 18px;
  }

  .template-search {
    width: 100%;
  }

  .template-dialog__body {
    height: calc(100% - 104px);
    padding: 14px;
  }

  .template-picker-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Kling-inspired visual skin — structure and behavior remain unchanged */
:root {
  --bg-950: #030303;
  --bg-900: #0a0a0a;
  --bg-800: #161616;
  --primary-500: #a72759;
  --primary-400: #c0336c;
  --muted: rgba(255, 255, 255, 0.42);
  --border: #292929;
}

body {
  background: #030303;
}

.pix-header {
  background: #050505;
  border-bottom: 1px solid #1d1d1d;
}

.pix-logo img {
  width: 28px;
  height: 28px;
  border-radius: 5px;
}

.pix-log__txt {
  font-size: 18px;
}

.pix-head__left {
  gap: 30px;
}

.pix-head__links {
  gap: 2px;
}

.pix-head__nav-link {
  padding: 9px 14px;
  color: #e7e7e7;
  background: transparent;
  font-size: 15px;
}

.pix-head__nav-link:hover {
  color: #fff;
  background: #151515;
}

.pix-head__nav-link.is-active {
  color: #d23676;
  background: transparent;
}

.login-btn {
  color: #ddd;
}

.pink-btn,
.generate-btn,
.do-wf__btn,
.auth-button--primary {
  background: #a72759;
  box-shadow: none;
}

.pink-btn:hover,
.generate-btn:hover,
.do-wf__btn:hover,
.auth-button--primary:hover {
  background: #bd2e68;
}

.page-explore {
  background: #030303;
}

.pix-hot-templates {
  display: none;
}

.page-explore__wrapper {
  width: 100%;
  padding: 6px 7px 14px;
}

.do-wf__container {
  display: block;
  width: 100%;
  column-count: 7;
  column-gap: 4px;
}

.do-wf__column {
  display: contents;
}

.do-wf__item {
  display: inline-block;
  width: 100%;
  margin: 0 0 4px;
  overflow: hidden;
  break-inside: avoid;
  border: 1px solid #121212;
  border-radius: 3px;
  background: #111;
  box-shadow: none;
}

.explore-media-card::after {
  inset: 58% 0 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
}

.explore-media__title {
  right: 8px;
  bottom: 8px;
  left: 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.explore-media__collect {
  top: auto;
  right: 6px;
  bottom: 5px;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  font-size: 12px;
  opacity: 0;
}

.explore-media__title + .explore-media__collect,
.do-wf__item:hover .explore-media__collect {
  opacity: 1;
}

.do-wf__btn {
  min-width: 120px;
  height: 36px;
  padding: 8px 22px;
  border-radius: 6px;
  font-size: 12px;
}

.footer-section {
  background: #0b0b0b;
  border-top: 1px solid #1d1d1d;
}

.tools-wrapper {
  width: 100%;
  gap: 12px;
  padding: 12px;
  background: #030303;
}

.tool-controller,
.do-example-media {
  border: 1px solid #202020;
  border-radius: 6px;
  background: #141414;
}

.tools-effects-title,
.do-exp-media__title {
  color: #eee;
  font-size: 15px;
}

.model-select,
.settings-card,
.prompt-card {
  background: #1b1b1b;
}

.template-select-card {
  height: 325px;
  background-image: url("assets/templates/ancient-field.jpg");
  background-position: center;
  background-size: cover;
  isolation: isolate;
}

.template-select-card::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.template-select-card::after {
  z-index: 2;
}

.template-select-card > img {
  position: relative;
  z-index: 1;
  width: auto;
  max-width: 52%;
  height: 100%;
  margin: 0 auto;
  object-fit: cover;
}

.template-selected-copy {
  z-index: 3;
}

.change-template {
  border-radius: 5px;
  background: #a72759;
  font-size: 11px;
}

.upload-zone {
  min-height: 250px;
  color: #c7c7c7;
  border: 1px dashed #9c2858;
  border-radius: 4px;
  background: #1e1e1e;
}

.upload-zone:hover {
  border-color: #d13675;
  background: #212121;
}

.upload-icon {
  width: 52px;
  height: 43px;
  color: #f0f0f0;
}

.upload-icon::after {
  color: #ee3b82;
  background: #1e1e1e;
}

.tip {
  color: #747474;
}

.page-ai .settings-title {
  margin-top: 18px;
  color: #ddd;
  font-size: 12px;
}

.page-ai .settings-card {
  display: grid;
  overflow: visible;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  background: transparent;
}

.page-ai .setting-row {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #303030;
  border-right: 0;
  background: #1d1d1d;
  font-size: 12px;
}

.page-ai .setting-row:nth-child(3) {
  border-right: 1px solid #303030;
}

.page-ai .setting-row:nth-child(-n + 3) > span:first-child {
  display: none;
}

.page-ai .setting-row:nth-child(4) {
  min-height: 46px;
  grid-column: 1 / -1;
  margin-top: 12px;
  border: 0;
  border-radius: 4px;
  background: #202020;
}

.setting-value {
  width: 100%;
  justify-content: space-between;
  color: #e8e8e8;
  font-weight: 400;
}

.switch {
  background: #3d3d3d;
}

.switch.is-on {
  background: #a72759;
}

.tool-action {
  padding: 12px 16px 16px;
}

.generate-btn {
  color: rgba(255, 255, 255, 0.68);
  background: #9d2356;
  font-weight: 400;
}

.do-exp-media__player {
  border-radius: 4px;
  background: #080808;
}

.pix-select-popover {
  border-color: #303030;
  border-radius: 5px;
  background: #202020;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.52);
}

.pix-select-option {
  color: #ccc;
  border-color: #353535;
  border-radius: 4px;
  background: #242424;
}

.pix-select-option:hover,
.pix-select-option.is-selected {
  color: #fff;
  background: #363636;
}

.pix-select-popover.is-quantity {
  width: 176px;
  padding: 8px 10px 10px;
}

.quantity-popover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  margin-bottom: 7px;
  color: #ddd;
  font-size: 12px;
}

.quantity-popover__close {
  color: #777;
  border: 0;
  background: transparent;
  font-size: 16px;
}

.quantity-popover__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.quantity-popover__grid .pix-select-option {
  height: 30px;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.do-dialog-layer {
  background: rgba(0, 0, 0, 0.78);
}

.do-dialog-card,
.explore-detail__scroller,
.faq-card,
.price-plan,
.pricing-comment-card {
  background-color: #151515;
  border-color: #292929;
}

.auth-field input,
.template-search {
  background: #0c0c0c;
  border-color: #303030;
}

.auth-button--google {
  border-color: #3a3a3a;
}

.pricing-feature-card {
  border-color: #222;
  background-color: #151515;
}

@media (max-width: 1200px) {
  .do-wf__container {
    column-count: 6;
  }
}

@media (max-width: 900px) {
  .do-wf__container {
    column-count: 4;
  }
}

@media (max-width: 600px) {
  .do-wf__container {
    column-count: 2;
  }

  .upload-zone {
    min-height: 190px;
  }
}

/* Green accent and richer hover feedback */
:root {
  --primary-500: #63dc4f;
  --primary-400: #7bea66;
}

.pix-logo,
.pix-head__nav-link,
.login-btn,
.pink-btn,
.generate-btn,
.do-wf__btn,
.do-wf__item,
.explore-media__title,
.change-template,
.upload-zone,
.model-select,
.setting-row,
.template-choice,
.pix-select-option,
.faq-card,
.faq-head,
.price-plan,
.pricing-feature-card,
.pricing-comment-card,
.footer-last a {
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease,
    transform 0.2s ease;
}

.pix-logo:hover {
  transform: translateY(-1px);
}

.pix-logo:hover .pix-log__txt {
  color: var(--primary-400);
}

.pix-head__nav-link:hover,
.pix-head__nav-link.is-active {
  color: var(--primary-400);
  background: rgba(99, 220, 79, 0.08);
}

.login-btn:hover {
  color: var(--primary-400);
}

.pink-btn,
.generate-btn,
.do-wf__btn,
.auth-button--primary {
  color: #071006;
  background: var(--primary-500);
  font-weight: 700;
}

.pink-btn:hover,
.generate-btn:hover,
.do-wf__btn:hover,
.auth-button--primary:hover {
  color: #020602;
  background: var(--primary-400);
  box-shadow: 0 0 0 3px rgba(99, 220, 79, 0.12), 0 8px 24px rgba(99, 220, 79, 0.18);
  transform: translateY(-1px);
}

.pink-btn:active,
.generate-btn:active,
.do-wf__btn:active,
.auth-button--primary:active {
  box-shadow: none;
  transform: translateY(0) scale(0.98);
}

.explore-media__collect {
  color: var(--primary-500);
}

.do-wf__item:hover {
  z-index: 2;
  border-color: rgba(99, 220, 79, 0.75);
  box-shadow: 0 0 0 1px rgba(99, 220, 79, 0.24), 0 10px 26px rgba(0, 0, 0, 0.55);
  transform: translateY(-2px);
}

.do-wf__item:hover img {
  filter: saturate(1.08) brightness(1.04);
  transform: scale(1.045);
}

.do-wf__item:hover .explore-media__title {
  color: var(--primary-400);
  transform: translateY(-2px);
}

.model-select:hover,
.setting-row:hover {
  border-color: rgba(99, 220, 79, 0.55);
  background: #242a22;
}

.change-template {
  color: #071006;
  background: var(--primary-500);
}

.change-template:hover {
  background: var(--primary-400);
  box-shadow: 0 5px 16px rgba(99, 220, 79, 0.22);
  transform: translateY(-1px);
}

.upload-zone {
  border-color: rgba(99, 220, 79, 0.55);
}

.upload-zone:hover {
  border-color: var(--primary-400);
  background: #1d241c;
  box-shadow: inset 0 0 0 1px rgba(99, 220, 79, 0.08);
}

.upload-zone:hover .upload-icon {
  color: var(--primary-400);
  transform: translateY(-3px);
}

.upload-icon {
  transition: color 0.2s ease, transform 0.2s ease;
}

.upload-icon::after,
.tip b {
  color: var(--primary-500);
}

.switch.is-on {
  background: var(--primary-500);
  box-shadow: 0 0 10px rgba(99, 220, 79, 0.26);
}

.template-choice:hover {
  border-color: rgba(99, 220, 79, 0.58);
  transform: translateY(-2px);
}

.template-choice.is-selected {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 2px rgba(99, 220, 79, 0.12);
}

.pix-select-option:hover,
.pix-select-option.is-selected {
  color: #fff;
  border-color: rgba(99, 220, 79, 0.55);
  background: rgba(99, 220, 79, 0.12);
}

.auth-field input:focus,
.template-search:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(99, 220, 79, 0.1);
}

.auth-switch button,
.auth-legal a,
.auth-forgot {
  color: var(--primary-500);
}

.auth-switch button:hover,
.auth-legal a:hover,
.auth-forgot:hover {
  color: var(--primary-400);
}

.detail-switch:hover,
.ico-close:hover {
  color: var(--primary-400);
}

.price-plan:hover,
.pricing-feature-card:hover,
.pricing-comment-card:hover {
  border-color: rgba(99, 220, 79, 0.42);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
  transform: translateY(-3px);
}

.price-plan.premium {
  border-color: rgba(99, 220, 79, 0.58);
  background:
    linear-gradient(180deg, rgba(99, 220, 79, 0.1), transparent 42%),
    rgba(23, 23, 23, 0.96);
}

.faq-card:hover {
  border-color: rgba(99, 220, 79, 0.42);
}

.faq-trigger,
.feature-icon {
  color: #071006;
  background: var(--primary-500);
}

.footer-last a:hover {
  color: var(--primary-400);
}

/* Terms of Service page */
.page-terms {
  min-height: calc(100vh - var(--header-height));
  padding: 48px 32px 64px;
  background: var(--bg-950);
}

.terms-card {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: 48px 56px 56px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: #0d0d0d;
}

.terms-head {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terms-head h1 {
  margin: 0 0 8px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(120deg, #00e676, #00bfa5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.terms-updated {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.terms-lead {
  margin: 0 0 32px;
  color: #d9d9de;
  font-size: 14px;
  line-height: 1.75;
}

.terms-section {
  margin-bottom: 30px;
}

.terms-section h2 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  color: #00e676;
  letter-spacing: -0.2px;
}

.terms-section p {
  margin: 0 0 12px;
  color: #b7b7bd;
  font-size: 14px;
  line-height: 1.75;
}

.terms-section ul {
  margin: 0 0 12px;
  padding-left: 22px;
  color: #b7b7bd;
  font-size: 14px;
  line-height: 1.75;
}

.terms-section li {
  margin-bottom: 4px;
}

.terms-contact {
  color: #d9d9de;
}

.terms-contact a {
  color: #00e676;
}

.terms-contact a:hover {
  text-decoration: underline;
}

@media (max-width: 720px) {
  .page-terms {
    padding: 24px 16px 40px;
  }

  .terms-card {
    padding: 28px 22px 36px;
  }

  .terms-head h1 {
    font-size: 26px;
  }
}
