:root {
  color-scheme: light;
  --ink: #0e1726;
  --muted: #5c6678;
  --soft: #eef3f8;
  --line: #dce4ee;
  --surface: #ffffff;
  --blue: #1769ff;
  --green: #0f9f7a;
  --amber: #c77813;
  --slate: #263445;
  --shadow: 0 24px 70px rgba(14, 23, 38, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: #f6f8fb;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(220, 228, 238, 0.86);
  display: flex;
  gap: 30px;
  height: 72px;
  justify-content: space-between;
  left: 0;
  padding: 0 7%;
  position: sticky;
  right: 0;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
}

.brand {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 11px;
  font-size: 21px;
  font-weight: 900;
  min-width: max-content;
}

.brand img {
  border-radius: 8px;
  height: 34px;
  width: 34px;
}

.top-nav {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 28px;
  justify-content: center;
}

.top-nav a {
  color: #29364a;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.account {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  min-width: 176px;
}

.account-card {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.account-name {
  color: #142033;
  font-size: 13px;
  font-weight: 900;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-quota {
  background: #edf4ff;
  border: 1px solid #cfdef4;
  border-radius: 999px;
  color: #175dd4;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
  white-space: nowrap;
}

.account-avatar-button {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(23, 105, 255, 0.16);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  color: var(--ink);
  display: inline-flex;
  gap: 9px;
  min-height: 46px;
  padding: 5px 12px 5px 5px;
}

.account-avatar {
  align-items: center;
  background: linear-gradient(135deg, #1769ff, #20c6dd);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 1000;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.account-avatar-meta {
  display: grid;
  gap: 1px;
  min-width: 0;
  text-align: left;
}

.account-avatar-meta .account-name {
  display: block;
}

.account-avatar-meta .account-quota {
  background: transparent;
  border: 0;
  color: #1769ff;
  font-size: 11px;
  padding: 0;
}

.account-panel-backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(8px);
  inset: 0;
  position: fixed;
  z-index: 58;
}

.account-panel {
  background: #ffffff;
  border: 1px solid rgba(20, 32, 51, 0.1);
  border-radius: 16px;
  bottom: auto;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  left: 50%;
  max-height: calc(100vh - 112px);
  max-height: calc(100dvh - 112px);
  overflow: hidden;
  position: fixed;
  top: max(88px, env(safe-area-inset-top));
  transform: translateX(-50%);
  width: min(390px, calc(100vw - 24px));
  z-index: 59;
}

.account-panel-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  display: inline-flex;
  font-size: 24px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  z-index: 2;
}

.account-panel-head {
  align-items: center;
  background: linear-gradient(135deg, #1769ff, #172033);
  color: #ffffff;
  display: grid;
  gap: 12px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  padding: 18px 48px 16px 16px;
}

.account-panel-avatar {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  display: inline-flex;
  font-size: 15px;
  font-weight: 1000;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.account-panel-user {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-panel-user strong,
.account-panel-user span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-panel-user span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.account-panel-balance {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 10px;
  text-align: right;
}

.account-panel-balance small {
  color: rgba(255, 255, 255, 0.68);
  display: block;
  font-size: 10px;
  font-weight: 800;
}

.account-panel-balance strong {
  display: block;
  font-size: 14px;
  margin-top: 2px;
}

.account-panel-tip {
  background: #e8f7ff;
  color: #0b6890;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  padding: 10px 16px;
}

.account-panel-body {
  display: grid;
  flex: 0 1 auto;
  gap: 14px;
  max-height: calc(100vh - 250px);
  max-height: calc(100dvh - 250px);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
}

.account-panel-links {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-panel-links a,
.account-panel-links button {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #263445;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
}

.account-panel-form {
  background: #f8fafc;
  border-radius: 14px;
  display: grid;
  gap: 9px;
  padding: 12px;
}

.account-panel-form label {
  color: #18263a;
  font-size: 13px;
  font-weight: 1000;
}

.account-panel-form p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}

.account-panel-form input {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  min-height: 42px;
  min-width: 0;
  padding: 0 12px;
}

.account-panel-row {
  display: flex;
  gap: 8px;
}

.account-panel-row input {
  flex: 1;
}

.account-panel-row button,
.account-panel-logout {
  border: 0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 1000;
  min-height: 42px;
  padding: 0 14px;
}

.account-panel-row button {
  background: #1769ff;
  color: #ffffff;
}

.account-panel-message {
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
  padding: 10px 12px;
}

.account-panel-message[data-type="info"] {
  background: #edf4ff;
  color: #175dd4;
}

.account-panel-message[data-type="success"] {
  background: #e8f8f0;
  color: #087047;
}

.account-panel-message[data-type="error"] {
  background: #fff0f0;
  color: #b42318;
}

.account-panel-logout {
  background: #fff0f0;
  color: #c52929;
  width: 100%;
}

.hero {
  min-height: 690px;
  overflow: hidden;
  position: relative;
}

.hero-bg-stack {
  inset: 0;
  position: absolute;
}

.hero-bg {
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center;
  position: absolute;
  width: 100%;
  opacity: 0;
  transform: scale(1.03);
  transition:
    opacity 700ms ease,
    transform 1000ms ease;
}

.hero-bg.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(7, 15, 28, 0.96) 0%, rgba(10, 25, 44, 0.86) 42%, rgba(10, 25, 44, 0.32) 75%, rgba(10, 25, 44, 0.16) 100%),
    linear-gradient(180deg, rgba(7, 15, 28, 0.22), rgba(7, 15, 28, 0.46));
  inset: 0;
  position: absolute;
}

.hero-content {
  color: #ffffff;
  max-width: 690px;
  padding: 92px 0 120px;
  position: relative;
  transform: translateX(10%);
  width: 52%;
  z-index: 1;
}

.eyebrow {
  color: #8bd3ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: #1769ff;
}

.hero h1 {
  font-size: 66px;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 0 0 24px;
}

.hero-lead {
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.9;
  margin: 0 0 34px;
  max-width: 620px;
}

.hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 38px;
}

.solid-button,
.outline-button,
.outline-link,
.text-button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
}

.solid-button {
  background: #1769ff;
  border: 1px solid #1769ff;
  box-shadow: 0 14px 32px rgba(23, 105, 255, 0.28);
  color: #ffffff;
}

.solid-button:hover {
  background: #0f58dc;
}

.solid-button.small {
  min-height: 38px;
  padding: 0 14px;
}

.solid-button.large,
.outline-button.large {
  min-height: 50px;
  padding: 0 24px;
}

.solid-button.full {
  width: 100%;
}

.outline-button,
.outline-link {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.44);
  color: #ffffff;
}

