* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #070909;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[v-cloak] {
  display: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.index-body {
  background:
    linear-gradient(145deg, rgba(102, 239, 245, 0.1), transparent 32%),
    linear-gradient(220deg, rgba(140, 101, 255, 0.1), transparent 38%),
    #070909;
}

.index-wrap {
  width: min(1280px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 38px 0 56px;
}

.index-hero {
  max-width: 760px;
  margin-bottom: 32px;
}

.eyebrow,
.frame-card-head p {
  margin: 0;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.index-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

.index-hero p:last-child {
  margin: 0;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.65;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
  gap: 24px;
}

.frame-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: var(--shadow-panel);
}

.frame-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.frame-card h2 {
  margin: 5px 0 0;
  font-size: 22px;
}

.frame-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--mint), var(--cyan-2));
  color: #061012;
  font-weight: 900;
}

.page-iframe {
  width: 100%;
  height: 880px;
  border: 0;
  border-radius: 22px;
  background: transparent;
}

.page-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--space-6);
}

.phone-frame {
  width: var(--screen-w);
  height: var(--screen-h);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 40px;
  background:
    radial-gradient(circle at 34% 0%, rgba(236, 72, 153, 0.2), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(56, 189, 248, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.72), transparent 28%),
    var(--bg);
  box-shadow: var(--shadow-phone);
}

.screen-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.screen-scroll::-webkit-scrollbar {
  display: none;
}

.screen-content {
  min-height: 100%;
  padding: 66px var(--space-5) 92px;
}

.screen-content.without-tabbar {
  padding-bottom: var(--space-6);
}

.status-bar {
  position: absolute;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px 0;
  color: #fff;
  font-size: var(--text-md);
  font-weight: 800;
  pointer-events: none;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-signal,
.status-wifi,
.status-battery {
  display: inline-block;
  background: rgba(255, 255, 255, 0.92);
}

.status-signal {
  width: 18px;
  height: 15px;
  clip-path: polygon(0 78%, 20% 78%, 20% 100%, 0 100%, 0 78%, 28% 58%, 48% 58%, 48% 100%, 28% 100%, 28% 58%, 56% 36%, 76% 36%, 76% 100%, 56% 100%, 56% 36%, 84% 14%, 100% 14%, 100% 100%, 84% 100%);
}

.status-wifi {
  width: 18px;
  height: 13px;
  clip-path: polygon(50% 100%, 34% 78%, 66% 78%, 50% 100%, 21% 64%, 8% 49%, 50% 20%, 92% 49%, 79% 64%, 50% 43%);
}

.status-battery {
  width: 25px;
  height: 13px;
  border-radius: 4px;
  position: relative;
}

.status-battery::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 4px;
  width: 2px;
  height: 5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.72);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.top-spacer {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 19px;
  font-weight: 900;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, var(--pink), var(--cyan-2));
  color: #071011;
  box-shadow: 0 10px 22px rgba(236, 72, 153, 0.22);
}

.icon-button,
.back-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.icon-button svg,
.back-button svg,
.nav-item svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.7;
}

.pill-button,
.primary-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--cyan-2));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.22);
  transition: filter var(--transition-fast), transform var(--transition-fast);
}

.pill-button {
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
}

.primary-button {
  width: 100%;
  min-height: 52px;
  font-size: var(--text-xl);
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin: var(--space-5) 0 var(--space-2);
}

.section-title-row h2,
.screen-title,
.create-title {
  margin: 0;
  color: var(--text);
  font-size: var(--text-2xl);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
}

.see-all {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--cyan);
  font-size: var(--text-sm);
  font-weight: 800;
}

.rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: var(--space-1);
  margin-right: calc(var(--space-5) * -1);
  scrollbar-width: none;
}

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

.template-card {
  flex: 0 0 124px;
  aspect-ratio: 9 / 16;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-card);
}

.template-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.template-card::after,
.small-template-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04) 0%, transparent 34%, rgba(0, 0, 0, 0.86));
  pointer-events: none;
}

.template-card h3 {
  position: absolute;
  z-index: 1;
  left: 10px;
  right: 10px;
  bottom: 10px;
  margin: 0;
  font-size: var(--text-md);
  line-height: 1.08;
}

