/* ============================================================
   情侣地图 - iOS 玻璃体风格
   导航栏完全匹配前端 lg-sidebar
   ============================================================ */

* {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
::selection { background: rgba(255, 111, 156, 0.25); color: inherit; }
::-moz-selection { background: rgba(255, 111, 156, 0.25); color: inherit; }

/* ============================================================
   白天主题
   ============================================================ */
html.theme-day body { background: #f2f4f8; color: #222; }

html.theme-day .couple-info-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}
html.theme-day .ci-name { color: #1a1a2e; }
html.theme-day .ci-location { color: #888; }
html.theme-day .ci-location .ci-dot { background: #bbb; }
html.theme-day .ci-distance { color: #ff4d7d; }
html.theme-day .ci-center {
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    border-right: 1px solid rgba(0, 0, 0, 0.06);
}
html.theme-day .ci-center .ci-icenter { opacity: 0.6; }

html.theme-day .map-marker {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}
html.theme-day .couple-footer .footer-title {
    color: #1a1a2e;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.9);
}
html.theme-day .couple-footer .footer-sub { color: rgba(0, 0, 0, 0.5); }
html.theme-day .couple-footer .footer-dot { background: #ff6f9c; box-shadow: 0 0 8px rgba(255, 111, 156, 0.5); }
html.theme-day .couple-footer .footer-declare { color: rgba(0, 0, 0, 0.35); }
html.theme-day .couple-copyright { color: rgba(0, 0, 0, 0.35); }
html.theme-day .couple-copyright .cp-brand { color: rgba(0, 0, 0, 0.5); }

/* popup 白天 */
html.theme-day .popup-glass-inner {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    color: #333;
}
html.theme-day .popup-glass-close { color: #999; }
html.theme-day .popup-glass-close:hover { color: #333; background: rgba(0,0,0,0.05); }
html.theme-day .popup-glass-addr { color: #888; }
html.theme-day .popup-glass-weather { color: #ff4d7d; }

/* ============================================================
   黑夜主题
   ============================================================ */
html.theme-night body { background: #1a1d24; color: #fff; }

html.theme-night .couple-info-card {
    background: rgba(28, 26, 36, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
html.theme-night .ci-name { color: #fff; }
html.theme-night .ci-location { color: rgba(255, 255, 255, 0.6); }
html.theme-night .ci-location .ci-dot { background: rgba(255, 255, 255, 0.35); }
html.theme-night .ci-distance { color: #ff6f9c; }
html.theme-night .ci-center {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}
html.theme-night .ci-center .ci-icenter { opacity: 0.6; }

html.theme-night .map-marker {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}
html.theme-night .couple-footer .footer-title {
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
html.theme-night .couple-footer .footer-sub { color: rgba(255, 255, 255, 0.55); }
html.theme-night .couple-footer .footer-dot { background: #ff6f9c; box-shadow: 0 0 10px rgba(255, 111, 156, 0.7); }
html.theme-night .couple-footer .footer-declare { color: rgba(255, 255, 255, 0.35); }
html.theme-night .couple-copyright { color: rgba(255, 255, 255, 0.35); }
html.theme-night .couple-copyright .cp-brand { color: rgba(255, 255, 255, 0.6); }

/* popup 黑夜 */
html.theme-night .popup-glass-inner {
    background: rgba(28, 26, 36, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    color: #fff;
}
html.theme-night .popup-glass-close { color: rgba(255,255,255,0.5); }
html.theme-night .popup-glass-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
html.theme-night .popup-glass-addr { color: rgba(255,255,255,0.6); }
html.theme-night .popup-glass-weather { color: #ff6f9c; }

/* ============================================================
   通用布局
   ============================================================ */

/* 顶部信息卡片 */
.couple-info-card {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 999px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.ci-left, .ci-right {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 14px; cursor: pointer;
    transition: opacity 0.2s;
}
.ci-left:hover, .ci-right:hover { opacity: 0.75; }

.ci-avatar {
    width: 42px; height: 42px;
    border-radius: 50%; object-fit: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    flex-shrink: 0; display: block;
    pointer-events: none;
}

.ci-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }

.ci-name {
    font-size: 15px; font-weight: 700;
    letter-spacing: 0.3px; white-space: nowrap;
}

.ci-location {
    font-size: 11px; display: flex; align-items: center;
    gap: 4px; margin-top: 3px; white-space: nowrap;
}

.ci-location .ci-dot {
    width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
}

.ci-center {
    display: flex; flex-direction: column; align-items: center;
    padding: 4px 22px; cursor: pointer; min-width: 110px;
    transition: opacity 0.2s;
}
.ci-center:hover { opacity: 0.85; }

.ci-center .ci-icenter { width: 10px; height: 10px; margin-bottom: 3px; }

.ci-distance {
    font-size: 22px; font-weight: 800; letter-spacing: 0.5px;
    line-height: 1.1;
    font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* 地图头像标记 */
.map-marker {
    width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: transform 0.2s;
}
.map-marker:hover { transform: scale(1.08); }
.map-marker .map-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    object-fit: cover; display: block;
}

/* ============================================================
   玻璃弹窗（点击头像显示）
   ============================================================ */
.popup-glass {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.popup-glass.show {
    opacity: 1;
    pointer-events: auto;
}

.popup-glass-inner {
    position: relative;
    width: 260px;
    padding: 30px 24px 24px;
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-align: center;
    transform: scale(0.85) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.popup-glass.show .popup-glass-inner {
    transform: scale(1) translateY(0);
}

.popup-glass-close {
    position: absolute;
    right: 14px; top: 14px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    background: rgba(0,0,0,0.05);
    color: #999;
}
.popup-glass-close:hover {
    color: #333;
    background: rgba(0,0,0,0.1);
    transform: rotate(90deg);
}

.popup-glass-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.popup-glass-name {
    font-size: 18px; font-weight: 700;
    margin-bottom: 6px;
}

.popup-glass-addr {
    font-size: 13px; margin-bottom: 4px;
}

.popup-glass-weather {
    font-size: 14px; font-weight: 600;
}

.popup-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
    padding: 12px 32px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg,#00a8ff,#0077ff);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 6px 20px rgba(0,119,255,0.4);
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
}
.popup-nav-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg,transparent,rgba(255,255,255,0.3),transparent);
    transition: left 0.6s;
}
.popup-nav-btn:hover::before { left: 100%; }
.popup-nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,119,255,0.5);
}
.popup-nav-btn:active { transform: translateY(-1px); }

/* ============================================================
   lg-sidebar - 完全匹配前端 content.css
   ============================================================ */
.lg-sidebar {
    position: fixed;
    bottom: 40px;
    right: 20px;
    z-index: 9999;
}
.lg-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lg-sidebar-item {
    width: 46px;
    height: 46px;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: #555;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.lg-sidebar-item:hover {
    background-color: rgba(255,255,255,0.8);
    transform: scale(1.05);
}

.lg-sidebar-item:hover::after {
    content: attr(title);
    position: absolute;
    right: 60px;
    white-space: nowrap;
    background-color: #000;
    color: #fff;
    padding: .6rem 1rem;
    border-radius: .4rem;
    font-size: .9rem;
    opacity: 0.7;
    font-family: 'Noto Serif SC', serif;
}

.lg-sidebar-icon {
    width: 24px;
    height: 24px;
}

/* 黑夜 sidebar */
html.theme-night .lg-sidebar-item {
    background: rgba(30, 28, 40, 0.55);
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
html.theme-night .lg-sidebar-item:hover {
    background: rgba(40, 38, 50, 0.8);
    color: #fff;
}
html.theme-night .lg-sidebar-item:hover::after {
    background-color: #fff;
    color: #333;
}

/* 左下角标题 */
.couple-footer {
    position: absolute; bottom: 30px; left: 28px; z-index: 100;
}
.couple-footer .footer-title {
    font-size: 32px; font-weight: 800; letter-spacing: 3px;
}
.couple-footer .footer-sub {
    margin-top: 10px; font-size: 13px;
    display: flex; align-items: center; gap: 8px;
    letter-spacing: 0.5px;
}
.couple-footer .footer-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.couple-footer .footer-declare {
    margin-top: 8px; font-size: 10px; letter-spacing: 0.3px;
}

/* 右下角版权 */
.couple-copyright {
    position: absolute; bottom: 20px; right: 24px;
    text-align: right; font-size: 11px; z-index: 100; line-height: 1.9;
}
.couple-copyright .cp-brand {
    font-weight: 700; font-size: 12px; letter-spacing: 0.5px;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
    .couple-info-card { top: 62px; padding: 8px 16px; }
    .ci-left, .ci-right { padding: 3px 12px; gap: 10px; }
    .ci-center { padding: 3px 16px; min-width: 100px; }
    .ci-avatar { width: 38px; height: 38px; }
    .ci-name { font-size: 14px; }
    .ci-location { font-size: 11px; }
    .ci-distance { font-size: 20px; }

    .couple-footer { bottom: 18px; left: 18px; }
    .couple-footer .footer-title { font-size: 24px; }
    .couple-footer .footer-sub { font-size: 11px; }
    .couple-footer .footer-declare { font-size: 9px; }
    .couple-copyright { bottom: 14px; right: 14px; font-size: 10px; line-height: 1.8; }
}

@media (max-width: 640px) {
    .couple-info-card {
        top: 50px; left: 50%; right: auto; transform: translateX(-50%);
        padding: 6px 10px; width: auto; max-width: 98vw;
        display: flex; flex-direction: row; align-items: center;
        flex-wrap: nowrap; gap: 0;
    }
    .ci-left, .ci-right {
        flex: 1 1 auto; min-width: 0; padding: 2px 6px; gap: 5px;
        display: flex; flex-direction: row; align-items: center;
    }
    .ci-right { flex-direction: row-reverse; }
    .ci-left .ci-text { align-items: flex-start; }
    .ci-right .ci-text { align-items: flex-end; }
    .ci-center {
        flex: 0 0 auto; min-width: 55px; padding: 2px 8px;
        display: flex; flex-direction: column; align-items: center;
    }
    .ci-avatar { width: 30px; height: 30px; flex-shrink: 0; }
    .ci-name { font-size: 11px; letter-spacing: 0; white-space: nowrap; }
    .ci-location { font-size: 9px; margin-top: 1px; gap: 2px; white-space: nowrap; }
    .ci-location .ci-dot { width: 3px; height: 3px; flex-shrink: 0; }
    .ci-distance { font-size: 14px; letter-spacing: 0; white-space: nowrap; }
    .ci-center .ci-icenter { width: 6px; height: 6px; margin-bottom: 1px; }
    .ci-text { overflow: hidden; }

    .couple-footer { bottom: 10px; left: 10px; }
    .couple-footer .footer-title { font-size: 18px; letter-spacing: 1px; }
    .couple-footer .footer-sub { font-size: 9px; gap: 4px; margin-top: 4px; }
    .couple-footer .footer-dot { width: 5px; height: 5px; }
    .couple-footer .footer-declare { font-size: 8px; margin-top: 4px; }
    .couple-copyright { bottom: 10px; right: 8px; font-size: 9px; line-height: 1.5; }
    .couple-copyright .cp-brand { font-size: 10px; }
    .map-marker { width: 42px; height: 42px; }
    .map-marker .map-avatar { width: 36px; height: 36px; }

    .popup-glass-inner { width: 220px; padding: 22px 16px 16px; }
    .popup-glass-avatar { width: 56px; height: 56px; }
    .popup-glass-name { font-size: 16px; }

    .back-home-btn { top: 8px; left: 6px; padding: 5px 10px; font-size: 11px; gap: 4px; border-radius: 20px; }
}

@media (max-width: 380px) {
    .couple-info-card { top: 48px; padding: 4px 6px; }
    .ci-left, .ci-right { padding: 1px 4px; gap: 3px; }
    .ci-center { padding: 1px 5px; min-width: 45px; }
    .ci-avatar { width: 24px; height: 24px; }
    .ci-name { font-size: 10px; }
    .ci-location { font-size: 8px; gap: 1px; }
    .ci-distance { font-size: 12px; }
    .ci-center .ci-icenter { width: 5px; height: 5px; }
    .couple-footer .footer-title { font-size: 15px; }
    .couple-footer .footer-declare { font-size: 7px; }
    .map-marker { width: 36px; height: 36px; }
    .map-marker .map-avatar { width: 30px; height: 30px; }
}