/* main.css */
html {
    height: 100%;
    height: -webkit-fill-available;
}
body {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fff;
    font-family: 'Segoe UI', 'Arial', sans-serif;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    font-size: 14px;
}
/* 与 JS 中尺寸同步：铺满可视区域（避免 100vh/innerHeight 与真实像素不一致导致花瓣「从中间才开始」） */
#petal-canvas {
    position: fixed;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    z-index: 50;
    pointer-events: none;
}
.welcome-container {
    position: relative;
    z-index: 10;
    padding: 28px 20px;
    border-radius: 20px;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(
        155deg,
        rgba(255, 255, 255, 0.68) 0%,
        rgba(245, 250, 255, 0.52) 45%,
        rgba(236, 244, 255, 0.56) 100%
    );
    -webkit-backdrop-filter: blur(48px) saturate(1.85);
    backdrop-filter: blur(48px) saturate(1.85);
    border: 1px solid rgba(255, 255, 255, 0.88);
    box-shadow:
        0 10px 40px rgba(55, 95, 160, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 -1px 0 rgba(120, 150, 200, 0.06) inset;
    text-align: center;
    animation: fadeInUp 1s cubic-bezier(.39,.575,.565,1) both;
    transition: box-shadow 0.3s;
}
.welcome-container:hover {
    box-shadow:
        0 14px 48px rgba(55, 95, 160, 0.14),
        0 1px 0 rgba(255, 255, 255, 1) inset,
        0 -1px 0 rgba(120, 150, 200, 0.08) inset;
}
#greeting {
    margin-bottom: 10px;
    font-size: 12px;
    color: #0d47a1;
    font-weight: bold;
    animation: fadeIn 1.3s;
}
#time {
    margin-bottom: 10px;
    font-size: 12px;
    color: #3d4a5c;
    font-weight: bold;
    letter-spacing: 1px;
    animation: fadeIn 1.5s cubic-bezier(.39,.575,.565,1) both;
}
#time-label, #time-value {
    font-size: 12px;
}
.btn-row {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 10px;
}
.main-btn {
    width: 110px;
    display: inline-block;
    margin: 0;
    padding: 8px 0;
    font-size: 14px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    transition: box-shadow 0.2s, filter 0.2s;
}
/* 主按钮：扁平 90deg 双色渐变 */
.main-btn.contact-btn,
.main-btn.enter-btn {
    position: relative;
    isolation: isolate;
    background: transparent;
    box-shadow: none;
}
.main-btn.contact-btn::after {
    content: '';
    position: absolute;
    border-radius: inherit;
    pointer-events: none;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, #ffb86c 0%, #ff6a6a 100%);
}
.main-btn.enter-btn::after {
    content: '';
    position: absolute;
    border-radius: inherit;
    pointer-events: none;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, #90d5ff 0%, #7c8cff 100%);
}
.main-btn:hover {
    filter: brightness(1.04);
}
.main-btn:active {
    filter: brightness(0.98);
}
.contact-btn {
    color: #fff;
    text-shadow: none;
    border: none;
}
.contact-btn:hover {
    filter: brightness(1.05);
}
.contact-btn:active {
    filter: brightness(0.98);
}
.main-btn.enter-btn:hover {
    filter: brightness(1.05);
}
.main-btn.enter-btn:active {
    filter: brightness(0.98);
}
.spinner {
    width: 48px;
    height: 48px;
    border: 6px solid #e0e0e0;
    border-top: 6px solid #66a6ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: rgba(15, 25, 45, 0.12);
    -webkit-backdrop-filter: blur(20px) saturate(1.38);
    backdrop-filter: blur(20px) saturate(1.38);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}
