:root {
  font-family: "DM Sans", "Noto Sans SC", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #edf0f2;
  background: #101419;
  font-synthesis: none;
  color-scheme: dark;
  --bg: #101419;
  --panel: #171d23;
  --panel-soft: #1c232a;
  --line: #2a343c;
  --muted: #82909a;
  --muted-strong: #aeb9bf;
  --accent: #b4edff;
  --accent-deep: #73c7df;
  --warm: #f2c987;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100%; margin: 0; background: var(--bg); }
body::before { content: ""; position: fixed; z-index: -1; inset: 0; pointer-events: none; background: radial-gradient(circle at 76% 39%, #2043512b, transparent 31%), radial-gradient(circle at 13% 78%, #5d412118, transparent 26%); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.app-shell { width: min(1240px, calc(100% - 64px)); min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 90px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #f2f6f7; text-decoration: none; }
.brand-mark { width: 31px; height: 31px; display: flex; align-items: center; justify-content: center; gap: 3px; border: 1px solid #40505a; border-radius: 10px; background: #202a31; box-shadow: 0 8px 22px #07101666; }
.brand-mark i { display: block; width: 4px; border-radius: 4px; background: var(--accent); }
.brand-mark i:nth-child(1) { height: 8px; opacity: .48; }
.brand-mark i:nth-child(2) { height: 13px; opacity: .74; }
.brand-mark i:nth-child(3) { height: 17px; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: -.07em; }
.brand-name em { color: #64737c; font-style: normal; font-weight: 500; }
.topbar-meta { display: flex; align-items: center; gap: 24px; color: #6f7d85; font-size: 10px; letter-spacing: .15em; }
.desktop-badge { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid #33414a; border-radius: 30px; color: #abb8bd; letter-spacing: .02em; }
.status-dot, .footer-live i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #9ee29c; box-shadow: 0 0 0 4px #9ee29c17; }

.workspace { flex: 1; display: grid; grid-template-columns: minmax(320px, .87fr) minmax(500px, 1.13fr); gap: clamp(60px, 9vw, 130px); align-items: center; padding: 65px 0 55px; }
.intro-column { padding-bottom: 4px; }
.eyebrow { margin: 0 0 17px; color: #7d8b94; font-size: 10px; font-weight: 850; letter-spacing: .21em; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 560px; margin-bottom: 22px; color: #f3f6f6; font-size: clamp(48px, 5.3vw, 76px); line-height: 1.06; letter-spacing: -.09em; font-weight: 850; }
h1 span { color: #9cb4bc; }
.intro-copy { max-width: 455px; margin-bottom: 29px; color: var(--muted); font-size: 14px; line-height: 1.95; }

.url-card { max-width: 500px; padding: 20px; border: 1px solid #2b3841; border-radius: 15px; background: #171e24cc; box-shadow: 0 20px 65px #05080c2e; }
.url-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 11px; color: #dce5e7; font-size: 12px; font-weight: 750; }
.secure-label { display: inline-flex; align-items: center; gap: 5px; color: #71818a; font-size: 9px; font-weight: 600; letter-spacing: .1em; }
.lock-icon { color: #99d8e8; font-size: 15px; line-height: 0; transform: rotate(-45deg); }
.url-input-wrap { display: flex; align-items: center; min-height: 51px; padding: 0 12px; border: 1px solid #41515a; border-radius: 10px; background: #0e1419; transition: border-color .2s, box-shadow .2s; }
.url-input-wrap:focus-within { border-color: var(--accent-deep); box-shadow: 0 0 0 3px #73c7df1b; }
.url-prefix { margin-right: 9px; color: var(--accent); font-size: 18px; }
.url-input-wrap input { width: 100%; min-width: 0; border: 0; outline: 0; color: #f1f6f7; background: transparent; font-size: 14px; }
.clear-button { width: 25px; height: 25px; flex: 0 0 auto; border: 0; border-radius: 50%; color: #73818a; background: transparent; font-size: 20px; line-height: 1; }
.clear-button:hover { color: #e4eff2; background: #ffffff12; }
.url-help { margin: 10px 2px 0; color: #6f7e87; font-size: 10px; line-height: 1.6; }
.url-error { margin: 10px 2px 0; color: #f3a597; font-size: 11px; }
.url-actions { display: flex; align-items: center; gap: 15px; margin-top: 17px; }
.primary-button { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-width: 145px; padding: 12px 14px 12px 16px; border: 0; border-radius: 8px; color: #10171b; background: var(--accent); box-shadow: 0 9px 23px #72c8df1c; font-size: 12px; font-weight: 850; transition: transform .2s, background .2s, box-shadow .2s; }
.primary-button:hover { background: #d6f7ff; box-shadow: 0 12px 28px #72c8df36; transform: translateY(-2px); }
.primary-button strong { font-size: 17px; line-height: .8; }
.text-button { padding: 8px 0; border: 0; color: #87969e; background: transparent; font-size: 11px; }
.text-button:hover { color: #d4e6eb; }

.tips-row { display: flex; align-items: flex-start; gap: 12px; max-width: 450px; margin-top: 30px; color: #75848c; }
.tip-icon { width: 25px; height: 25px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #46545d; border-radius: 7px; color: var(--warm); font-size: 13px; }
.tips-row p { margin: 0; font-size: 10px; line-height: 1.7; }
.tips-row strong { color: #b4c1c5; font-weight: 750; }

.preview-column { min-width: 0; }
.preview-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 0 auto 18px; width: min(100%, 610px); }
.preview-heading .eyebrow { margin-bottom: 7px; }
h2 { margin: 0; color: #eaf0f1; font-size: 26px; letter-spacing: -.07em; }
.preview-status { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid #2f3d45; border-radius: 20px; color: #7f9097; font-size: 10px; white-space: nowrap; }
.preview-status span { width: 6px; height: 6px; border-radius: 50%; background: #798990; }
.preview-status.is-loading span { background: var(--warm); box-shadow: 0 0 0 4px #f2c98718; animation: pulse 1s infinite; }
.preview-status.is-ready span { background: #9ee29c; box-shadow: 0 0 0 4px #9ee29c17; }
@keyframes pulse { 50% { opacity: .35; } }

.device-area { position: relative; min-height: clamp(625px, calc(100vh - 180px), 850px); display: grid; place-items: center; }
.device-shadow { position: absolute; left: 50%; bottom: 15px; width: 265px; height: 37px; border-radius: 50%; background: #0000008c; filter: blur(23px); transform: translateX(-50%); }
.phone { --screen-width: clamp(285px, 38vw, 375px); --screen-height: calc(var(--screen-width) * 2.165333); position: relative; z-index: 1; width: calc(var(--screen-width) + 18px); height: calc(var(--screen-height) + 18px); padding: 8px; border: 1px solid #53616a; border-radius: 48px; background: linear-gradient(145deg, #41505a, #151c22 33%, #090d11 75%); box-shadow: 0 29px 50px #0009, inset 2px 2px 2px #9baeb733, inset -2px -2px 2px #000; transform: rotate(1.5deg); transition: transform .3s ease; }
.phone:hover { transform: rotate(0deg) translateY(-4px); }
.phone::before { content: ""; position: absolute; left: -4px; top: 137px; width: 3px; height: 55px; border: 1px solid #66777e; border-right: 0; border-radius: 3px 0 0 3px; background: #27333a; }
.phone-side-button { position: absolute; right: -4px; width: 3px; border: 1px solid #687780; border-left: 0; border-radius: 0 4px 4px 0; background: #253038; }
.phone-side-button-one { top: 153px; height: 39px; }
.phone-side-button-two { top: 204px; height: 67px; }
.phone-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border: 2px solid #030608; border-radius: 35px; background: #f4f7f8; }
.phone-island { position: absolute; z-index: 5; top: 9px; left: 50%; width: 93px; height: 27px; border-radius: 20px; background: #050709; transform: translateX(-50%); }
.phone-island span { position: absolute; right: 17px; top: 8px; width: 9px; height: 9px; border: 2px solid #222c31; border-radius: 50%; background: #0b0e10; }
.phone-statusbar { position: relative; z-index: 4; height: 39px; display: flex; align-items: center; justify-content: space-between; padding: 4px 19px 0; color: #142027; background: #f7fafb; font-size: 10px; font-weight: 750; }
.phone-status-icons { display: flex; align-items: center; gap: 5px; }
.phone-status-icons i { display: block; width: 10px; height: 7px; border: 1px solid #17252d; border-radius: 2px; transform: skewX(-16deg); }
.phone-status-icons i:nth-child(2) { width: 8px; border-radius: 50%; }
.phone-status-icons b { display: block; width: 16px; height: 8px; border: 1px solid #17252d; border-radius: 3px; position: relative; }
.phone-status-icons b::after { content: ""; position: absolute; right: -3px; top: 2px; width: 2px; height: 3px; border-radius: 0 2px 2px 0; background: #17252d; }
.browser-toolbar { position: relative; z-index: 4; display: grid; grid-template-columns: 28px minmax(0, 1fr) 28px 28px; align-items: center; gap: 5px; padding: 6px 11px 8px; border-bottom: 1px solid #d7e0e3; background: #f7fafb; }
.toolbar-button { width: 27px; height: 27px; padding: 0; border: 0; border-radius: 7px; color: #52636c; background: transparent; font-size: 19px; line-height: 1; }
.toolbar-button:hover { color: #18272f; background: #e4edf0; }
.toolbar-button.open-button { color: #197c98; font-size: 15px; font-weight: 800; }
.mini-address { min-width: 0; overflow: hidden; padding: 7px 10px; border: 1px solid #d4e0e3; border-radius: 8px; color: #6f8188; background: #edf3f5; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.frame-wrap { position: absolute; inset: 92px 0 25px; overflow: hidden; background: #fff; }
#phoneFrame { width: 100%; height: 100%; display: block; border: 0; background: #fff; }
.frame-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; color: #4e6872; background: #f6fafb; text-align: center; transition: opacity .3s, visibility .3s; }
.frame-placeholder.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.placeholder-orbit { position: relative; width: 55px; height: 55px; margin-bottom: 23px; border: 1px solid #b4d6df; border-radius: 50%; }
.placeholder-orbit::before, .placeholder-orbit::after { content: ""; position: absolute; inset: 9px; border: 1px solid #b4d6df; border-radius: 50%; transform: rotate(45deg); }
.placeholder-orbit::after { inset: 17px; border-color: #6fbdcf; }
.placeholder-orbit span { position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: #6fbdcf; box-shadow: 0 0 11px #6fbdcf; transform: translateX(-50%); animation: orbit 1.6s linear infinite; }
@keyframes orbit { to { transform: translateX(-50%) rotate(360deg) translateX(24px) rotate(-360deg); } }
.frame-placeholder strong { color: #2e525d; font-size: 13px; }
.frame-placeholder p { max-width: 190px; margin: 8px 0 0; color: #8299a1; font-size: 10px; line-height: 1.6; word-break: break-word; }
.phone-home-indicator { position: absolute; z-index: 6; bottom: 7px; left: 50%; width: 92px; height: 4px; border-radius: 3px; background: #1d2529; transform: translateX(-50%); }
.preview-footer { display: flex; justify-content: space-between; width: min(100%, 610px); margin: 13px auto 0; color: #697a83; font-size: 10px; }
.footer-live { display: inline-flex; align-items: center; gap: 8px; color: #8ca4aa; }

.page-footer { display: flex; justify-content: space-between; gap: 20px; padding: 21px 0 29px; border-top: 1px solid var(--line); color: #64727a; font-size: 10px; }

@media (max-width: 980px) {
  .app-shell { width: min(800px, calc(100% - 42px)); }
  .workspace { grid-template-columns: 1fr; gap: 56px; padding-top: 50px; }
  .intro-column { max-width: 640px; margin: 0 auto; width: 100%; }
  .preview-column { width: 100%; max-width: 640px; margin: 0 auto; }
  h1 { font-size: clamp(48px, 9vw, 72px); }
  .device-area { min-height: 680px; }
}

@media (max-width: 580px) {
  .app-shell { width: calc(100% - 28px); }
  .topbar { height: 72px; }
  .topbar-meta { gap: 0; }
  .topbar-version { display: none; }
  .desktop-badge { padding: 8px 9px; font-size: 9px; }
  .workspace { gap: 43px; padding: 40px 0 42px; }
  h1 { font-size: 47px; }
  .intro-copy { font-size: 13px; }
  .url-card { padding: 16px; }
  .url-card-head { align-items: flex-start; flex-direction: column; gap: 7px; }
  .url-actions { justify-content: space-between; }
  .tips-row { margin-top: 23px; }
  .preview-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .phone { --screen-width: clamp(260px, calc(100vw - 48px), 375px); --screen-height: calc(var(--screen-width) * 2.165333); border-radius: 42px; }
  .phone-screen { border-radius: 32px; }
  .device-area { min-height: 620px; }
  .preview-footer { gap: 10px; font-size: 9px; }
  .page-footer { flex-wrap: wrap; line-height: 1.5; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
