* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

#map {
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* ─── Map Title Overlay ─────────────────────────────── */

#map-title {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: white;
    padding: 12px 18px;
    border-radius: 12px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.13);
    border-left: 4px solid #e07b39;
    pointer-events: none;
}

#map-title h1 {
    font-size: 19px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.3px;
}

#map-title p {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ─── Coordinate Display ────────────────────────────── */

#coordinate-display {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.96);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.13);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

#coord-text {
    color: #555;
}

#copy-coords-btn {
    background: #e07b39;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 11px;
    font-family: inherit;
    transition: background 0.2s;
}

#copy-coords-btn:hover {
    background: #c0622a;
}

/* ─── Audio Markers ─────────────────────────────────── */

.audio-marker-container {
    position: relative;
    width: 46px;
    height: 46px;
}

.audio-marker-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 46px;
    height: 46px;
    background: #e07b39;
    border-radius: 50%;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(224, 123, 57, 0.5);
    z-index: 2;
    cursor: pointer;
    transition: transform 0.18s;
}

.audio-marker-inner:hover {
    transform: scale(1.12);
}

.audio-marker-number {
    color: white;
    font-weight: 700;
    font-size: 17px;
    line-height: 1;
}

.audio-marker-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(224, 123, 57, 0.35);
    animation: markerPulse 2.8s ease-out infinite;
    z-index: 1;
}

@keyframes markerPulse {
    0%   { transform: scale(1);   opacity: 0.8; }
    100% { transform: scale(2.6); opacity: 0;   }
}

/* ─── Sidebar ───────────────────────────────────────── */

#sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 390px;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    box-shadow: -4px 0 28px rgba(0, 0, 0, 0.14);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#sidebar.hidden {
    transform: translateX(100%);
}

.sidebar-bar {
    height: 6px;
    background: linear-gradient(90deg, #e07b39, #f0a05a);
    flex-shrink: 0;
}

.close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    background: #f2f2f2;
    color: #555;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.close-btn:hover {
    background: #e5e5e5;
}

#sidebar-content {
    padding: 30px 28px 28px;
    flex: 1;
    overflow-y: auto;
}

#point-number {
    font-size: 11px;
    font-weight: 700;
    color: #e07b39;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    margin-bottom: 8px;
}

#point-name {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
    margin-bottom: 16px;
}

#point-description {
    font-size: 15px;
    line-height: 1.7;
    color: #5a5a6e;
    margin-bottom: 30px;
}

/* ─── Audio Player ──────────────────────────────────── */

#audio-player {
    background: #f9f9fb;
    border: 1px solid #ebebef;
    border-radius: 16px;
    padding: 20px;
}

#player-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.play-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #e07b39;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(224, 123, 57, 0.4);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.play-btn:hover {
    background: #c0622a;
    transform: scale(1.06);
}

.play-btn:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.play-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.play-btn svg.hidden {
    display: none;
}

#progress-container {
    flex: 1;
}

#progress-bar {
    height: 5px;
    background: #ddd;
    border-radius: 3px;
    cursor: pointer;
    margin-bottom: 8px;
    position: relative;
}

#progress-fill {
    height: 100%;
    background: #e07b39;
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s linear;
}

#time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #aaa;
    font-family: 'Courier New', monospace;
}

#audio-status {
    text-align: center;
    font-size: 12px;
    color: #aaa;
    margin-top: 12px;
    min-height: 16px;
}

/* ─── Mobile ────────────────────────────────────────── */

@media (max-width: 768px) {
    #sidebar {
        width: 100%;
        height: 72vh;
        top: auto;
        bottom: 0;
        right: 0;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
    }

    #sidebar.hidden {
        transform: translateY(100%);
    }

    #sidebar:not(.hidden) {
        transform: translateY(0);
    }

    #map-title {
        top: 12px;
        left: 12px;
    }

    #coordinate-display {
        bottom: 12px;
        font-size: 12px;
    }
}