:root {
    --blue: #0071e3;
    --blue-dark: #0066cc;
    --ink: #1d1d1f;
    --muted: #6e6e73;
    --soft: #f5f5f7;
    --card: rgba(255, 255, 255, .84);
    --line: #d2d2d7;
    --green: #248a3d;
    --red: #c93434;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--soft);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    background: radial-gradient(circle at 50% -10%, rgba(255, 255, 255, .95), transparent 48%), linear-gradient(180deg, #f5f5f7 0%, #eef0f4 100%);
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(32px, 6vw, 52px); letter-spacing: -.055em; line-height: 1.08; }
h2 { margin: 6px 0 0; font-size: 22px; letter-spacing: -.035em; }

.landing-shell, .auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.redirect-card, .auth-card, .settings-card, .security-card {
    border: 1px solid rgba(255,255,255,.7);
    background: var(--card);
    box-shadow: 0 20px 55px rgba(50, 50, 70, .1), 0 2px 8px rgba(50, 50, 70, .04);
    backdrop-filter: blur(25px);
}
.redirect-card { width: min(100%, 500px); padding: 55px 48px 39px; border-radius: 34px; text-align: center; }
.brand-mark { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 28px; border-radius: 22px; color: #fff; font-size: 32px; background: linear-gradient(145deg, #3298ff, var(--blue)); box-shadow: 0 12px 25px rgba(0,113,227,.24); }
.brand-mark.small { display: inline-grid; width: 32px; height: 32px; margin: 0 9px 0 0; border-radius: 10px; font-size: 16px; vertical-align: middle; }
.brand-row { display: flex; align-items: center; margin-bottom: 35px; color: #515154; font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.eyebrow, .panel-kicker { color: #86868b; font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.redirect-card > p, .muted { color: var(--muted); line-height: 1.65; }
.redirect-card > p { margin-bottom: 32px; }
.progress-track { height: 5px; margin: 17px 0 12px; overflow: hidden; border-radius: 10px; background: #e5e5ea; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width 1s linear; }
.redirect-meta { display: flex; justify-content: space-between; color: #86868b; font-size: 12px; }
.redirect-meta strong { color: var(--ink); font-size: 14px; }
.target-hint { margin: 20px 0 0 !important; color: #86868b !important; font-size: 12px; }
.target-hint span { color: #515154; }
.primary-button, .secondary-button, .ghost-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 0; border-radius: 14px; text-decoration: none; font-weight: 650; cursor: pointer; transition: transform .2s, background .2s, box-shadow .2s; }
.primary-button { width: 100%; margin-top: 27px; color: #fff; background: var(--blue); box-shadow: 0 8px 16px rgba(0,113,227,.2); }
.primary-button:hover { background: var(--blue-dark); box-shadow: 0 11px 20px rgba(0,113,227,.25); }
.secondary-button { color: var(--blue); background: #e8f2ff; }
.ghost-button { min-height: 39px; color: #424245; background: rgba(255,255,255,.68); border: 1px solid var(--line); font-size: 13px; }
.primary-button:hover, .secondary-button:hover, .ghost-button:hover { transform: translateY(-1px); }
.align-start { width: auto; margin-top: 4px; }
.landing-footer { position: fixed; right: 0; bottom: 26px; left: 0; color: #86868b; text-align: center; font-size: 12px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; padding: 22px; background: rgba(245,245,247,.84); backdrop-filter: blur(22px); }
.modal-backdrop[hidden] { display: none; }
.browser-modal { width: min(100%, 430px); padding: 39px 32px 31px; border: 1px solid rgba(255,255,255,.8); border-radius: 30px; background: rgba(255,255,255,.96); box-shadow: 0 26px 80px rgba(50,50,70,.18); text-align: left; }
.modal-icon { display: grid; place-items: center; width: 49px; height: 49px; margin-bottom: 20px; border-radius: 16px; color: #fff; background: var(--blue); font-size: 23px; box-shadow: 0 8px 17px rgba(0,113,227,.22); }
.browser-modal h2 { margin: 9px 0 9px; font-size: 29px; }
.browser-modal p { color: var(--muted); line-height: 1.7; }
.detected-app { margin-bottom: 7px !important; color: #515154 !important; font-size: 13px; }
.detected-app strong { color: var(--blue); }
.browser-steps { display: grid; grid-template-columns: 38px 1fr; gap: 13px 9px; margin: 22px 0; color: #424245; font-size: 13px; }
.browser-steps span:nth-child(odd) { color: var(--blue); font-weight: 700; }
.browser-modal .secondary-button { width: 100%; }
.copy-feedback { min-height: 18px; margin-top: 10px; color: var(--green); text-align: center; font-size: 12px; }
.modal-open { overflow: hidden; }

.auth-shell { padding-top: 42px; padding-bottom: 42px; }
.auth-card { width: min(100%, 420px); padding: 34px; border-radius: 28px; }
.auth-card h1 { margin-bottom: 9px; font-size: 38px; }
.stack-form { display: grid; gap: 17px; }
label { display: grid; gap: 8px; color: #424245; font-size: 13px; font-weight: 600; }
input, textarea { width: 100%; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; outline: 0; color: var(--ink); background: rgba(255,255,255,.76); transition: border-color .2s, box-shadow .2s, background .2s; }
input { min-height: 47px; }
textarea { min-height: 86px; padding-top: 12px; padding-bottom: 12px; resize: vertical; line-height: 1.55; }
input:focus, textarea:focus { border-color: #75b9ff; background: #fff; box-shadow: 0 0 0 4px rgba(0,113,227,.12); }
.captcha-row { display: grid; grid-template-columns: 1fr 108px; gap: 10px; }
.captcha-code { display: grid; place-items: center; min-height: 47px; border: 1px dashed #8dbff0; border-radius: 12px; color: var(--blue); font: 750 18px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .15em; text-decoration: none; background: #edf6ff; }
.notice { margin: 0 0 22px; padding: 13px 15px; border-radius: 13px; font-size: 13px; line-height: 1.55; }
.notice.error { color: var(--red); background: #fff0f0; }
.notice.success { color: var(--green); background: #eefaf1; }

.dashboard-shell { width: min(100%, 980px); margin: 0 auto; padding: 54px 22px 60px; }
.dashboard-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.dashboard-header h1 { margin: 8px 0 4px; font-size: clamp(34px, 5vw, 47px); }
.dashboard-header p { margin-bottom: 0; }
.settings-card, .security-card { margin-bottom: 16px; padding: 27px; border-radius: 24px; }
.settings-card-hero { padding-bottom: 30px; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 23px; }
.section-heading > div:first-child { display: flex; align-items: start; gap: 14px; }
.section-index { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: var(--blue); background: #e8f2ff; font-size: 11px; font-weight: 750; }
.status-pill { padding: 7px 10px; border-radius: 99px; color: var(--green); background: #ecf8ef; font-size: 11px; font-weight: 700; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 16px; }
.field-wide { grid-column: 1 / -1; }
.master-switch, .app-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; }
.master-switch { margin-bottom: 16px; padding: 17px; border: 1px solid #e4e4e7; border-radius: 15px; background: #fafafa; }
.master-switch strong, .app-copy strong { display: block; color: #1d1d1f; }
.master-switch small, .app-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.45; }
.switch-ui { position: relative; display: block; width: 49px; height: 29px; border-radius: 99px; background: #d2d2d7; cursor: pointer; transition: .2s; }
.switch-ui::after { position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; content: ""; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .2s; }
.master-switch input, .app-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.master-switch input:checked + .switch-ui, .app-row input:checked + .switch-ui { background: #34c759; }
.master-switch input:checked + .switch-ui::after, .app-row input:checked + .switch-ui::after { transform: translateX(20px); }
.app-list { display: grid; gap: 1px; overflow: hidden; border: 1px solid #e4e4e7; border-radius: 15px; }
.app-row { grid-template-columns: 40px 1fr auto; padding: 13px 15px; background: rgba(250,250,250,.75); }
.app-row + .app-row { border-top: 1px solid #e4e4e7; }
.app-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: #fff; font-weight: 750; }
.app-wechat { background: #34c759; }
.app-douyin { background: #111; }
.app-qq { background: #4d8dff; }
.app-xiaohongshu { background: #ff365c; }
.app-kuaishou { background: #ff7a00; }
.mandatory-note { display: flex; align-items: center; gap: 8px; margin-top: 17px; color: #6e6e73; font-size: 12px; }
.mandatory-note span { color: var(--blue); font-size: 18px; }
.form-actions { display: flex; justify-content: end; margin: 21px 0 36px; }
.save-button { width: auto; min-width: 180px; margin: 0; }
.password-grid { align-items: end; }
.password-grid .secondary-button { width: auto; min-height: 47px; }
.info-strip { display: flex; gap: 10px; align-items: center; color: #6e6e73; font-size: 12px; }
.info-icon { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; color: var(--blue); background: #e8f2ff; font-size: 13px; font-weight: 750; }

@media (max-width: 680px) {
    .redirect-card { padding: 45px 25px 33px; }
    .dashboard-shell { padding: 34px 15px 45px; }
    .dashboard-header { align-items: start; flex-direction: column; }
    .settings-card, .security-card { padding: 21px 17px; border-radius: 20px; }
    .field-grid { grid-template-columns: 1fr; }
    .field-wide { grid-column: auto; }
    .password-grid .secondary-button { width: 100%; }
    .form-actions { margin-top: 15px; }
    .save-button { width: 100%; }
    .browser-modal { padding: 32px 23px 25px; }
}