.hero-card {
  margin-top: var(--space-6);
  min-height: 120px;
  position: relative;
  display: grid;
  align-content: end;
  gap: var(--space-3);
  padding: var(--space-5);
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.2);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.12)),
    linear-gradient(135deg, #172027, #245b61 52%, #7860b8);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.12));
}

.hero-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 220px;
  font-size: var(--text-lg);
  line-height: 1.22;
  font-weight: 800;
}

.hero-card .pill-button {
  position: relative;
  z-index: 1;
  width: fit-content;
}

.bottom-tabbar {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  overflow: visible;
  padding: 6px var(--space-5) 10px;
  border-top: 1px solid var(--line-strong);
  background: rgba(7, 9, 18, 0.96);
  box-shadow: 0 -14px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.nav-item {
  height: 52px;
  position: relative;
  display: grid;
  place-items: center;
  gap: var(--space-1);
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--text-xs);
  font-weight: 800;
}

.nav-item[data-tab="create"] {
  transform: translateY(-20px);
  color: rgba(255, 255, 255, 0.86);
}

.nav-item[data-tab="create"]::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(236, 72, 153, 0.96), rgba(56, 189, 248, 0.96));
  box-shadow: 0 14px 34px rgba(236, 72, 153, 0.34), 0 8px 22px rgba(56, 189, 248, 0.2);
  transform: translateX(-50%);
}

.nav-item[data-tab="create"] svg {
  position: relative;
  z-index: 1;
  width: 27px;
  height: 27px;
  margin-top: 4px;
  color: #fff;
}

.nav-item[data-tab="create"] span {
  position: absolute;
  z-index: 1;
  top: 61px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--pink);
}

.nav-item.active {
  background: transparent;
  color: var(--pink);
}

.nav-item.active:not([data-tab="create"])::before {
  content: "";
  position: absolute;
  top: 0;
  width: 26px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.nav-item[data-tab="create"].active::after {
  background: linear-gradient(135deg, var(--pink), var(--cyan-2));
  box-shadow: 0 18px 42px rgba(236, 72, 153, 0.42), 0 10px 24px rgba(56, 189, 248, 0.24);
}

.create-slide-page .screen-scroll {
  background:
    radial-gradient(circle at 28% 0%, rgba(236, 72, 153, 0.2), transparent 30%),
    radial-gradient(circle at 88% 6%, rgba(56, 189, 248, 0.16), transparent 30%),
    transparent;
}

.create-slide-page .screen-content {
  min-height: 100%;
  padding: 66px var(--space-5) 132px;
  animation: full-page-slide-in 380ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.create-full-page {
  min-height: 100%;
}

.create-full-page .generate-dock {
  position: absolute;
  left: var(--space-5);
  right: var(--space-5);
  bottom: var(--space-6);
  z-index: 20;
  margin-top: 0;
  padding-top: var(--space-4);
}

.create-full-page .generate-dock::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: calc(var(--space-5) * -1);
  right: calc(var(--space-5) * -1);
  bottom: calc(var(--space-6) * -1);
  height: 158px;
  background:
    linear-gradient(180deg, rgba(7, 9, 18, 0), rgba(7, 9, 18, 0.94) 34%, rgba(7, 9, 18, 0.98));
  pointer-events: none;
}

.create-top-row {
  margin-bottom: var(--space-3);
}

.create-type-tabs {
  flex: 1;
  min-width: 0;
  height: 38px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(7, 9, 18, 0.36);
}

.create-type-tabs button {
  min-width: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-2);
  font-size: var(--text-sm);
  font-weight: 900;
  white-space: nowrap;
}

.create-type-tabs button.active {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.96), rgba(56, 189, 248, 0.96));
  color: #fff;
  box-shadow: 0 8px 18px rgba(56, 189, 248, 0.18);
}

@keyframes full-page-slide-in {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin: var(--space-3) 0 var(--space-5);
}

.upload-card {
  min-height: 200px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(17, 24, 39, 0.76);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
}

.upload-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.upload-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.72));
}

.upload-card > span {
  position: relative;
  z-index: 1;
}

.upload-card svg {
  width: 28px;
  height: 28px;
  color: var(--text);
}

.upload-card strong {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-md);
}

.upload-card span {
  display: block;
  margin-top: var(--space-1);
  color: var(--text-soft);
  font-size: var(--text-xs);
  line-height: 1.35;
}

.small-template-card {
  flex: 0 0 82px;
  aspect-ratio: 9 / 16;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-card);
}