.modal-content {
    background: rgba(255, 255, 255, 0.42);
    -webkit-backdrop-filter: blur(30px) saturate(1.48);
    backdrop-filter: blur(30px) saturate(1.48);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 16px;
    width: 270px;
    max-width: 98vw;
    box-shadow: 0 14px 44px rgba(60, 110, 220, 0.18), inset 0 1px 0 rgba(255,255,255,0.88);
    padding: 0 0 12px 0;
    animation: fadeInUp 0.5s;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 0 16px;
}
.modal-title {
    font-size: 16px;
    font-weight: bold;
    color: #1e2d3d;
}
.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    font-size: 22px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    border-radius: 50%;
    position: relative;
    isolation: isolate;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: filter 0.2s;
    text-shadow: none;
}
.modal-close::after {
    content: '';
    position: absolute;
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
    inset: 0;
    background: linear-gradient(90deg, #f5b4ff 0%, #ff8ba8 100%);
}
.modal-close:hover {
    filter: brightness(1.06);
}
.modal-close:active {
    filter: brightness(0.94);
}
.modal-body {
    padding: 8px 8px 0 8px;
}
.contact-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.45);
    backdrop-filter: blur(24px) saturate(1.45);
    border-radius: 10px;
    padding: 8px 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-right: 8px;
    border-radius: 50%;
    background: none;
}
.icon.email {
    background: #ffa726;
}
.icon.email::before {
    content: '\2709';
    color: #fff;
    font-size: 20px;
}
.icon.telegram {
    background: #42a5f5;
}
.icon.telegram::before {
    content: '\1F4AC';
    color: #fff;
    font-size: 20px;
}
.icon.qq {
    background: #50a0e3;
}
.icon.qq::before {
    content: '\1F5E3';
    color: #fff;
    font-size: 20px;
}
.icon.wechat {
    background: #43d27a;
}
.icon.wechat::before {
    content: '\1F4AC';
    color: #fff;
    font-size: 20px;
}
.icon.time {
    background: #43a047;
}
.icon.time::before {
    content: '\23F0';
    color: #fff;
    font-size: 20px;
}
.contact-label {
    font-weight: bold;
    color: #263238;
    font-size: 13px;
}
.contact-link {
    color: #1565c0;
    font-size: 13px;
    text-decoration: none;
    word-break: break-all;
}
.modal-close-btn {
    width: 90%;
    margin: 8px auto 0 auto;
    display: block;
    padding: 7px 0;
    border-radius: 8px;
    position: relative;
    isolation: isolate;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    text-shadow: none;
    box-shadow: none;
    transition: filter 0.2s;
}
.modal-close-btn::after {
    content: '';
    position: absolute;
    z-index: -1;
    pointer-events: none;
    border-radius: inherit;
    inset: 0;
    background: linear-gradient(90deg, #7bdbd5 0%, #5b9bd5 100%);
}
.modal-close-btn:hover {
    filter: brightness(1.05);
}
.modal-close-btn:active {
    filter: brightness(0.94);
}
@media (max-width: 400px) {
    .modal-content { width: 98vw; }
    .welcome-container { padding: 18px 2vw; }
}
.icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 12px;
    border-radius: 50%;
    background: none;
}
.contact-item.clickable {
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}
.contact-item.clickable:hover {
    background: rgba(255, 255, 255, 0.52);
    box-shadow: 0 4px 20px rgba(66, 140, 255, 0.28);
    transform: translateY(-1px);
}
.contact-item.clickable:active {
    background: rgba(227, 242, 253, 0.96);
    transform: scale(0.98);
}
.contact-item.clicked {
    background: #c8e6c9 !important;
    transition: background 0.3s;
}
/* 联系我们全屏页：条目与备用线路同款磨砂条 */
.contact-modal-list .contact-item {
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.14);
    -webkit-backdrop-filter: blur(40px) saturate(1.75);
    backdrop-filter: blur(40px) saturate(1.75);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 14px;
    padding: 12px 12px 12px 14px;
    box-shadow:
        0 3px 22px rgba(25, 45, 80, 0.07),
        0 1px 0 rgba(255, 255, 255, 0.92) inset,
        0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}
