meeting-point/static/css/style.css

2149 lines
46 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* ========================================
会面点 - Meeting Point
现代深色主题设计
======================================== */
:root {
/* 主色调 - 温暖的琥珀色调 */
--primary: #f59e0b;
--primary-light: #fbbf24;
--primary-dark: #d97706;
--primary-glow: rgba(245, 158, 11, 0.3);
/* 背景色系 - 深邃夜空 */
--bg-dark: #0f0f1a;
--bg-darker: #0a0a12;
--bg-card: #1a1a2e;
--bg-card-hover: #252540;
--bg-elevated: #16213e;
/* 文字色系 */
--text-primary: #f8fafc;
--text-secondary: #94a3b8;
--text-muted: #64748b;
/* 边框 */
--border: #2d2d44;
--border-light: #3d3d5c;
/* 状态色 */
--success: #10b981;
--warning: #f59e0b;
--error: #ef4444;
--info: #3b82f6;
/* 间距 */
--spacing-xs: 4px;
--spacing-sm: 8px;
--spacing-md: 16px;
--spacing-lg: 24px;
--spacing-xl: 32px;
/* 圆角 */
--radius-sm: 6px;
--radius-md: 10px;
--radius-lg: 16px;
--radius-xl: 24px;
/* 阴影 */
--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
--shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
--shadow-glow: 0 0 20px var(--primary-glow);
/* 过渡 */
--transition-fast: 0.15s ease;
--transition-normal: 0.25s ease;
--transition-slow: 0.4s ease;
/* 侧边栏宽度 */
--sidebar-width: 420px;
}
/* ========================================
基础样式重置
======================================== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100%;
font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: var(--bg-dark);
color: var(--text-primary);
line-height: 1.6;
overflow: hidden;
}
input, button, textarea {
font-family: inherit;
}
ul {
list-style: none;
}
/* ========================================
主布局
======================================== */
.app-container {
display: flex;
height: 100vh;
width: 100vw;
}
/* ========================================
侧边栏
======================================== */
.sidebar {
width: var(--sidebar-width);
min-width: var(--sidebar-width);
background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-darker) 100%);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
overflow: hidden;
}
/* Logo */
.logo {
display: flex;
align-items: center;
gap: var(--spacing-md);
padding: var(--spacing-lg);
border-bottom: 1px solid var(--border);
background: var(--bg-darker);
}
.logo-icon {
width: 48px;
height: 48px;
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
border-radius: var(--radius-md);
display: flex;
align-items: center;
justify-content: center;
box-shadow: var(--shadow-glow);
}
.logo-icon svg {
width: 28px;
height: 28px;
color: white;
}
.logo h1 {
font-size: 1.5rem;
font-weight: 700;
background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
/* 侧边栏内容 */
.sidebar-content {
flex: 1;
overflow-y: auto;
padding: var(--spacing-lg);
display: flex;
flex-direction: column;
gap: var(--spacing-lg);
}
.sidebar-content::-webkit-scrollbar {
width: 6px;
}
.sidebar-content::-webkit-scrollbar-track {
background: transparent;
}
.sidebar-content::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 3px;
}
.sidebar-content::-webkit-scrollbar-thumb:hover {
background: var(--border-light);
}
/* ========================================
区域样式
======================================== */
.section {
background: var(--bg-elevated);
border-radius: var(--radius-lg);
padding: var(--spacing-lg);
border: 1px solid var(--border);
}
.section-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: var(--spacing-md);
}
.section-header h2 {
font-size: 1rem;
font-weight: 600;
color: var(--text-primary);
}
.badge {
background: var(--primary);
color: var(--bg-dark);
font-size: 0.75rem;
font-weight: 700;
padding: 2px 10px;
border-radius: 20px;
min-width: 24px;
text-align: center;
}
/* ========================================
搜索框
======================================== */
.search-box {
position: relative;
margin-bottom: var(--spacing-md);
}
.search-input-wrapper {
position: relative;
display: flex;
align-items: center;
}
.search-icon {
position: absolute;
left: var(--spacing-md);
width: 18px;
height: 18px;
color: var(--text-muted);
pointer-events: none;
}
.search-box input {
width: 100%;
padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 44px;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-md);
color: var(--text-primary);
font-size: 0.95rem;
transition: var(--transition-fast);
}
.search-box input:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px var(--primary-glow);
}
.search-box input::placeholder {
color: var(--text-muted);
}
.clear-btn {
position: absolute;
right: var(--spacing-sm);
width: 28px;
height: 28px;
background: var(--bg-card-hover);
border: none;
border-radius: 50%;
color: var(--text-secondary);
cursor: pointer;
font-size: 1.2rem;
line-height: 1;
transition: var(--transition-fast);
}
.clear-btn:hover {
background: var(--border);
color: var(--text-primary);
}
/* 搜索提示下拉 */
.search-tips {
position: absolute;
top: 100%;
left: 0;
right: 0;
margin-top: 4px;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-md);
max-height: 300px;
overflow-y: auto;
z-index: 100;
display: none;
box-shadow: var(--shadow-lg);
}
.search-tips.active {
display: block;
}
.search-tip-item {
padding: var(--spacing-md);
cursor: pointer;
border-bottom: 1px solid var(--border);
transition: var(--transition-fast);
}
.search-tip-item:last-child {
border-bottom: none;
}
.search-tip-item:hover {
background: var(--bg-card-hover);
}
.search-tip-item .name {
font-weight: 500;
color: var(--text-primary);
margin-bottom: 2px;
}
.search-tip-item .address {
font-size: 0.85rem;
color: var(--text-muted);
}
/* ========================================
帮助文本
======================================== */
.help-text {
font-size: 0.85rem;
color: var(--text-muted);
margin-bottom: var(--spacing-md);
padding: var(--spacing-sm) var(--spacing-md);
background: rgba(245, 158, 11, 0.1);
border-radius: var(--radius-sm);
border-left: 3px solid var(--primary);
}
/* ========================================
位置列表
======================================== */
.location-list {
display: flex;
flex-direction: column;
gap: var(--spacing-sm);
max-height: 240px;
overflow-y: auto;
}
.location-list::-webkit-scrollbar {
width: 4px;
}
.location-list::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 2px;
}
.location-item {
display: flex;
align-items: center;
gap: var(--spacing-md);
padding: var(--spacing-md);
background: var(--bg-card);
border-radius: var(--radius-md);
border: 1px solid var(--border);
transition: var(--transition-fast);
animation: slideIn 0.3s ease;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateX(-10px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.location-item:hover {
background: var(--bg-card-hover);
border-color: var(--border-light);
}
.location-marker {
width: 32px;
height: 32px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
font-size: 0.85rem;
flex-shrink: 0;
}
.location-info {
flex: 1;
min-width: 0;
}
.location-name {
font-weight: 500;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 2px;
}
.location-address {
font-size: 0.8rem;
color: var(--text-muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.location-remove {
width: 28px;
height: 28px;
background: transparent;
border: 1px solid var(--border);
border-radius: 50%;
color: var(--text-muted);
cursor: pointer;
font-size: 1rem;
transition: var(--transition-fast);
flex-shrink: 0;
}
.location-remove:hover {
background: var(--error);
border-color: var(--error);
color: white;
}
/* 空状态 */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: var(--spacing-xl);
color: var(--text-muted);
text-align: center;
gap: var(--spacing-sm);
}
.empty-icon {
font-size: 2.5rem;
opacity: 0.5;
}
.empty-hint {
font-size: 0.8rem;
color: var(--text-muted);
opacity: 0.7;
}
/* ========================================
表单组件
======================================== */
.form-group {
margin-bottom: var(--spacing-lg);
}
.form-group label {
display: block;
font-size: 0.9rem;
font-weight: 500;
color: var(--text-secondary);
margin-bottom: var(--spacing-sm);
}
.keywords-input input {
width: 100%;
padding: var(--spacing-md);
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-md);
color: var(--text-primary);
font-size: 0.95rem;
transition: var(--transition-fast);
}
.keywords-input input:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px var(--primary-glow);
}
.keywords-input input::placeholder {
color: var(--text-muted);
}
/* 快捷标签 */
.quick-tags {
display: flex;
flex-wrap: wrap;
gap: var(--spacing-sm);
margin-top: var(--spacing-md);
}
.tag {
padding: var(--spacing-xs) var(--spacing-md);
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 20px;
color: var(--text-secondary);
font-size: 0.85rem;
cursor: pointer;
transition: var(--transition-fast);
}
.tag:hover {
background: var(--bg-card-hover);
border-color: var(--primary);
color: var(--primary);
}
.tag.active {
background: var(--primary);
border-color: var(--primary);
color: var(--bg-dark);
}
/* 滑块 */
.radius-slider {
display: flex;
align-items: center;
gap: var(--spacing-md);
}
.radius-slider input[type="range"] {
flex: 1;
-webkit-appearance: none;
height: 6px;
background: var(--bg-card);
border-radius: 3px;
outline: none;
}
.radius-slider input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
width: 20px;
height: 20px;
background: var(--primary);
border-radius: 50%;
cursor: pointer;
box-shadow: var(--shadow-sm);
transition: var(--transition-fast);
}
.radius-slider input[type="range"]::-webkit-slider-thumb:hover {
transform: scale(1.1);
box-shadow: var(--shadow-glow);
}
.radius-value {
font-size: 0.9rem;
font-weight: 600;
color: var(--primary);
min-width: 60px;
text-align: right;
font-family: 'JetBrains Mono', monospace;
}
/* ========================================
按钮
======================================== */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--spacing-sm);
padding: var(--spacing-md) var(--spacing-lg);
border: none;
border-radius: var(--radius-md);
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: var(--transition-fast);
}
.btn-primary {
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
color: var(--bg-dark);
box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: var(--shadow-glow);
}
.btn-primary:active:not(:disabled) {
transform: translateY(0);
}
.btn-primary:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn-search {
width: 100%;
}
.btn-search svg {
width: 18px;
height: 18px;
}
/* ========================================
搜索结果
======================================== */
.results-section {
animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.result-list {
display: flex;
flex-direction: column;
gap: var(--spacing-sm);
max-height: 300px;
overflow-y: auto;
}
.result-item {
display: flex;
align-items: flex-start;
gap: var(--spacing-md);
padding: var(--spacing-md);
background: var(--bg-card);
border-radius: var(--radius-md);
border: 1px solid var(--border);
cursor: pointer;
transition: var(--transition-fast);
}
.result-item:hover {
background: var(--bg-card-hover);
border-color: var(--primary);
transform: translateX(4px);
}
.result-item.active {
border-color: var(--primary);
background: rgba(245, 158, 11, 0.1);
}
.result-rank {
width: 28px;
height: 28px;
background: var(--bg-elevated);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8rem;
font-weight: 700;
color: var(--text-muted);
flex-shrink: 0;
}
.result-item:nth-child(1) .result-rank {
background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
color: var(--bg-dark);
}
.result-item:nth-child(2) .result-rank {
background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
color: var(--bg-dark);
}
.result-item:nth-child(3) .result-rank {
background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
color: var(--bg-dark);
}
.result-info {
flex: 1;
min-width: 0;
}
.result-name {
font-weight: 600;
color: var(--text-primary);
margin-bottom: 4px;
}
.result-meta {
display: flex;
flex-wrap: wrap;
gap: var(--spacing-sm);
font-size: 0.8rem;
color: var(--text-muted);
}
.result-meta span {
display: flex;
align-items: center;
gap: 4px;
}
.result-distance {
color: var(--success) !important;
font-weight: 500;
}
.result-tel {
color: var(--info) !important;
}
/* ========================================
地图区域
======================================== */
.map-area {
flex: 1;
position: relative;
background: var(--bg-darker);
}
#mapContainer {
width: 100%;
height: 100%;
}
/* 移动端搜索框 */
.mobile-search-bar {
display: none;
position: absolute;
top: var(--spacing-md);
left: var(--spacing-md);
right: var(--spacing-md);
z-index: 50;
}
.mobile-search-input-wrapper {
position: relative;
display: flex;
align-items: center;
}
.mobile-search-bar input {
width: 100%;
padding: 12px 40px 12px 16px;
background: rgba(26, 26, 46, 0.95);
backdrop-filter: blur(10px);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
color: var(--text-primary);
font-size: 0.9rem;
box-shadow: var(--shadow-md);
}
.mobile-search-bar input:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px var(--primary-glow);
}
.mobile-search-bar input::placeholder {
color: var(--text-muted);
}
.mobile-search-clear {
position: absolute;
right: 8px;
width: 28px;
height: 28px;
background: var(--bg-card-hover);
border: none;
border-radius: 50%;
color: var(--text-secondary);
font-size: 1.1rem;
cursor: pointer;
}
.mobile-search-tips {
position: absolute;
top: 100%;
left: 0;
right: 0;
margin-top: 4px;
background: rgba(26, 26, 46, 0.98);
backdrop-filter: blur(10px);
border: 1px solid var(--border);
border-radius: var(--radius-md);
max-height: 250px;
overflow-y: auto;
display: none;
box-shadow: var(--shadow-lg);
}
.mobile-search-tips.active {
display: block;
}
.mobile-search-tip-item {
padding: 12px 16px;
border-bottom: 1px solid var(--border);
cursor: pointer;
}
.mobile-search-tip-item:last-child {
border-bottom: none;
}
.mobile-search-tip-item:active {
background: var(--bg-card-hover);
}
.mobile-search-tip-item .tip-name {
font-weight: 500;
color: var(--text-primary);
font-size: 0.9rem;
margin-bottom: 2px;
}
.mobile-search-tip-item .tip-address {
font-size: 0.8rem;
color: var(--text-muted);
}
/* 地图点击确认弹框 */
.map-click-confirm {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 200;
display: flex;
align-items: center;
justify-content: center;
padding: var(--spacing-md);
}
.map-click-confirm .confirm-content {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: var(--spacing-lg);
max-width: 320px;
width: 100%;
box-shadow: var(--shadow-lg);
animation: popIn 0.2s ease;
}
@keyframes popIn {
from {
opacity: 0;
transform: scale(0.9);
}
to {
opacity: 1;
transform: scale(1);
}
}
.map-click-confirm .confirm-title {
font-size: 1.1rem;
font-weight: 600;
color: var(--text-primary);
margin-bottom: var(--spacing-md);
text-align: center;
}
.map-click-confirm .confirm-address {
font-size: 0.9rem;
color: var(--text-secondary);
text-align: center;
padding: var(--spacing-md);
background: var(--bg-darker);
border-radius: var(--radius-md);
margin-bottom: var(--spacing-lg);
line-height: 1.5;
max-height: 80px;
overflow-y: auto;
}
.map-click-confirm .confirm-actions {
display: flex;
gap: var(--spacing-md);
}
.map-click-confirm .confirm-btn {
flex: 1;
padding: 12px;
border: none;
border-radius: var(--radius-md);
font-size: 0.95rem;
font-weight: 600;
cursor: pointer;
transition: var(--transition-fast);
}
.map-click-confirm .confirm-btn.cancel {
background: var(--bg-elevated);
color: var(--text-secondary);
border: 1px solid var(--border);
}
.map-click-confirm .confirm-btn.cancel:active {
background: var(--bg-card-hover);
}
.map-click-confirm .confirm-btn.ok {
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
color: var(--bg-dark);
}
.map-click-confirm .confirm-btn.ok:active {
transform: scale(0.98);
}
/* 浮动结果按钮 */
.floating-result-btn {
position: fixed;
bottom: 24px;
right: 24px;
padding: 10px 16px;
background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
border: none;
border-radius: 25px;
color: #0f0f1a;
font-size: 0.85rem;
font-weight: 700;
cursor: pointer;
z-index: 9999;
display: none;
align-items: center;
gap: 6px;
box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5);
}
.floating-result-btn:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}
.floating-result-btn.visible {
display: flex !important;
}
.floating-result-btn .result-icon {
display: none;
}
.floating-result-btn .result-text {
display: none;
}
.floating-result-btn .result-badge {
background: #0f0f1a;
color: #f59e0b;
font-weight: 700;
padding: 4px 8px;
border-radius: 10px;
font-size: 0.8rem;
min-width: 20px;
text-align: center;
}
/* PC端显示为紧凑按钮图标+数字 */
.floating-result-btn::before {
content: '📋';
font-size: 1rem;
}
@media (max-width: 768px) {
.mobile-search-bar {
display: block;
}
.floating-result-btn {
bottom: 100px;
left: 50%;
right: auto;
transform: translateX(-50%);
padding: 12px 16px;
border-radius: 50px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(245, 158, 11, 0.3);
backdrop-filter: blur(8px);
background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(217, 119, 6, 0.95) 100%);
animation: floatPulse 2s ease-in-out infinite;
gap: 8px;
}
.floating-result-btn::before {
content: '📋';
font-size: 1.2rem;
}
.floating-result-btn::after {
content: none;
}
.floating-result-btn .result-badge {
padding: 4px 12px;
font-size: 0.9rem;
font-weight: 700;
border-radius: 14px;
background: rgba(15, 15, 26, 0.95);
min-width: 24px;
}
@keyframes floatPulse {
0%, 100% {
transform: translateX(-50%) translateY(0);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 20px rgba(245, 158, 11, 0.3);
}
50% {
transform: translateX(-50%) translateY(-4px);
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3), 0 0 30px rgba(245, 158, 11, 0.5);
}
}
}
/* 中心点信息 */
.center-info {
position: absolute;
top: var(--spacing-lg);
left: 50%;
transform: translateX(-50%);
z-index: 10;
}
.center-badge {
display: flex;
align-items: center;
gap: var(--spacing-sm);
padding: var(--spacing-sm) var(--spacing-lg);
background: var(--bg-card);
border: 1px solid var(--primary);
border-radius: 30px;
box-shadow: var(--shadow-lg);
animation: bounceIn 0.5s ease;
}
@keyframes bounceIn {
0% {
opacity: 0;
transform: translateX(-50%) scale(0.5);
}
60% {
transform: translateX(-50%) scale(1.1);
}
100% {
opacity: 1;
transform: translateX(-50%) scale(1);
}
}
.center-icon {
font-size: 1.2rem;
}
.center-badge span:last-child {
font-weight: 500;
color: var(--primary);
}
/* 加载遮罩 */
.loading-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(15, 15, 26, 0.8);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: var(--spacing-md);
z-index: 100;
backdrop-filter: blur(4px);
}
.loading-spinner {
width: 48px;
height: 48px;
border: 3px solid var(--border);
border-top-color: var(--primary);
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.loading-overlay span {
color: var(--text-secondary);
font-weight: 500;
}
/* ========================================
地图自定义标记样式
======================================== */
.custom-marker {
width: 36px;
height: 36px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
font-size: 14px;
color: white;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
border: 3px solid white;
cursor: pointer;
transition: transform 0.2s ease;
}
.custom-marker:hover {
transform: scale(1.15);
}
.center-marker {
width: 48px;
height: 48px;
background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
border: 3px solid white;
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% {
box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}
50% {
box-shadow: 0 0 40px rgba(245, 158, 11, 0.8);
}
}
.poi-marker {
width: 32px;
height: 32px;
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
border: 2px solid white;
cursor: pointer;
}
.poi-marker:hover {
transform: scale(1.2);
}
/* ========================================
信息窗口样式
======================================== */
.amap-info-content {
padding: 0 !important;
background: transparent !important;
border: none !important;
box-shadow: none !important;
}
.amap-info-sharp {
display: none !important;
}
.info-window {
padding: var(--spacing-md) var(--spacing-lg);
min-width: 220px;
max-width: 300px;
background: rgba(22, 33, 62, 0.95);
backdrop-filter: blur(12px);
border: 1px solid rgba(245, 158, 11, 0.3);
border-radius: var(--radius-md);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(245, 158, 11, 0.1);
overflow: visible;
}
.info-window h3 {
font-size: 1rem;
font-weight: 600;
color: var(--primary-light);
margin-bottom: var(--spacing-sm);
padding-bottom: var(--spacing-sm);
border-bottom: 1px solid var(--border);
}
.info-window p {
font-size: 0.85rem;
color: var(--text-secondary);
margin-bottom: 6px;
line-height: 1.5;
}
.info-window p:last-child {
margin-bottom: 0;
}
.info-window .distance {
color: var(--success);
font-weight: 600;
}
.info-window .tel {
color: var(--info);
}
.info-window .tel a {
color: var(--info);
text-decoration: none;
}
.info-window .tel a:hover {
text-decoration: underline;
}
.info-window .nav-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
margin-top: var(--spacing-md);
padding: var(--spacing-sm) var(--spacing-md);
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
color: var(--bg-dark);
font-size: 0.85rem;
font-weight: 600;
text-decoration: none;
border-radius: var(--radius-sm);
transition: var(--transition-fast);
}
.info-window .nav-btn:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px var(--primary-glow);
}
.info-window .nav-btn svg {
width: 16px;
height: 16px;
}
/* ========================================
响应式设计
======================================== */
@media (max-width: 1024px) {
:root {
--sidebar-width: 360px;
}
}
/* ========================================
移动端快捷操作栏
======================================== */
.mobile-action-bar {
display: none;
position: fixed;
bottom: 0;
left: 0;
right: 0;
padding: var(--spacing-sm) var(--spacing-md);
padding-bottom: calc(var(--spacing-sm) + env(safe-area-inset-bottom, 0));
background: rgba(26, 26, 46, 0.95);
backdrop-filter: blur(10px);
border-top: 1px solid var(--border);
z-index: 60;
gap: var(--spacing-sm);
flex-direction: column;
}
.mobile-action-bar .action-row {
display: flex;
align-items: center;
gap: var(--spacing-sm);
}
.mobile-action-bar .action-info {
display: flex;
align-items: center;
gap: var(--spacing-sm);
color: var(--text-secondary);
font-size: 0.85rem;
padding: 0 var(--spacing-sm);
}
.mobile-action-bar .location-badge {
background: var(--primary);
color: var(--bg-dark);
font-weight: 700;
padding: 2px 8px;
border-radius: 12px;
min-width: 20px;
text-align: center;
font-size: 0.8rem;
}
.mobile-action-bar .action-search-btn {
flex: 1;
padding: 10px var(--spacing-md);
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
border: none;
border-radius: var(--radius-md);
color: var(--bg-dark);
font-size: 0.9rem;
font-weight: 600;
cursor: pointer;
}
.mobile-action-bar .action-search-btn:disabled {
opacity: 0.5;
}
.mobile-action-bar .menu-btn {
width: 40px;
height: 40px;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius-md);
color: var(--text-primary);
font-size: 1.2rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
}
/* ========================================
移动端切换按钮(隐藏,改用底部菜单)
======================================== */
.mobile-toggle {
display: none;
}
/* 侧边栏遮罩 */
.sidebar-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 99;
opacity: 0;
transition: opacity var(--transition-normal);
pointer-events: none;
}
.sidebar-overlay.active {
opacity: 1;
pointer-events: auto;
}
/* ========================================
平板端适配 (768px - 1024px)
======================================== */
@media (max-width: 1024px) {
:root {
--sidebar-width: 360px;
}
.floating-results {
width: 340px;
}
}
/* ========================================
移动端适配 (< 768px)
======================================== */
@media (max-width: 768px) {
:root {
--spacing-md: 12px;
--spacing-lg: 16px;
}
.app-container {
flex-direction: column;
}
/* 移动端显示操作栏 */
.mobile-action-bar {
display: flex;
}
/* 侧边栏改为底部弹出面板 */
.sidebar {
position: fixed;
bottom: 70px; /* 显示在底部操作栏上方 */
left: 0;
right: 0;
top: auto;
width: 100%;
min-width: 100%;
max-height: 60vh;
z-index: 100;
transform: translateY(calc(100% + 70px));
transition: transform var(--transition-normal);
border-radius: var(--radius-xl) var(--radius-xl) 0 0;
overflow: hidden;
}
.sidebar.active {
transform: translateY(0);
}
.sidebar-overlay {
display: block;
bottom: 70px; /* 不覆盖底部操作栏 */
}
/* 地图全屏 */
.map-area {
width: 100%;
height: 100vh;
}
/* Logo 简化 */
.logo {
padding: var(--spacing-md);
position: relative;
}
/* 添加拖动指示条 */
.logo::before {
content: '';
position: absolute;
top: 8px;
left: 50%;
transform: translateX(-50%);
width: 40px;
height: 4px;
background: var(--border-light);
border-radius: 2px;
}
.logo-icon {
width: 36px;
height: 36px;
}
.logo-icon svg {
width: 22px;
height: 22px;
}
.logo h1 {
font-size: 1.1rem;
margin-top: 4px;
}
/* 侧边栏内容可滚动 */
.sidebar-content {
padding: var(--spacing-md);
gap: var(--spacing-md);
max-height: calc(70vh - 80px);
overflow-y: auto;
padding-bottom: calc(var(--spacing-lg) + env(safe-area-inset-bottom, 0));
}
.section {
padding: var(--spacing-md);
}
.section-header h2 {
font-size: 0.9rem;
}
/* 位置列表 */
.locations-section {
display: none; /* 移动端隐藏位置列表,只在地图上显示 */
}
.search-section .section-header {
display: none; /* 简化标题 */
}
/* 快捷标签 */
.quick-tags {
gap: 6px;
margin-top: var(--spacing-sm);
}
.tag {
padding: 8px 12px;
font-size: 0.85rem;
}
.form-group {
margin-bottom: var(--spacing-md);
}
.form-group label {
font-size: 0.85rem;
margin-bottom: 6px;
}
/* 隐藏侧边栏中的搜索按钮(使用底部操作栏的按钮) */
.btn-search {
display: none;
}
/* 中心点信息 */
.center-info {
top: var(--spacing-md);
left: 50%;
transform: translateX(-50%);
}
.center-badge {
padding: 6px var(--spacing-md);
font-size: 0.8rem;
}
/* 浮动结果面板 - 底部弹出,更紧凑 */
.floating-results {
position: fixed;
top: auto;
bottom: 0;
left: 0;
right: 0;
width: 100%;
max-height: 75vh;
border-radius: var(--radius-xl) var(--radius-xl) 0 0;
animation: slideUp 0.3s ease;
background: var(--bg-card) !important;
backdrop-filter: blur(16px);
display: flex;
flex-direction: column;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(100%);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.floating-results-header {
padding: var(--spacing-sm) var(--spacing-md);
padding-top: var(--spacing-lg);
border-radius: var(--radius-xl) var(--radius-xl) 0 0;
position: relative;
background: var(--bg-elevated);
}
/* 拖动指示条 */
.floating-results-header::before {
content: '';
position: absolute;
top: 8px;
left: 50%;
transform: translateX(-50%);
width: 36px;
height: 4px;
background: var(--border-light);
border-radius: 2px;
}
.floating-results-header h3 {
font-size: 1rem;
display: flex;
align-items: center;
gap: 8px;
}
.floating-results-filter {
padding: 8px var(--spacing-md);
background: var(--bg-card);
}
.floating-results-filter input {
padding: 10px var(--spacing-md);
font-size: 0.9rem;
}
.floating-result-list {
padding: 10px 16px;
padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
gap: 10px;
background: var(--bg-card);
flex: 1;
overflow-y: auto;
}
/* 移动端列表项布局修复 - 使用 !important 覆盖基础样式 */
.floating-result-list > .floating-result-item {
display: grid !important;
grid-template-columns: 36px 1fr 65px !important;
gap: 10px !important;
align-items: center !important;
padding: 12px !important;
background: var(--bg-darker) !important;
border: 1px solid var(--border) !important;
border-radius: var(--radius-md) !important;
}
.floating-result-list > .floating-result-item > .rank {
grid-column: 1 !important;
width: 36px !important;
height: 36px !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
}
.floating-result-list > .floating-result-item > .info {
grid-column: 2 !important;
display: flex !important;
flex-direction: column !important;
gap: 4px !important;
min-width: 0 !important;
overflow: hidden !important;
}
.floating-result-list > .floating-result-item > .info > .name {
font-size: 0.95rem !important;
font-weight: 600 !important;
color: var(--text-primary) !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
}
.floating-result-list > .floating-result-item > .info > .address {
font-size: 0.8rem !important;
color: var(--text-muted) !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
}
.floating-result-list > .floating-result-item > .info > .tel {
font-size: 0.8rem !important;
color: var(--info) !important;
}
.floating-result-list > .floating-result-item > .distance-badge {
grid-column: 3 !important;
width: 65px !important;
min-width: 65px !important;
max-width: 65px !important;
padding: 8px 4px !important;
text-align: center !important;
display: flex !important;
flex-direction: column !important;
align-items: center !important;
justify-content: center !important;
background: rgba(16, 185, 129, 0.12) !important;
border-radius: var(--radius-sm) !important;
border: 1px solid rgba(16, 185, 129, 0.25) !important;
}
.floating-result-list > .floating-result-item > .distance-badge > .num {
font-size: 1.1rem !important;
font-weight: 700 !important;
color: var(--success) !important;
display: block !important;
}
.floating-result-list > .floating-result-item > .distance-badge > .unit {
font-size: 0.7rem !important;
color: var(--success) !important;
display: block !important;
}
/* 信息窗口更紧凑 */
.info-window {
min-width: 200px;
max-width: 280px;
padding: var(--spacing-md);
}
.info-window h3 {
font-size: 0.95rem;
padding-bottom: 8px;
margin-bottom: 8px;
}
.info-window p {
font-size: 0.82rem;
margin-bottom: 6px;
}
.info-window .nav-btn {
padding: 10px 14px;
font-size: 0.85rem;
margin-top: 10px;
}
.info-window .nav-btn svg {
width: 16px;
height: 16px;
}
/* 地图标记更小 */
.custom-marker {
width: 30px;
height: 30px;
font-size: 11px;
border-width: 2px;
}
.center-marker {
width: 36px;
height: 36px;
font-size: 18px;
border-width: 2px;
}
.poi-marker {
width: 26px;
height: 26px;
font-size: 11px;
border-width: 2px;
}
}
/* ========================================
小屏手机适配 (< 375px)
======================================== */
@media (max-width: 375px) {
.floating-results {
max-height: 60vh;
}
.tag {
padding: 6px 10px;
font-size: 0.8rem;
}
.mobile-action-bar .action-search-btn {
font-size: 0.85rem;
padding: 8px var(--spacing-md);
}
}
/* ========================================
横屏模式
======================================== */
@media (max-width: 768px) and (orientation: landscape) {
.sidebar {
max-height: 85vh;
}
.sidebar-content {
max-height: calc(85vh - 70px);
}
.floating-results {
max-height: 80vh;
width: 55%;
right: 0;
left: auto;
border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.mobile-action-bar {
width: 45%;
left: 0;
right: auto;
border-radius: 0 var(--radius-lg) 0 0;
}
}
/* ========================================
触摸优化
======================================== */
@media (hover: none) and (pointer: coarse) {
/* 增大触摸目标 */
.tag {
min-height: 44px;
display: inline-flex;
align-items: center;
}
.location-remove {
width: 36px;
height: 36px;
}
.floating-result-item {
min-height: 64px;
}
/* 移除hover效果改用active */
.floating-result-item:hover {
background: var(--bg-darker);
border-color: transparent;
transform: none;
}
.floating-result-item:active {
background: var(--bg-card-hover);
border-color: var(--primary);
}
.tag:hover {
background: var(--bg-card);
border-color: var(--border);
color: var(--text-secondary);
}
.tag:active {
background: var(--bg-card-hover);
border-color: var(--primary);
color: var(--primary);
}
}
/* ========================================
浮动搜索结果面板
======================================== */
.floating-results {
position: absolute;
top: var(--spacing-lg);
right: var(--spacing-lg);
width: 380px;
max-height: calc(100vh - 100px);
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-lg);
z-index: 50;
display: flex;
flex-direction: column;
animation: slideInRight 0.3s ease;
overflow: hidden;
}
@keyframes slideInRight {
from {
opacity: 0;
transform: translateX(20px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.floating-results-header {
display: flex;
align-items: center;
gap: var(--spacing-sm);
padding: var(--spacing-md) var(--spacing-lg);
border-bottom: 1px solid var(--border);
background: var(--bg-elevated);
border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.floating-results-header h3 {
flex: 1;
font-size: 1rem;
font-weight: 600;
color: var(--text-primary);
margin: 0;
}
.floating-results-header .result-count {
background: var(--primary);
color: var(--bg-dark);
font-size: 0.75rem;
font-weight: 700;
padding: 2px 10px;
border-radius: 20px;
min-width: 24px;
text-align: center;
}
.floating-results-header .close-btn {
width: 28px;
height: 28px;
background: transparent;
border: 1px solid var(--border);
border-radius: 50%;
color: var(--text-muted);
cursor: pointer;
font-size: 1.2rem;
line-height: 1;
transition: var(--transition-fast);
display: flex;
align-items: center;
justify-content: center;
}
.floating-results-header .close-btn:hover {
background: var(--error);
border-color: var(--error);
color: white;
}
.floating-results-filter {
padding: var(--spacing-sm) var(--spacing-md);
border-bottom: 1px solid var(--border);
}
.floating-results-filter input {
width: 100%;
padding: var(--spacing-sm) var(--spacing-md);
background: var(--bg-darker);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text-primary);
font-size: 0.85rem;
transition: var(--transition-fast);
}
.floating-results-filter input:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 2px var(--primary-glow);
}
.floating-results-filter input::placeholder {
color: var(--text-muted);
}
.floating-result-list {
flex: 1;
overflow-y: auto;
padding: var(--spacing-sm);
display: flex;
flex-direction: column;
gap: var(--spacing-sm);
background: var(--bg-card);
}
.floating-result-list::-webkit-scrollbar {
width: 6px;
}
.floating-result-list::-webkit-scrollbar-track {
background: transparent;
}
.floating-result-list::-webkit-scrollbar-thumb {
background: var(--border);
border-radius: 3px;
}
.floating-result-item {
display: flex;
align-items: flex-start;
gap: var(--spacing-md);
padding: var(--spacing-md);
background: var(--bg-darker);
border-radius: var(--radius-md);
border: 1px solid transparent;
cursor: pointer;
transition: var(--transition-fast);
}
.floating-result-item:hover {
background: var(--bg-card-hover);
border-color: var(--primary);
}
.floating-result-item.active {
border-color: var(--primary);
background: rgba(245, 158, 11, 0.15);
box-shadow: 0 0 12px var(--primary-glow);
}
.floating-result-item.hidden {
display: none;
}
.floating-result-item .rank {
width: 28px;
height: 28px;
background: var(--bg-elevated);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8rem;
font-weight: 700;
color: var(--text-muted);
flex-shrink: 0;
margin-top: 2px;
}
.floating-result-item:nth-child(1) .rank {
background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
color: var(--bg-dark);
}
.floating-result-item:nth-child(2) .rank {
background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
color: var(--bg-dark);
}
.floating-result-item:nth-child(3) .rank {
background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
color: var(--bg-dark);
}
.floating-result-item .info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 4px;
overflow: visible;
}
.floating-result-item .name {
font-weight: 600;
font-size: 0.95rem;
color: var(--text-primary);
line-height: 1.3;
word-break: break-word;
}
.floating-result-item .address {
font-size: 0.8rem;
color: var(--text-muted);
line-height: 1.4;
word-break: break-word;
}
.floating-result-item .tel {
font-size: 0.8rem;
color: var(--info);
display: flex;
align-items: center;
gap: 4px;
}
.floating-result-item .tel a {
color: var(--info);
text-decoration: none;
}
.floating-result-item .tel a:hover {
text-decoration: underline;
}
.floating-result-item .distance-badge {
flex-shrink: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-width: 50px;
max-width: 55px;
padding: var(--spacing-sm);
background: rgba(16, 185, 129, 0.12);
border-radius: var(--radius-sm);
border: 1px solid rgba(16, 185, 129, 0.25);
align-self: center;
}
.floating-result-item .distance-badge .num {
font-size: 1rem;
font-weight: 700;
color: var(--success);
font-family: 'JetBrains Mono', monospace;
}
.floating-result-item .distance-badge .unit {
font-size: 0.7rem;
color: var(--success);
opacity: 0.8;
}
.floating-result-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: var(--spacing-xl);
color: var(--text-muted);
text-align: center;
gap: var(--spacing-sm);
}
.floating-result-empty .icon {
font-size: 2.5rem;
opacity: 0.5;
}
/* ========================================
高德地图样式覆盖
======================================== */
.amap-logo,
.amap-copyright {
opacity: 0.5;
}
.amap-info-close {
font-size: 16px !important;
}
/* 高德定位控件位置调整 - 移动端避免被底部栏遮挡 */
@media (max-width: 768px) {
.amap-geolocation-con {
bottom: 140px !important;
right: 16px !important;
}
/* 缩放控件也上移 */
.amap-zoom-touch-minus,
.amap-zoom-touch-plus,
.amap-zoomcontrol {
bottom: 200px !important;
}
}