.small-template-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.duration {
  position: absolute;
  z-index: 1;
  top: var(--space-2);
  left: var(--space-2);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(7, 9, 18, 0.72);
  font-size: var(--text-xs);
  font-weight: 900;
}

.generate-dock {
  margin-top: var(--space-7);
  text-align: center;
}

.generate-dock.compact {
  margin-top: var(--space-6);
}

.generate-dock p {
  margin: 0 0 var(--space-3);
  color: var(--muted-2);
  font-size: var(--text-md);
  font-weight: 700;
}

.points-left {
  display: block;
  margin-top: var(--space-3);
  color: var(--muted-2);
  font-size: var(--text-md);
  font-weight: 800;
}

.segmented {
  display: flex;
  gap: var(--space-6);
  margin: var(--space-4) 0 0;
  padding-left: var(--space-4);
}

.segmented button {
  background: transparent;
  color: var(--text-soft);
  font-size: var(--text-lg);
  font-weight: 900;
}

.segmented button.active {
  color: var(--pink);
}

.empty-state {
  min-height: 390px;
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-state img {
  width: 154px;
  height: 122px;
  object-fit: contain;
  margin-bottom: var(--space-4);
  opacity: 0.94;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: var(--text-lg);
  font-weight: 800;
}

.settings-list,
.pro-banner {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  background: rgba(17, 24, 39, 0.66);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.pro-banner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5);
  margin: var(--space-5) 0 var(--space-4);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.96), rgba(56, 189, 248, 0.96));
  color: #071012;
  overflow: hidden;
  position: relative;
}

.pro-banner > div,
.pro-banner > svg {
  position: relative;
  z-index: 1;
}

.pro-banner img {
  position: absolute;
  right: 32px;
  bottom: -26px;
  width: 104px;
  height: 90px;
  object-fit: contain;
  opacity: 0.78;
}

.pro-banner h2 {
  margin: 0;
  font-size: var(--text-2xl);
  line-height: 1;
}

.pro-banner p {
  margin: var(--space-2) 0 0;
  color: rgba(7, 16, 18, 0.62);
  font-size: var(--text-md);
  font-weight: 900;
}

.settings-list {
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.settings-row {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 0 var(--space-5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: var(--text-md);
  font-weight: 900;
}

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

.settings-row span {
  color: var(--muted);
  font-size: var(--text-md);
}

.version-note {
  margin: var(--space-5) 0 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.24);
  font-weight: 800;
}

.upgrade-plan {
  min-height: 108px;
  padding: var(--space-5);
  margin-top: var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  background: rgba(17, 24, 39, 0.68);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
}

.upgrade-plan.featured {
  border-color: rgba(236, 72, 153, 0.55);
  background:
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.24), transparent 44%),
    rgba(236, 72, 153, 0.1);
}

.upgrade-plan img {
  position: absolute;
  right: var(--space-3);
  top: var(--space-3);
  width: 76px;
  height: 72px;
  object-fit: contain;
  opacity: 0.72;
}

.upgrade-plan h2,
.upgrade-plan p,
.upgrade-plan strong {
  position: relative;
  z-index: 1;
  max-width: 238px;
}

.upgrade-plan h2 {
  margin: 0;
  font-size: var(--text-lg);
}

.upgrade-plan p {
  margin: var(--space-2) 0 0;
  color: var(--muted-2);
  line-height: 1.45;
  font-size: var(--text-md);
}

.upgrade-plan strong {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--text-xl);
}

@media (hover: hover) {
  .icon-button:hover,
  .back-button:hover {
    border-color: rgba(103, 232, 249, 0.45);
    background: rgba(103, 232, 249, 0.09);
  }

  .pill-button:hover,
  .primary-button:hover {
    filter: brightness(1.05);
  }

  .template-card:hover,
  .small-template-card:hover,
  .upgrade-plan:hover,
  .settings-row:hover {
    border-color: rgba(103, 232, 249, 0.28);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .icon-button:active,
  .back-button:active,
  .pill-button:active,
  .primary-button:active,
  .template-card:active,
  .small-template-card:active {
    transform: scale(0.985);
  }
}

@media (max-width: 560px) {
  .index-wrap {
    width: min(100vw - 24px, 430px);
    padding-top: 24px;
  }

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

  .page-iframe {
    height: 852px;
  }
}
