/* ======================================================
sancan.css — 三餐解忧铺分页面样式
====================================================== */

/* ---------- 全局重置 & 主题变量 ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scrollbar-gutter: stable;
}

:root {
    --bg-gradient-start: #fff9f0;
    --bg-gradient-end: #ffe6d5;
    --text-primary: #2D2A24;
    --text-secondary: #5B5348;
    --text-light: #7A7062;
    --accent-orange: #FF8A5C;
    --accent-coral: #FF6B6B;
    --accent-mango: #F9C74F;
    --shadow-sm: 0 12px 28px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 24px 40px rgba(0, 0, 0, 0.12);
    --card-bg: rgba(255, 255, 255, 0.85);
    --border-glass: rgba(255, 188, 128, 0.3);
    --input-bg: rgba(0, 0, 0, 0.03);
    --input-text: #2D2A24;
    --placeholder-color: #9E9589;
    --modal-link-color: var(--accent-orange);
    
    --map-bg: rgba(255, 248, 240, 0.55);
}

[data-theme="dark"] {
    --bg-gradient-start: #1F1B17;
    --bg-gradient-end: #2A241E;
    --text-primary: #F2E8DD;
    --text-secondary: #CFC4B6;
    --text-light: #B0A294;
    --accent-orange: #FF9F7A;
    --accent-coral: #FF8686;
    --accent-mango: #FCD36A;
    --shadow-sm: 0 12px 28px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 24px 40px rgba(0, 0, 0, 0.6);
    --card-bg: rgba(35, 30, 26, 0.85);
    --border-glass: rgba(255, 188, 128, 0.15);
    --input-bg: #EBE1CA;
    --input-text: #2D2A24;
    --placeholder-color: #8C7A61;
    --modal-link-color: #FFB088;
    --map-bg: rgba(40, 35, 30, 0.6);
}

body {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-primary);
    transition: background 0.4s ease, color 0.3s ease;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

button, a {
    -webkit-tap-highlight-color: transparent;
}

#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---------- 工具栏 ---------- */
.toolbar {
    position: fixed;
    top: 24px;
    left: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}
.toolbar .left-controls {
    display: flex;
    gap: 12px;
    pointer-events: auto;
}
#auth-toolbar-box {
    pointer-events: auto;
}
.toolbar button,
.user-welcome-tag {
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    padding: 10px 18px;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
}
.user-welcome-tag {
    cursor: default;
    font-weight: 600;
    border-color: var(--accent-orange);
}
.user-welcome-tag .uid-text {
    color: var(--accent-orange);
}
.toolbar button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
}

/* ---------- 主容器 ---------- */
.container {
    width: 100%;
    max-width: 1100px;
    padding: 20px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding-top: 90px;
}

.page-header {
    text-align: center;
    margin-bottom: 28px;
}
.page-header h1 {
    font-size: 2.4rem;
    font-weight: 700;
}
.page-header h1 .highlight {
    color: var(--accent-orange);
}
.page-header .subhead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* ---------- 巨幅按钮 ---------- */
.hero-btn-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 40px auto;
}
.hero-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    padding: 24px 32px;
    border-radius: 80px;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-mango));
    color: #2D2A24;
    border: none;
    box-shadow: 0 12px 32px rgba(255, 138, 92, 0.3);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}
.hero-btn:hover {
    transform: scale(1.03) rotate(-0.5deg);
    box-shadow: 0 20px 48px rgba(255, 138, 92, 0.4);
}
.hero-btn .btn-icon {
    font-size: 2.4rem;
}
.hero-btn .btn-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}
.hero-btn .btn-label small {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.75;
}

/* ---------- 地图区域适配 ---------- */
.map-section {
    width: 100%;
    max-width: 880px;
    margin: 10px auto 30px auto;
}
.map-section .map-title {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.map-section .map-title i {
    color: var(--accent-orange);
}
.map-container {
    position: relative;
    width: 100%;
    height: 55vh;
    max-height: 650px;
    background: var(--map-bg);
    border-radius: 32px;
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    z-index: 5;
}

.leaflet-container {
    background-color: transparent !important;
    font-family: inherit;
}
[data-theme="dark"] .leaflet-tile-container img {
    filter: invert(1) hue-rotate(180deg) brightness(0.65) contrast(1.15);
}
.leaflet-control-attribution {
    display: none !important;
}

/* ⭐ 极简高级地图文本：彻底去掉框体和白底，文字完美落在圆圈中 */
.custom-map-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #4A3E31 !important;
    text-shadow: 0 0 6px #fff, 0 0 4px #fff, 0 0 2px #fff;
    text-align: center;
    white-space: normal !important;
    transition: all 0.2s ease;
}
.custom-map-label.active-label {
    color: #E65A22 !important;
    font-size: 14px !important;
    text-shadow: 0 0 6px #fff, 0 0 3px #fff;
}
[data-theme="dark"] .custom-map-label {
    color: #E3D8C8 !important;
    text-shadow: 0 0 6px #1F1B17, 0 0 4px #1F1B17, 0 0 2px #1F1B17;
}
[data-theme="dark"] .custom-map-label.active-label {
    color: #FFA375 !important;
}