.contact-modal-list .contact-label {
    color: #37474f;
}
.contact-modal-list .contact-link {
    color: #0d47a1;
}
.contact-modal-list .contact-item.clickable:hover {
    background: rgba(255, 255, 255, 0.28);
    box-shadow:
        0 5px 26px rgba(66, 140, 255, 0.15),
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 0 0 1px rgba(255, 255, 255, 0.35) inset;
}
.contact-modal-list .contact-item.clickable:active {
    background: rgba(227, 242, 253, 0.55);
}
.contact-modal-list .contact-item.clicked {
    background: rgba(200, 230, 201, 0.55) !important;
}
.jump-spinner {
    width: 48px;
    height: 48px;
    border: 6px solid #e0e0e0;
    border-top: 6px solid #66a6ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.jump-progress {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.jp-bg {
    opacity: 0.25;
}
.jp-bar {
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    stroke-dasharray: 150.72;
    stroke-dashoffset: 150.72;
    transition: stroke-dashoffset 0.2s;
}
.line-item {
    background: linear-gradient(135deg, #2196f3 0%, #3d5afe 100%);
    border-radius: 6px;
    padding: 12px 12px 10px 12px;
    margin-bottom: 14px;
    color: #fff;
    transition: background 0.2s;
    cursor: pointer;
    font-size: 13px;
}
.line-item:hover { filter: brightness(1.12) saturate(1.15); }
.line-grid {
    display: grid;
    grid-template-columns: 1fr 80px;
    grid-template-rows: 1fr 1fr;
    gap: 6px 8px;
    width: 100%;
    align-items: center;
}
.line-url { grid-area: 1 / 1 / 2 / 2; font-weight: bold; word-break: break-all; }
.copy-btn, .line-enter-btn {
    width: 60px;
    min-width: 60px;
    max-width: 100px;
    position: relative;
    isolation: isolate;
    background: transparent;
    border: none;
    color: #fff;
    border-radius: 6px;
    padding: 3px 0;
    font-size: 13px;
    cursor: pointer;
    transition: filter 0.2s;
    font-weight: bold;
    text-align: center;
    box-sizing: border-box;
    text-shadow: none;
    box-shadow: none;
}
.copy-btn::after {
    content: '';
    position: absolute;
    z-index: -1;
    pointer-events: none;
    border-radius: inherit;
    inset: 0;
    background: linear-gradient(90deg, #ffb86c 0%, #ff6a6a 100%);
}
.line-enter-btn::after {
    content: '';
    position: absolute;
    z-index: -1;
    pointer-events: none;
    border-radius: inherit;
    inset: 0;
    background: linear-gradient(90deg, #8fe8d8 0%, #3daea5 100%);
}
.copy-btn:hover {
    filter: brightness(1.05);
}
.copy-btn:active {
    filter: brightness(0.95);
}
.line-enter-btn:hover {
    filter: brightness(1.05);
}
.line-enter-btn:active {
    filter: brightness(0.95);
}
.line-grid .line-enter-btn {
    grid-area: 2 / 2 / 3 / 3;
}
.line-speed { grid-area: 2 / 1 / 3 / 2; color: #fff; font-size: 12px; }
.main-btn.enter-btn {
    color: #fff;
    border: none;
    text-shadow: none;
}
@media (max-width: 400px) {
    .line-grid { grid-template-columns: 1fr 60px; font-size: 12px; }
    .copy-btn, .enter-btn { font-size: 12px; padding: 2px 0; }
    .line-item { font-size: 12px; padding: 10px 6px 8px 6px; }
}
.system-icon-center {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}
@keyframes blink {
    0%, 100% { color: #ff5722; }
    50% { color: #ffc107; }
}
.device-highlight {
    font-weight: bold;
    animation: blink 1s infinite;
}
.tip-card {
    color: #b26a00;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    width: 100%;
    display: block;
    max-width: 100%;
    word-break: break-all;
    margin: 0 auto 18px auto;
}
/* 复制反馈：底部胶囊 + 磨砂暗底，与顶部绿条区分 */
.toast-tip {
    position: fixed;
    bottom: max(22px, calc(14px + env(safe-area-inset-bottom, 0px)));
    left: 50%;
    transform: translateX(-50%);
    top: auto;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px 11px 14px;
    max-width: min(92vw, 360px);
    min-width: 0;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #f0f4fa;
    background: rgba(22, 32, 48, 0.88);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 12px 40px rgba(12, 20, 40, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    opacity: 1;
    transition: opacity 0.32s ease, transform 0.32s ease;
    animation: toastTipIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes toastTipIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
.toast-tip--out {
    opacity: 0;
    transform: translateX(-50%) translateY(8px) !important;
    pointer-events: none;
}
.toast-tip__label {
    line-height: 1.4;
    word-break: break-word;
}
.toast-tip__glyph {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    position: relative;
}
.toast-tip--ok .toast-tip__glyph {
    background: linear-gradient(145deg, #5ee2a8 0%, #1fb86e 100%);
    box-shadow: 0 2px 8px rgba(31, 184, 110, 0.35);
}
.toast-tip--ok .toast-tip__glyph::after {
    content: '';
    position: absolute;
    left: 8px;
    top: 5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    border-radius: 1px;
}
.toast-tip--warn .toast-tip__glyph {
    background: linear-gradient(145deg, #ffb74d 0%, #f57c00 100%);
    box-shadow: 0 2px 8px rgba(245, 124, 0, 0.35);
}
.toast-tip--warn .toast-tip__glyph::after {
    content: '!';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.toast-tip--warn {
    border-color: rgba(255, 183, 77, 0.35);
    box-shadow:
        0 12px 40px rgba(40, 25, 10, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
/* 拉取 config 完成前：全屏加载层由 index 内联 display:flex 显示；完成后 body[aria-busy] 置为 false */
body[aria-busy="true"] {
    cursor: wait;
}
/* 全屏线路检测：纯白底、无外框；品牌 / 律动点 / 文案 / 进度条保留彩色 */
#jump-anim {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 20000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
}
.route-check-screen {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}
.route-check-card {
    position: relative;
    flex: 0 1 360px;
    width: 100%;
    max-width: 360px;
    min-width: 0;
    box-sizing: border-box;
    padding: 38px 30px 30px;
    text-align: center;
    background: transparent;
    border: none;
    box-shadow: none;
}
.route-check-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}
.route-check-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    animation: route-check-dot-wave 0.95s ease-in-out infinite;
}
.route-check-dot:nth-child(1) {
    background: linear-gradient(145deg, #ff6b9d 0%, #c471ed 100%);
    box-shadow: 0 0 14px rgba(196, 113, 237, 0.65);
}
.route-check-dot:nth-child(2) {
    background: linear-gradient(145deg, #36e4c0 0%, #2196f3 100%);
    box-shadow: 0 0 14px rgba(54, 228, 192, 0.55);
    animation-delay: 0.12s;
}
.route-check-dot:nth-child(3) {
    background: linear-gradient(145deg, #ffd54f 0%, #ff7043 100%);
    box-shadow: 0 0 14px rgba(255, 167, 38, 0.6);
    animation-delay: 0.24s;
}
@keyframes route-check-dot-wave {
    0%, 100% {
        transform: scale(0.55) translateY(2px);
        opacity: 0.5;
        filter: brightness(0.95);
    }
    40% {
        transform: scale(1.25) translateY(-6px);
        opacity: 1;
        filter: brightness(1.15);
    }
}
.route-check-brand {
    margin: 0 0 14px 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.16em;
    background: linear-gradient(
        92deg,
        #1565c0,
        #7c4dff,
        #e040fb,
        #00838f,
        #1565c0
    );
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: route-brand-shift 4.5s linear infinite;
}
@keyframes route-brand-shift {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}
.route-check-caption {
    margin-top: 0;
}
/* 线路检测 / 配置加载：主文案 + 动态省略号 */
.loader-status-text {
    margin-top: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #37474f;
    letter-spacing: 0.06em;
    line-height: 1.5;
}
.loader-status-text #jump-anim-msg {
    color: #0d47a1;
    text-shadow: 0 0 20px rgba(25, 118, 210, 0.25);
}
.route-check-card .loader-ellipsis__dot {
    color: #7c4dff;
    text-shadow: 0 0 12px rgba(124, 77, 255, 0.5);
}
.loader-ellipsis {
    display: inline-block;
    margin-left: 2px;
    letter-spacing: 0;
    white-space: nowrap;
}
.loader-ellipsis__dot {
    display: inline-block;
    font-weight: 800;
    color: #1976d2;
    animation: loader-ellipsis-bounce 1.35s ease-in-out infinite;
}
.loader-ellipsis__dot:nth-child(1) {
    animation-delay: 0s;
}
.loader-ellipsis__dot:nth-child(2) {
    animation-delay: 0.22s;
}
.loader-ellipsis__dot:nth-child(3) {
    animation-delay: 0.44s;
}
@keyframes loader-ellipsis-bounce {
    0%, 100% {
        opacity: 0.2;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-4px);
    }
    70% {
        opacity: 0.55;
        transform: translateY(0);
    }
}
.route-check-strip {
    position: relative;
    height: 8px;
    margin-top: 24px;
    border-radius: 999px;
    overflow: hidden;
}
.route-check-strip__bg {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(100, 140, 255, 0.18),
        rgba(224, 64, 251, 0.22),
        rgba(255, 110, 120, 0.18),
        rgba(100, 140, 255, 0.18)
    );
    background-size: 200% 100%;
    animation: route-strip-bg-flow 3s linear infinite;
}
@keyframes route-strip-bg-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
.route-check-strip__shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 38%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.95) 45%,
        rgba(180, 220, 255, 0.85) 55%,
        transparent 100%
    );
    filter: blur(0.5px);
    animation: route-check-shine 1.2s ease-in-out infinite;
}
.route-check-strip__shine--b {
    width: 28%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 180, 240, 0.75),
        transparent
    );
    animation: route-check-shine-b 1.6s ease-in-out infinite;
    animation-delay: -0.5s;
}
@keyframes route-check-shine {
    0% {
        transform: translateX(-130%);
    }
    100% {
        transform: translateX(340%);
    }
}
@keyframes route-check-shine-b {
    0% {
        transform: translateX(-80%);
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(380%);
        opacity: 0.5;
    }
}
/* 线路列表：纯白底 + 花瓣画布（无极光）；无外框大面板，内容浮于背景 */
.line-modal-root {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 30000;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    box-sizing: border-box;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 0 calc(24px + env(safe-area-inset-bottom, 0px));
}
/* 与首页 #petal-canvas 一致：花瓣叠在内容上层；pointer-events:none 点击穿透到下层卡片 */
.line-modal-canvas {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
}
.line-modal-dismiss {
    position: fixed;
    right: max(12px, env(safe-area-inset-right, 0px));
    top: max(10px, env(safe-area-inset-top, 0px));
    z-index: 60;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #fff;
    border-radius: 50%;
    isolation: isolate;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: filter 0.2s;
    text-shadow: none;
}
.line-modal-dismiss::after {
    content: '';
    position: absolute;
    z-index: -1;
    pointer-events: none;
    border-radius: 50%;
    inset: 0;
    background: linear-gradient(135deg, #ff8dc7 0%, #ff6fb7 50%, #ff9ecf 100%);
    box-shadow: 0 4px 14px rgba(255, 110, 180, 0.35);
}
.line-modal-dismiss:hover {
    filter: brightness(1.06);
}
.line-modal-dismiss:active {
    filter: brightness(0.94);
}
.line-modal-inner {
    position: relative;
    z-index: 10;
    width: min(100%, 440px);
    margin: 0;
    padding: 44px 18px 12px;
    box-sizing: border-box;
    background: transparent;
    border: none;
    box-shadow: none;
}
.line-modal-title {
    text-align: center;
    margin-bottom: 18px;
    font-size: 17px;
    font-weight: 800;
    color: #1a3a6e;
    letter-spacing: 0.04em;
    line-height: 1.35;
}
/* 推荐线路：染色玻璃 — 加 blur/saturate；纯白底时背景层需更淡才看得出磨砂 */
.line-modal-hero {
    background: linear-gradient(
        145deg,
        rgba(45, 124, 255, 0.38) 0%,
        rgba(91, 108, 255, 0.34) 40%,
        rgba(124, 92, 255, 0.32) 72%,
        rgba(148, 88, 232, 0.4) 100%
    );
    -webkit-backdrop-filter: blur(36px) saturate(1.75);
    backdrop-filter: blur(36px) saturate(1.75);
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 16px;
    padding: 18px 16px 16px;
    color: #fff;
    margin-bottom: 18px;
    transform: translateZ(0);
    box-shadow:
        0 4px 28px rgba(40, 55, 120, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.5) inset,
        0 0 0 1px rgba(255, 255, 255, 0.12) inset;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.line-modal-hero-label {
    font-size: 12px;
    opacity: 0.95;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.08em;
}
.line-modal-hero-url {
    font-size: 15px;
    font-weight: 800;
    word-break: break-all;
    line-height: 1.5;
    margin-bottom: 10px;
}
.line-modal-hero-speed {
    font-size: 12px;
    opacity: 0.96;
    margin-bottom: 14px;
    font-weight: 500;
}
.line-modal-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: stretch;
}
.line-hero-btn {
    flex: 1;
    min-width: 0;
    position: relative;
    isolation: isolate;
    margin: 0;
    padding: 11px 12px;
    font-size: 14px;
    font-weight: 800;
    border: none;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    transition: filter 0.2s;
    background: transparent;
    box-shadow: none;
    text-shadow: none;
}
.line-hero-btn::after {
    content: '';
    position: absolute;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    inset: 0;
}
.line-hero-btn--enter::after {
    background: linear-gradient(90deg, #90d5ff 0%, #7c8cff 100%);
}
.line-hero-btn--copy::after {
    background: linear-gradient(90deg, #ffb86c 0%, #ff6a6a 100%);
}
.line-hero-btn:hover {
    filter: brightness(1.05);
}
.line-hero-btn:active {
    filter: brightness(0.97);
}
.line-modal-section-title {
    font-size: 14px;
    font-weight: 800;
    color: #3d4f5f;
    margin: 0 0 12px 2px;
    text-align: left;
    letter-spacing: 0.04em;
}
.line-backup-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* 备用：白底上要看见磨砂需更低实色 + 更高 blur；边缘双线高光模拟玻璃厚度 */
.line-backup-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255, 255, 255, 0.14);
    -webkit-backdrop-filter: blur(40px) saturate(1.75);
    backdrop-filter: blur(40px) saturate(1.75);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 14px;
    padding: 24px 12px 12px 34px;
    color: #263238;
    transform: translateZ(0);
    box-shadow:
        0 3px 22px rgba(25, 45, 80, 0.07),
        0 1px 0 rgba(255, 255, 255, 0.92) inset,
        0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}
.line-backup-body {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: flex-start;
}
/* 左上角序号：极小圆角块，每条配色循环 */
.line-backup-index {
    position: absolute;
    left: 7px;
    top: 6px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: #fff;
    pointer-events: none;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.line-backup-index--h1 {
    background: linear-gradient(155deg, #5c8dff 0%, #4c6ef5 100%);
}
.line-backup-index--h2 {
    background: linear-gradient(155deg, #f06292 0%, #d81b60 100%);
}
.line-backup-index--h3 {
    background: linear-gradient(155deg, #26a69a 0%, #00897b 100%);
}
.line-backup-index--h4 {
    background: linear-gradient(155deg, #ab47bc 0%, #7b1fa2 100%);
}
.line-backup-index--h5 {
    background: linear-gradient(155deg, #ff9800 0%, #ef6c00 100%);
}
.line-backup-main {
    flex: 1;
    min-width: 0;
}
.line-backup-url {
    font-size: 13px;
    font-weight: 700;
    word-break: break-all;
    line-height: 1.45;
    color: #0d47a1;
    margin-bottom: 4px;
}
.line-backup-speed {
    display: block;
    font-size: 12px;
    color: #78909c;
    font-weight: 500;
}
.line-backup-btns {
    display: flex;
    flex-shrink: 0;
    gap: 8px;
    align-items: center;
}
.line-backup-btn {
    position: relative;
    isolation: isolate;
    min-width: 52px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: filter 0.2s;
    border: none;
    color: #fff;
    background: transparent;
    box-shadow: none;
    text-shadow: none;
    text-align: center;
    box-sizing: border-box;
}
.line-backup-btn::after {
    content: '';
    position: absolute;
    z-index: -1;
    border-radius: inherit;
    pointer-events: none;
    inset: 0;
}
.line-backup-btn--copy::after {
    background: linear-gradient(90deg, #ffb86c 0%, #ff6a6a 100%);
}
.line-backup-btn--enter::after {
    background: linear-gradient(90deg, #8fe8d8 0%, #3daea5 100%);
}
.line-backup-btn:hover {
    filter: brightness(1.05);
}
.line-backup-btn:active {
    filter: brightness(0.95);
}
.line-modal-empty {
    text-align: center;
    color: #b26a00;
    font-size: 15px;
    font-weight: 600;
    padding: 28px 12px 40px;
}
@media (max-width: 380px) {
    .line-modal-inner {
        padding-left: 14px;
        padding-right: 14px;
    }
    .line-modal-hero-actions {
        flex-wrap: wrap;
    }
    .line-hero-btn {
        flex: 1 1 calc(50% - 6px);
        min-width: 120px;
    }
    .line-backup-card {
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .line-backup-body {
        flex: 1 1 100%;
        min-width: 0;
    }
    .line-backup-btns {
        width: 100%;
        justify-content: flex-end;
    }
} 