* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f0f3f5;
    color: #333;
    min-height: 100vh;
    overflow: hidden;
    touch-action: none;
}

.map-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
    background: rgb(112, 204, 229);
}

.map-container {
    position: absolute;
    width: 800px;
    height: 800px;
    left: 50%;
    top: 50%;
    transform-origin: center center;
}

.map-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

.spot {
    position: absolute;
    width: 22px;
    height: 22px;
    background: #ff6b6b;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease;
    z-index: 10;
}

.spot.attraction {
    background: #ff6b6b;
}

.spot.ticket {
    background: #38a1f3;
}

.spot.active {
    transform: translate(-50%, -50%) scale(1.4);
    z-index: 11;
    box-shadow: 0 0 0 6px rgba(255, 107, 107, 0.4);
}

.spot::after {
    content: attr(data-name);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    font-weight: 500;
    z-index: 5;
}

.spot:hover::after {
    opacity: 1;
}

.controls {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 20;
}

.control-btn {
    background: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 18px;
}

.control-btn.active {
    background: #4facfe;
    color: white;
    transform: scale(1.05);
}

.zoom-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 20;
}

.zoom-btn {
    background: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 20px;
    font-weight: bold;
}

.zoom-btn:active {
    transform: scale(0.95);
}

.action-bar {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: white;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 100;
    transition: bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-height: 40vh;
    overflow-y: auto;
}

.action-bar.active {
    bottom: 0;
}

.spot-info {
    width: 100%;
    text-align: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
}

.spot-info h3 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    color: #2d3436;
}

.spot-info p {
    color: #636e72;
    font-size: 0.95rem;
    line-height: 1.5;
}

.actions {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    justify-content: space-evenly;
}

.action-btn {
    background: linear-gradient(135deg, #f5f7fa, #e4edf9);
    color: #2d3436;
    border: none;
    border-radius: 16px;
    padding: 16px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.action-btn i {
    font-size: 22px;
    margin-bottom: 8px;
    color: #4facfe;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}

.action-btn:nth-child(1) i {
    color: #ff6b6b;
}

.action-btn:nth-child(2) i {
    color: #43e97b;
}

.action-btn:nth-child(3) i {
    color: #fa709a;
}

.action-btn:nth-child(4) i {
    color: #847ef7;
}

.audio-progress-container {
    width: 100%;
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.audio-progress {
    flex-grow: 1;
    height: 4px;
    accent-color: #4CAF50;
    cursor: pointer;
    width: calc(100% - 90px);
}

.audio-progress-container .time-display {
    font-size: 12px;
    color: #666;
    margin-left: 10px;
}

.close-bar {
    position: absolute;
    top: -42px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: white;
    color: #888;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    font-size: 24px;
}

/* 右侧功能按钮 */
.right-controls {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 20;
}

.right-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 20px;
    color: #2d3436;
}

.right-btn:hover {
    background: #4facfe;
    color: white;
    transform: scale(1.05);
}

/* 路线选择框 */
.route-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.route-popup.active {
    opacity: 1;
    pointer-events: all;
}

.route-container {
    background: white;
    width: 90%;
    height: 90%;
    max-width: 500px;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.route-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.route-title {
    font-size: 1.5rem;
    color: #2d3436;
}

.close-routes {
    width: 36px;
    height: 36px;
    background: #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #777;
}

.routes-list {
    display: grid;
    gap: 15px;
    height: 90%;
    overflow-y: scroll;
}

.route-item {
    background: #f5f8ff;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.route-item:hover {
    background: #e1eaff;
    transform: translateY(-2px);
}

.route-name {
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d3436;
    font-size: 1.1rem;
}

.route-spots {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.route-spot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    transition: all 0.2s;
}

.route-spot:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.route-spot-icon {
    width: 24px;
    height: 24px;
    background: #ff6b6b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
}

.route-spot-name {
    font-size: 0.95rem;
    color: #444;
}

.selected-location {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    z-index: 30;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    white-space: nowrap;
}

.selected-location.active {
    opacity: 1;
}

/* 详情弹窗样式 */
.detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 1000px;
    height: 80%;
    border-radius: 10px;
    position: relative;
}

#detailIframe {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.modal-body {
    height: 100%;
}

@media (min-width: 768px) {
    .actions {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }

    .action-btn {
        padding: 20px 10px;
        font-size: 15px;
    }

    .action-btn i {
        font-size: 26px;
    }

    .spot::after {
        padding: 8px 15px;
        font-size: 15px;
    }

    .spot-info h3 {
        font-size: 1.8rem;
    }

    .routes-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* 地图选择弹窗 */
.map-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5); display: none; justify-content: center; align-items: center;
    z-index: 1000;
}

.map-modal-content {
    background: white; border-radius: 10px; padding: 20px; width: 80%; max-width: 300px;
}

.map-modal h3 {
    margin: 0 0 15px; text-align: center; color: #333;
}

.map-options {
    display: flex; flex-direction: column; gap: 10px;
}

.map-option {
    padding: 15px; text-align: center; background: #f5f5f5; border-radius: 5px;
    cursor: pointer; transition: background 0.3s;
    text-decoration: none;
    color: black;
}

.map-option:hover {
    background: #e0e0e0;
}