#line-detect {
    --ld-bg-1: #f2f7ff;
    --ld-bg-2: #e2edff;
    --ld-card: #ffffff;
    --ld-primary: #2f7bff;
    --ld-primary-deep: #1f5edb;
    --ld-text: #14243f;
    --ld-muted: #5d708f;
    --ld-line: rgba(47, 123, 255, .14);
    --ld-ok: #16a37a;
    --ld-shadow: 0 24px 60px rgba(31, 94, 219, .16);
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 24px 16px;
    overflow: auto;
    background:
        radial-gradient(900px 480px at 15% -10%, rgba(98, 183, 255, .35), transparent 60%),
        radial-gradient(800px 460px at 90% 110%, rgba(47, 123, 255, .22), transparent 55%),
        linear-gradient(170deg, var(--ld-bg-1), var(--ld-bg-2));
    color: var(--ld-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
#line-detect.line-detect-hidden { display: none !important; }
#line-detect * { margin: 0; padding: 0; box-sizing: border-box; }
#line-detect .line-stage { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; }
#line-detect .security-card {
    background: var(--ld-card);
    border: 1px solid var(--ld-line);
    border-radius: 22px;
    padding: 30px 26px 26px;
    box-shadow: var(--ld-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
}
#line-detect .security-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(47, 123, 255, .09);
    border: 1px solid var(--ld-line);
    color: var(--ld-primary-deep);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}
#line-detect .security-eyebrow i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ld-ok);
    box-shadow: 0 0 0 3px rgba(22, 163, 122, .18);
    animation: ld-pulse 1.6s ease-in-out infinite;
}
@keyframes ld-pulse { 50% { opacity: .45; } }
#line-detect #security-title { margin-top: 16px; font-size: 24px; font-weight: 800; letter-spacing: 1px; }
#line-detect .security-subtitle { margin-top: 8px; font-size: 13px; color: var(--ld-muted); text-align: center; }
#line-detect .scan-orbit {
    position: relative;
    width: 138px;
    height: 138px;
    margin: 24px 0 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
#line-detect .scan-orbit::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px dashed rgba(47, 123, 255, .4);
    animation: ld-orbit 6s linear infinite;
}
#line-detect .scan-orbit::after {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    border: 2px solid rgba(47, 123, 255, .18);
    border-top-color: var(--ld-primary);
    animation: ld-orbit 1.1s linear infinite;
}
@keyframes ld-orbit { to { transform: rotate(360deg); } }
#line-detect .scan-ring-secondary {
    position: absolute;
    inset: 26px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(47, 123, 255, .10), transparent);
}
#line-detect .scan-core {
    position: relative;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff, #eef4ff);
    border: 1px solid var(--ld-line);
    box-shadow: inset 0 2px 8px rgba(31, 94, 219, .08), 0 8px 20px rgba(31, 94, 219, .14);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}
#line-detect .scan-core strong {
    font-size: 34px;
    font-weight: 800;
    color: var(--ld-primary);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
#line-detect .scan-core small { font-size: 10px; font-weight: 800; letter-spacing: 3px; color: var(--ld-muted); }
#line-detect .connection-state {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ld-muted);
    min-height: 20px;
}
#line-detect .state-orb {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--ld-primary);
    box-shadow: 0 0 0 3px rgba(47, 123, 255, .16);
    animation: ld-pulse 1.2s ease-in-out infinite;
    flex-shrink: 0;
}
#line-detect .scan-steps {
    list-style: none;
    display: flex;
    gap: 8px;
    width: 100%;
    margin-top: 20px;
}
#line-detect .scan-steps li {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 0;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
    color: var(--ld-muted);
    background: rgba(93, 112, 143, .08);
    transition: all .25s ease;
    white-space: nowrap;
}
#line-detect .scan-steps li i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }
#line-detect .scan-steps li.is-active { color: var(--ld-primary-deep); background: rgba(47, 123, 255, .12); }
#line-detect .scan-steps li.is-active i { background: var(--ld-primary); opacity: 1; box-shadow: 0 0 0 3px rgba(47, 123, 255, .18); }
#line-detect .scan-steps li.is-done { color: var(--ld-ok); background: rgba(22, 163, 122, .10); }
#line-detect .scan-steps li.is-done i { background: var(--ld-ok); opacity: 1; }
#line-detect .film-timeline {
    width: 100%;
    height: 6px;
    margin-top: 20px;
    border-radius: 999px;
    background: rgba(47, 123, 255, .12);
    overflow: hidden;
}
#line-detect #ld-film-progress {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ld-primary), #62b7ff);
    transition: width .45s ease;
}
#line-detect .auto-hint { margin-top: 14px; font-size: 12px; color: var(--ld-muted); }
#line-detect .fault-state {
    background: var(--ld-card);
    border: 1px solid rgba(227, 75, 100, .25);
    border-radius: 22px;
    padding: 28px 26px;
    box-shadow: var(--ld-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}
#line-detect .fault-state strong { font-size: 17px; font-weight: 800; }
#line-detect .fault-state > span { font-size: 13px; color: var(--ld-muted); }
#line-detect #ld-retry-button,
#line-detect .line-enter-btn {
    margin-top: 12px;
    padding: 10px 34px;
    border: none;
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
#line-detect #ld-retry-button {
    background: linear-gradient(90deg, var(--ld-primary), #62b7ff);
    box-shadow: 0 8px 20px rgba(47, 123, 255, .3);
}
#line-detect #ld-retry-button:active { transform: scale(.97); }
#line-detect .line-enter-btn {
    background: rgba(93, 112, 143, .14);
    color: var(--ld-primary-deep);
    box-shadow: none;
}
#line-detect .fault-lines {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 14px;
}
#line-detect .fault-lines a {
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid var(--ld-line);
    background: rgba(47, 123, 255, .07);
    color: var(--ld-primary-deep);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
#line-detect .line-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
    color: var(--ld-muted);
}
#line-detect .line-footer i { width: 4px; height: 4px; border-radius: 50%; background: rgba(93, 112, 143, .45); }
#line-detect .screen-reader-status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
#line-detect [hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
    #line-detect .scan-orbit::before,
    #line-detect .scan-orbit::after,
    #line-detect .security-eyebrow i,
    #line-detect .state-orb { animation: none; }
    #line-detect #ld-film-progress { transition: none; }
}
