:root {
    --ink: #eff6ff;
    --muted: #94a3b8;
    --panel: rgba(15, 27, 45, .76);
    --line: rgba(148, 163, 184, .16);
    --blue: #28a8ff;
    --violet: #7067ff;
    --pink: #e75fcb;
    --green: #43d99b;
    --danger: #ff8198;
    --bg: #07101d;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--ink); background: radial-gradient(circle at 50% -12%, #142b49 0, var(--bg) 38rem); font-family: Inter, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.page-glow { position: fixed; z-index: -1; width: 28rem; height: 28rem; border-radius: 50%; filter: blur(110px); opacity: .1; pointer-events: none; }
.page-glow--one { top: 28%; left: -14rem; background: var(--blue); }
.page-glow--two { right: -13rem; bottom: 4%; background: var(--violet); }

.site-header, .site-footer, .main-shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.site-header { min-height: 84px; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.brand { min-width: 0; display: inline-flex; align-items: center; gap: 12px; font-weight: 850; font-size: 21px; text-decoration: none; letter-spacing: -.7px; }
.brand > span:last-child span { color: var(--blue); }
.brand-mark { flex: 0 0 auto; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: white; background: linear-gradient(135deg, var(--blue), var(--violet)); box-shadow: 0 10px 30px rgba(40,168,255,.24); }
.brand-mark svg { width: 23px; }
.brand-logo { display: block; width: auto; max-width: min(240px, 54vw); height: auto; max-height: 48px; object-fit: contain; object-position: left center; }
.header-actions { display: flex; gap: 10px; align-items: center; }
.identity-pill { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: #cbd5e1; background: rgba(15,27,45,.45); font-size: 12px; text-decoration: none; }
.identity-pill span { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); vertical-align: 1px; }

.main-shell { padding: 78px 0 68px; }
.hero { width: min(900px, 100%); margin: 0 auto; text-align: center; }
.eyebrow { display: inline-flex; gap: 9px; align-items: center; margin-bottom: 18px; color: #62c1ff; font-size: 11px; font-weight: 800; letter-spacing: 2px; }
.eyebrow span { font-size: 8px; text-shadow: 0 0 9px var(--blue); }
.hero h1 { margin: 0; font-size: clamp(42px, 6vw, 70px); line-height: 1.06; letter-spacing: -3.8px; }
.hero h1 em { color: transparent; background: linear-gradient(90deg, #35b7ff, #8c72ff 55%, #f07bd6); background-clip: text; -webkit-background-clip: text; font-style: normal; }
.hero-copy { width: min(640px, 100%); margin: 20px auto 33px; color: var(--muted); font-size: 16px; line-height: 1.7; }

.notice { margin: 0 0 14px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; text-align: left; }
.notice--success { color: #8ce8be; border-color: rgba(67,217,155,.3); background: rgba(67,217,155,.08); }
.notice--error { color: #ff9caf; border-color: rgba(255,129,152,.3); background: rgba(255,129,152,.08); }
.shorten-card { padding: 14px; border: 1px solid rgba(91,163,223,.3); border-radius: 18px; background: rgba(13,25,42,.88); box-shadow: 0 24px 80px rgba(0,0,0,.35), inset 0 1px rgba(255,255,255,.03); text-align: left; backdrop-filter: blur(18px); }
.url-row { display: flex; gap: 10px; }
.url-field { min-width: 0; flex: 1; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(5,13,24,.75); transition: border .2s, box-shadow .2s; }
.url-field:focus-within { border-color: rgba(40,168,255,.65); box-shadow: 0 0 0 3px rgba(40,168,255,.1); }
.url-field svg { flex: 0 0 21px; color: #63758d; }
.url-field input { width: 100%; min-width: 0; border: 0; outline: 0; color: white; background: transparent; font-size: 15px; }
.url-field input::placeholder, .phone-field input::placeholder, .login-card input::placeholder { color: #607087; }
.primary-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 21px; border: 0; border-radius: 12px; color: white; background: linear-gradient(135deg, #219cf2, #596eee); font-weight: 800; text-decoration: none; box-shadow: 0 12px 25px rgba(48,120,237,.2); transition: transform .2s, filter .2s; }
.primary-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.primary-button svg { width: 18px; }
.url-row .primary-button { min-width: 180px; }

.identity-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 13px; padding: 14px; border-radius: 13px; background: rgba(5,13,24,.42); }
.phone-field { display: grid; gap: 7px; color: #c8d4e4; font-size: 12px; font-weight: 700; }
.phone-field small { color: #718299; font-weight: 500; }
.phone-field input, .login-card input { width: 100%; height: 42px; padding: 0 13px; outline: 0; border: 1px solid var(--line); border-radius: 9px; color: white; background: rgba(3,9,17,.62); }
.phone-field input:focus, .login-card input:focus { border-color: rgba(40,168,255,.6); }
.privacy-toggle { display: flex; gap: 11px; align-items: center; cursor: pointer; }
.privacy-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.privacy-toggle > span:first-of-type { position: relative; flex: 0 0 42px; width: 42px; height: 23px; border-radius: 999px; background: #26364a; transition: .2s; }
.privacy-toggle > span:first-of-type::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #91a1b5; transition: .2s; }
.privacy-toggle input:checked + span { background: var(--blue); }
.privacy-toggle input:checked + span::after { left: 22px; background: white; }
.privacy-toggle input:disabled + span { opacity: .42; }
.privacy-toggle > span:last-child { display: grid; gap: 3px; }
.privacy-toggle strong { color: #d8e2ef; font-size: 12px; }
.privacy-toggle small { color: #718299; font-size: 10px; }
.privacy-note { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 11px 0 0; color: #718299; font-size: 10px; }
.privacy-note svg { width: 13px; }
.created-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 15px; padding: 17px 18px; border: 1px solid rgba(67,217,155,.28); border-radius: 14px; background: rgba(67,217,155,.07); text-align: left; }
.created-card div { min-width: 0; display: grid; gap: 4px; }
.created-card span { color: #8ce8be; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }
.created-card strong { color: white; font-size: 16px; overflow-wrap: anywhere; }
.created-card small { overflow: hidden; color: #7e90a7; text-overflow: ellipsis; white-space: nowrap; }
.copy-button, [data-copy] { border: 1px solid rgba(40,168,255,.3); border-radius: 8px; color: #72caff; background: rgba(40,168,255,.08); }
.copy-button { flex: 0 0 auto; padding: 10px 14px; font-weight: 700; }

.rankings { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 82px; }
.ranking-card { min-width: 0; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 24px 60px rgba(0,0,0,.2); }
.section-heading, .section-heading > div { display: flex; align-items: center; justify-content: space-between; gap: 11px; }
.section-heading { padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.section-heading > span { color: #708198; font-size: 10px; }
.section-heading small { color: #52baff; font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.section-heading h2 { margin: 3px 0 0; font-size: 16px; }
.section-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-weight: 900; }
.section-icon--blue { color: #4bc0ff; background: rgba(40,168,255,.1); }
.section-icon--pink { color: #ed7dd8; background: rgba(231,95,203,.1); }
.link-list { display: grid; }
.link-item { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.link-item:last-child { border-bottom: 0; }
.link-main { min-width: 0; flex: 1; display: grid; gap: 5px; }
.original-link, .short-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.original-link { color: #cbd6e4; font-size: 12px; }
.original-link:hover { color: white; }
.short-link { color: #51baff; font-size: 11px; }
.link-meta { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; color: #718299; font-size: 9px; }
.link-meta strong { color: white; font-size: 14px; }
.link-meta button { width: 29px; height: 29px; padding: 0; }
.position { flex: 0 0 26px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: #9aa9bb; background: rgba(148,163,184,.08); font-size: 10px; font-weight: 800; }
.empty-state { width: 100%; margin: 0; padding: 26px 8px; color: #708198; font-size: 12px; text-align: center; }

.account-section { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; margin-top: 84px; padding: 46px; border: 1px solid var(--line); border-radius: 22px; background: rgba(13,25,42,.5); }
.account-copy h2, .dashboard-heading h2 { margin: 0; font-size: clamp(30px, 4vw, 44px); letter-spacing: -2px; line-height: 1.1; }
.account-copy > p { max-width: 550px; color: var(--muted); line-height: 1.7; }
.security-note { padding: 13px 15px; border-left: 3px solid var(--violet); color: #8798ae; background: rgba(112,103,255,.07); font-size: 11px; line-height: 1.55; }
.security-note strong { color: #b9b6ff; }
.login-card { display: grid; gap: 13px; padding: 25px; border: 1px solid var(--line); border-radius: 17px; background: rgba(5,13,24,.56); }
.login-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #8b84ff; background: rgba(112,103,255,.12); }
.login-card h2 { margin: 0; font-size: 19px; }
.login-card p, .login-card small { margin: 0; color: #718299; font-size: 11px; }
.login-card label { display: grid; gap: 6px; color: #bdcad9; font-size: 11px; font-weight: 700; }
.login-card .primary-button { width: 100%; }
.login-card > small { text-align: center; }

.account-section--dashboard { display: block; }
.dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 22px; }
.dashboard-heading .eyebrow { margin-bottom: 10px; }
.dashboard-heading p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.secondary-button { padding: 10px 14px; border: 1px solid var(--line); border-radius: 9px; color: #b7c4d4; background: transparent; }
.secondary-button:hover { color: white; border-color: rgba(255,255,255,.28); }
.personal-list { display: grid; gap: 9px; }
.personal-item { display: flex; align-items: center; gap: 18px; padding: 14px; border: 1px solid rgba(148,163,184,.1); border-radius: 12px; background: rgba(5,13,24,.42); }
.badges { display: flex; gap: 6px; margin-bottom: 2px; }
.badges span { padding: 3px 6px; border-radius: 5px; color: #8698ae; background: rgba(148,163,184,.08); font-size: 8px; text-transform: uppercase; letter-spacing: .5px; }
.personal-stats { flex: 0 0 auto; display: grid; grid-template-columns: auto auto; column-gap: 5px; align-items: baseline; color: #718299; font-size: 9px; text-align: right; }
.personal-stats strong { color: white; font-size: 18px; }
.personal-stats button { grid-column: 1 / -1; margin-top: 6px; padding: 6px 9px; font-size: 10px; }

.site-footer { display: flex; justify-content: space-between; padding: 25px 0 32px; border-top: 1px solid var(--line); color: #627288; font-size: 11px; }
.toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; transform: translateY(20px); padding: 11px 15px; border: 1px solid rgba(67,217,155,.3); border-radius: 10px; opacity: 0; color: #9aebc7; background: #10251f; font-size: 12px; pointer-events: none; transition: .2s; }
.toast.is-visible { transform: translateY(0); opacity: 1; }

.error-page { display: grid; place-items: center; text-align: center; }
.error-page main { width: min(430px, calc(100% - 32px)); padding: 38px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.error-page .brand-mark { margin: 0 auto; }
.error-page h1 { margin-bottom: 8px; }
.error-page p { margin: 0 0 24px; color: var(--muted); }

@media (max-width: 850px) {
    .rankings { grid-template-columns: 1fr; }
    .account-section { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 650px) {
    .site-header, .site-footer, .main-shell { width: min(100% - 24px, 1120px); }
    .site-header { height: 70px; }
    .identity-pill { padding: 8px 10px; font-size: 10px; }
    .main-shell { padding-top: 52px; }
    .hero h1 { letter-spacing: -2.5px; }
    .url-row { flex-direction: column; }
    .url-row .primary-button { min-height: 52px; }
    .identity-options { grid-template-columns: 1fr; }
    .privacy-note { align-items: flex-start; text-align: left; }
    .created-card { align-items: stretch; flex-direction: column; }
    .copy-button { width: 100%; }
    .rankings { margin-top: 55px; }
    .ranking-card { padding: 18px; }
    .link-item { align-items: flex-start; }
    .link-meta { flex-direction: column; }
    .account-section { margin-top: 55px; padding: 25px 18px; }
    .dashboard-heading { align-items: flex-start; flex-direction: column; }
    .personal-item { align-items: flex-start; }
    .site-footer { flex-direction: column; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
