html, body {
    height: 100%; /* 确保html和body占据整个视口高度，这对fixed定位的水印至关重要 */
    margin: 0;
    padding: 0;
}

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    position: relative; /* 保持相对定位，虽然水印改为fixed，但其他元素可能仍需此定位 */
}

#mapContainer {
    width: 100%;
    height: 40vh;
    min-height: 250px;
}

h1 {
    text-align: center;
    padding: 15px 0;
    margin: 0;
    background-color: #0c8eff;
    color: white;
}

#locationPrompt {
    background-color: #f0f9ff;
    padding: 10px;
    margin: 10px;
    border-radius: 5px;
    text-align: center;
    border: 1px solid #d0e8ff;
}

/* 门店卡片化效果增强 */
.store-info {
    background: white;
    margin: 10px 10px 20px 10px; /* 增加底部外边距，使卡片之间有明显间隔 */
    padding: 15px;
    border-radius: 10px; /* 进一步增大圆角，视觉更柔和 */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* 更明显、更立体的阴影效果 */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* 优化过渡效果，使其更流畅自然 */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #eee; /* 添加细微边框，增强卡片区分度 */
}

.store-info:hover {
    background-color: #e3f2fd; /* 更显眼的悬停背景色 */
    transform: translateY(-5px); /* 悬停时向上抬升更多，视觉效果更强 */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25); /* 悬停时阴影更深更广 */
}

.store-name {
    font-weight: bold;
    font-size: 19px; /* 门店名称字体再大一点 */
    margin-bottom: 8px;
    color: #0c8eff;
    border-bottom: 1px solid #f0f0f0; /* 添加底部细线，分隔名称和详情 */
    padding-bottom: 8px;
}

.store-address, .store-phone, .distance {
    font-size: 15px; /* 详细信息字体稍微增大 */
    margin-bottom: 6px; /* 调整间距 */
    color: #555;
}

.distance {
    font-weight: bold;
    color: #4CAF50; /* 距离颜色 */
    margin-top: 10px; /* 距离信息与上方内容拉开距离 */
    text-align: right; /* 距离信息靠右对齐 */
}


footer {
    text-align: center;
    padding: 10px;
    font-size: 12px;
    color: #999;
    margin-top: 20px;
    z-index: 1;
    position: relative;
}

.button {
    display: inline-block;
    margin: 10px 5px;
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); /* 给按钮也加点阴影 */
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.button:hover {
    background-color: #45a049;
    transform: translateY(-2px); /* 悬停时微抬 */
    box-shadow: 0 4px 8px rgba(0,0,0,0.25);
}

.button:active {
    transform: translateY(1px); /* 点击时下压 */
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

#adjustLocation {
    background-color: #2196F3;
}

#adjustLocation:hover {
    background-color: #0b7dda;
}

#cancelAdjust {
    background-color: #f44336;
}

#cancelAdjust:hover {
    background-color: #d32f2f;
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px auto;
    padding: 10px;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.05);
    max-width: 150px;
}

.loading-indicator span {
    position: relative;
    color: #333;
}

.loading-indicator span:after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

/* 关键修改：水印样式 - 确保全屏居中并旋转 */
.watermark {
    position: fixed; /* 使用fixed定位，确保相对于视口固定 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg); /* 先将元素自身中心移动到父元素中心，再旋转 */
    pointer-events: none; /* 使水印不影响点击事件 */
    z-index: 1000; /* 确保水印在最上层 */
    font-weight: bold;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px; /* 增加字母间距 */
    user-select: none; /* 防止水印文字被选中 */
    width: auto; /* 自动宽度，避免影响transform居中计算 */
    height: auto; /* 自动高度 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05); /* 添加轻微文字阴影，增加立体感 */
    display: flex; /* 使水印内容垂直排列 */
    flex-direction: column; /* 垂直方向排列 */
    align-items: center; /* 水平居中 */
    justify-content: center; /* 垂直居中 */
    /* 水印内容颜色和大小的默认值，您可以在这里调整 */
    --watermark-color: rgba(0, 0, 0, 0.08); /* 水印颜色，默认浅灰色 */
    --watermark-font-size: 50px; /* 水印字体大小，默认28px */
}

/* 水印的每一行 */
.watermark-line {
    color: var(--watermark-color); /* 使用CSS变量设置颜色 */
    font-size: var(--watermark-font-size); /* 使用CSS变量设置字体大小 */
    white-space: nowrap; /* 确保每一行文字不换行 */
    line-height: 1.2; /* 调整行高，使两行文字间距适中 */
}


/* 针对移动设备的优化 */
@media (max-width: 768px) {
    h1 {
        font-size: 20px;
        padding: 10px 0;
    }
    
    .store-info {
        padding: 12px;
        margin: 8px 8px 15px 8px; /* 移动端调整底部外边距 */
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 移动端阴影略小 */
    }
    
    .store-name {
        font-size: 17px;
        padding-bottom: 6px;
    }
    
    .store-address, .store-phone, .distance {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .watermark {
        /* 移动端水印字体大小调整，您可以在这里调整 */
        --watermark-font-size: 24px; 
        letter-spacing: 2px;
    }

    .modal-content {
        margin: 25% auto;
        width: 90%;
        padding: 15px;
    }
    
    .location-select-tip {
        font-size: 14px;
        padding: 10px;
    }
    
    #adjustLocation, #retryLocation {
        padding: 8px 15px;
        font-size: 14px;
    }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    transition: all 0.3s ease;
}

.modal-content {
    background-color: #fff;
    margin: 20% auto;
    padding: 20px;
    border-radius: 5px;
    width: 85%;
    max-width: 360px;
}

.modal-content h3 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: normal;
}

.modal-content p {
    margin: 10px 0;
    font-size: 15px;
    color: #333;
}

.modal-content ol {
    margin: 10px 0;
    padding-left: 20px;
    font-size: 15px;
}

.modal-content ol li {
    margin-bottom: 5px;
}

.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

#openSettings, #closeModal {
    width: 48%;
    padding: 10px 0;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    text-align: center;
}

#openSettings {
    background-color: #4CAF50;
    color: white;
}

#closeModal {
    background-color: #f1f1f1;
    color: #333;
}

/* 位置控制按钮区域 */
#locationControls {
    display: flex;
    justify-content: center;
    margin: 10px auto;
    gap: 10px;
}

/* 定位精度提示样式 */
.accuracy-info {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 10px;
}

.accuracy-icon {
    margin-right: 4px;
    font-weight: bold;
}

.accuracy-high {
    background-color: rgba(76, 175, 80, 0.2);
    color: #2e7d32;
}

.accuracy-medium {
    background-color: rgba(255, 152, 0, 0.2);
    color: #ef6c00;
}

.accuracy-low {
    background-color: rgba(244, 67, 54, 0.2);
    color: #c62828;
}

/* 位置选择文本提示 */
.location-select-tip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 1000;
    pointer-events: none;
}

/* 地图控制按钮样式（您原有的，保持不变） */
.map-controls {
    position: absolute;
    bottom: 90px;
    right: 10px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.map-button {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.map-button:hover {
    background-color: #f0f0f0;
}

.map-button:active {
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    transform: translateY(1px);
}