.outline-link {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.text-button,
.switch-auth,
.tool-tile {
  background: transparent;
  border: 0;
}

.text-button {
  color: #253248;
  min-height: 38px;
  padding: 0 8px;
}

.hero-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
}

.hero-metrics span {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.55;
  min-height: 82px;
  padding: 16px;
}

.hero-metrics strong {
  color: #ffffff;
  display: block;
  font-size: 15px;
  margin-bottom: 5px;
}

.hero-dots {
  bottom: 34px;
  display: flex;
  gap: 10px;
  left: 7%;
  position: absolute;
  z-index: 2;
}

.hero-dots button {
  background: rgba(255, 255, 255, 0.35);
  border: 0;
  border-radius: 999px;
  height: 10px;
  padding: 0;
  transition:
    background 180ms ease,
    width 180ms ease;
  width: 10px;
}

.hero-dots button.is-active {
  background: #ffffff;
  width: 28px;
}

.tool-band {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 34px 7%;
}

.tool-tile {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 4px 14px;
  grid-template-columns: 42px 1fr;
  min-height: 104px;
  padding: 18px;
  text-align: left;
}

.tool-tile:hover {
  border-color: #aac4f7;
  box-shadow: 0 16px 38px rgba(20, 32, 51, 0.08);
}

.tile-mark {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.tile-mark svg {
  fill: none;
  height: 23px;
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
  width: 23px;
}

.tile-mark.blue {
  background: linear-gradient(135deg, #1769ff, #8bd3ff);
}

.tile-mark.green {
  background: linear-gradient(135deg, #0f9f7a, #9be7cf);
}

.tile-mark.amber {
  background: linear-gradient(135deg, #c77813, #ffd08a);
}

.tile-mark.slate {
  background: linear-gradient(135deg, #263445, #7e8ca1);
}

.tool-tile strong {
  font-size: 17px;
}

.tool-tile small {
  color: var(--muted);
  font-size: 13px;
  grid-column: 2;
  line-height: 1.45;
}

.showcase,
.ad-gallery,
.workflow,
.studio-band,
.pricing {
  content-visibility: auto;
  contain-intrinsic-size: 1px 640px;
  padding-left: 7%;
  padding-right: 7%;
}

.showcase {
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(280px, 0.36fr) minmax(0, 0.64fr);
  padding-bottom: 62px;
  padding-top: 68px;
}

.section-copy {
  align-self: center;
}

.section-copy h2,
.studio-band h2,
.pricing h2,
.auth-panel h2 {
  font-size: 36px;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0 0 16px;
}

.section-copy p,
.studio-band p,
.pricing p,
.flow-grid p {
  color: var(--muted);
  line-height: 1.78;
  margin: 0;
}

.showcase-media {
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.showcase-media img {
  display: block;
  height: auto;
  width: 100%;
}

.ad-gallery {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(280px, 0.34fr) minmax(0, 0.66fr);
  padding-bottom: 72px;
  padding-top: 8px;
}

.ad-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ad-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  color: var(--ink);
  display: grid;
  gap: 12px;
  padding: 12px;
  text-align: left;
}

.ad-card img {
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.ad-card span {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.35;
}

.workflow {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  padding-bottom: 66px;
  padding-top: 66px;
}

.flow-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
}

.flow-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 210px;
  padding: 22px;
}

.flow-grid span {
  color: var(--blue);
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 16px;
}

.flow-grid strong {
  display: block;
  font-size: 20px;
  margin-bottom: 12px;
}

.studio-band {
  align-items: center;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 0.56fr) minmax(320px, 0.44fr);
  padding-bottom: 68px;
  padding-top: 68px;
}

.studio-band img {
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: block;
  height: auto;
  width: 100%;
}

.studio-band .solid-button {
  margin-top: 24px;
}

.pricing {
  align-items: center;
  background: #0e1726;
  color: #ffffff;
  display: flex;
  gap: 30px;
  justify-content: space-between;
  padding-bottom: 46px;
  padding-top: 46px;
}

.pricing p {
  color: rgba(255, 255, 255, 0.72);
  max-width: 720px;
}

.pricing-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
}

.site-footer {
  align-items: center;
  background: #ffffff;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  padding: 22px 7%;
}

.site-footer span {
  color: var(--ink);
  font-weight: 900;
}

.modal[hidden] {
  display: none;
}

.modal {
  inset: 0;
  position: fixed;
  z-index: 60;
}

.modal-backdrop {
  background: rgba(9, 15, 25, 0.54);
  inset: 0;
  position: absolute;
}

.auth-panel {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  left: 50%;
  max-width: 430px;
  padding: 30px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 36px);
}

.icon-close {
  align-items: center;
  background: #f2f5f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #2b3748;
  display: inline-flex;
  font-size: 24px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 34px;
}

.auth-panel form {
  display: grid;
  gap: 14px;
}

.auth-panel label {
  color: #263445;
  display: grid;
  font-size: 14px;
  font-weight: 900;
  gap: 8px;
}

.auth-panel input {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  min-height: 46px;
  padding: 0 12px;
  width: 100%;
}

.form-error {
  color: #b42318;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  min-height: 20px;
}

.switch-auth {
  color: var(--blue);
  display: block;
  font-weight: 900;
  margin: 16px auto 0;
}

body.auth-register .register-only {
  display: grid;
}

.register-only {
  display: none;
}

@media (max-width: 1080px) {
  .site-header {
    gap: 18px;
    padding-left: 22px;
    padding-right: 22px;
  }

  .top-nav {
    gap: 16px;
  }

  .hero-content {
    transform: translateX(22px);
    width: calc(100% - 44px);
  }

  .tool-band,
  .flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .showcase,
  .ad-gallery,
  .studio-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    height: auto;
    padding-bottom: 12px;
    padding-top: 12px;
  }

  .brand {
    min-width: 0;
  }

  .top-nav {
    order: 3;
    display: grid;
    flex: 0 0 100%;
    gap: 8px 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    padding-bottom: 2px;
    max-width: 100%;
    width: 100%;
  }

  .top-nav a {
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
  }

  .account {
    margin-left: auto;
    min-width: 0;
    width: auto;
    justify-content: flex-end;
    order: 2;
  }

  .account .text-button,
  .account .solid-button {
    min-height: 36px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .account-card {
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: auto;
  }

  .account-avatar-button {
    min-height: 42px;
    padding-right: 6px;
  }

  .account-avatar {
    height: 34px;
    width: 34px;
  }

  .account-avatar-meta {
    display: none;
  }

  .account-panel {
    bottom: max(10px, env(safe-area-inset-bottom));
    max-height: none;
    top: max(10px, env(safe-area-inset-top));
    transform: translateX(-50%);
    width: min(380px, calc(100vw - 20px));
  }

  .account-panel-body {
    flex: 1;
    max-height: none;
  }

  .account-panel-head {
    grid-template-columns: 44px minmax(0, 1fr);
    padding-right: 46px;
  }

  .account-panel-avatar {
    height: 44px;
    width: 44px;
  }

  .account-panel-balance {
    grid-column: 1 / -1;
    text-align: left;
  }

  .account-panel-links {
    grid-template-columns: 1fr;
  }

  .account-panel-row {
    flex-direction: column;
  }

  .hero {
    min-height: 500px;
  }

  .hero-content {
    padding-bottom: 40px;
    padding-top: 42px;
    transform: translateX(0);
    max-width: none;
    width: calc(100% - 28px);
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-lead {
    font-size: 15px;
    line-height: 1.7;
  }

  .hero-metrics {
    display: none;
  }

  .hero-metrics,
  .tool-band,
  .flow-grid,
  .ad-grid {
    grid-template-columns: 1fr;
  }

  .hero-dots {
    bottom: 22px;
    left: 18px;
  }

  .showcase,
  .ad-gallery,
  .workflow,
  .studio-band,
  .pricing {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-copy h2,
  .studio-band h2,
  .pricing h2,
  .auth-panel h2 {
    font-size: 30px;
  }

  .pricing {
    align-items: stretch;
    flex-direction: column;
  }

  .pricing-actions {
    flex-direction: column;
    width: 100%;
  }

  .pricing-actions .solid-button,
  .pricing-actions .outline-link {
    width: 100%;
  }

  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
}