/* 去除 Leaflet Tooltip 小箭头 */
.leaflet-tooltip-top:before, .leaflet-tooltip-bottom:before, 
.leaflet-tooltip-left:before, .leaflet-tooltip-right:before {
    display: none !important;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.map-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.map-legend .legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}
.map-legend .legend-dot.active-dot {
    box-shadow: 0 0 0 2px rgba(255, 138, 92, 0.25);
}

/* ---------- ⭐ 底部区域资讯面板样式 ---------- */
.info-guide-section {
    width: 100%;
    max-width: 880px;
    margin: 20px auto 40px auto;
    padding: 0 10px;
}
.info-guide-section .guide-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 4px solid var(--accent-orange);
    padding-left: 10px;
}
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
.guide-card {
    background: var(--card-bg);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.guide-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.guide-card.active-card {
    border-color: var(--accent-orange);
    background: linear-gradient(135deg, rgba(255,138,92,0.06), rgba(255,255,255,0.9));
}
.guide-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.guide-card.active-card h3 {
    color: var(--accent-orange);
}
.guide-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ---------- 底部导航 ---------- */
.bottom-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px 32px;
    margin: 10px 0 40px 0;
    padding: 18px 28px;
    background: var(--card-bg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 60px;
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-sm);
}
.bottom-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    padding: 6px 10px;
    border-radius: 40px;
}
.bottom-nav a i {
    color: var(--accent-orange);
}
.bottom-nav a:hover {
    color: var(--accent-orange);
    transform: translateY(-2px);
    background: rgba(255, 138, 92, 0.08);
}

.footer-note {
    margin-top: 20px;
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ---------- 弹窗系统 ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    display: flex;
    opacity: 1;
}
.modal-box {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-primary);
    max-width: 520px;
    width: 92%;
    padding: 32px 28px 28px 28px;
    border-radius: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    position: relative;
    border: 1px solid var(--border-glass);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-overlay.active .modal-box {
    transform: scale(1);
}
.close-modal {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 1.8rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-secondary);
    transition: transform 0.2s;
}
.close-modal:hover {
    transform: rotate(90deg);
}

.modal-desc { margin-bottom: 15px; font-size: 0.95rem; color: var(--text-secondary); line-height: 1.6; }
.modal-input-wrapper { position: relative; margin-bottom: 12px; }
.modal-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); display: flex; align-items: center; font-size: 1rem; pointer-events: none; z-index: 2; }
.modal-input { width: 100%; padding: 14px 16px 14px 40px; border: 1px solid var(--border-glass); border-radius: 12px; background: var(--input-bg); color: var(--text-primary); font-family: inherit; font-size: 1rem; outline: none; transition: all 0.3s ease; }
.modal-input:focus { border-color: var(--accent-orange); box-shadow: 0 0 0 3px rgba(255, 138, 92, 0.15); }
.modal-btn { width: 100%; margin-top: 10px; padding: 12px 20px; border: none; border-radius: 12px; font-weight: bold; font-size: 1rem; cursor: pointer; font-family: inherit; background: var(--accent-orange); color: #2D2A24; transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.modal-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(255, 138, 92, 0.3); }
.auth-switch-text { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--text-secondary); }
.auth-switch-text .register-link { color: var(--accent-orange); font-weight: bold; text-decoration: none; }
.modal-scroll-area { display: flex; flex-direction: column; gap: 12px; max-height: 300px; overflow-y: auto; padding-right: 4px; }
.password-toggle-eye { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-light); cursor: pointer; padding: 4px; z-index: 5; }
.modal-agreement-wrapper { margin: 16px 0 8px 0; display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-secondary); }
.modal-agreement-wrapper input[type="checkbox"] { accent-color: var(--accent-orange); width: 16px; height: 16px; }
.modal-agreement-wrapper a { color: var(--modal-link-color); }

.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; }

@media (max-width: 768px) {
    .toolbar { top: 12px; left: 12px; right: 12px; }
    .toolbar button, .user-welcome-tag { padding: 6px 10px !important; font-size: 0.9rem !important; }
    .container { padding-top: 75px; }
    .page-header h1 { font-size: 1.8rem; }
    .hero-btn { font-size: 1.4rem; padding: 18px 20px; }
    .map-container { height: 45vh; }
    .guide-grid { grid-template-columns: 1fr; }
    .bottom-nav { gap: 10px 18px; padding: 14px 18px; border-radius: 40px; }
}