/* Map */
#map {
    flex: 1;
    width: 100%;
    height: 100%;
    z-index: var(--z-map);
    background: #242424;
    /* Fallback */
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: white;
}

.glass-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.glass-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.1);
}

/* Layout Overlays */
.controls-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: var(--z-ui);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    /* Let map clicks pass through */
}

.controls-overlay>* {
    pointer-events: auto;
    /* Re-enable for buttons */
}

.controls-group {
    display: flex;
    gap: 12px;
}

/* Route Selector */
.route-selector select {
    background: transparent;
    border: none;
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    padding: 10px 16px;
    outline: none;
    width: 100%;
    cursor: pointer;
}

.route-selector select option {
    background: #333;
    /* Fallback for dropdown */
    color: white;
}

/* Location Button */
#locate-btn {
    width: 48px;
    height: 48px;
}

/* POI Panel (Bottom Sheet style on Mobile) */
.poi-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    right: 20px;
    padding: 0;
    z-index: var(--z-ui);
    transition: transform 0.3s ease-in-out, opacity 0.3s;
    max-width: 500px;
    margin: 0 auto;
    /* Center on large screens */
}

.poi-panel.hidden {
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
}

#poi-title {
    margin-bottom: 4px;
    font-size: 1.5rem;
    font-weight: 700;
}

.poi-category {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

#poi-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.poi-header-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.poi-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poi-gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(20, 20, 20, 1), transparent);
}

.poi-content-wrapper {
    padding: 20px;
    position: relative;
    z-index: 2;
    margin-top: -30px;
    /* Overlap image */
}

#poi-credits {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    z-index: 5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    pointer-events: auto;
    /* Allow clicking links */
}

#poi-credits a {
    color: white;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
}

/* Custom Marker Icons (Larger) */
.custom-marker {
    background: var(--primary-color);
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
}

.custom-marker:hover {
    transform: scale(1.1);
    z-index: 1000;
}

/* Special Colors per type */
.marker-monument {
    background: #ffcc00;
    color: #000;
}

.marker-history {
    background: #ff5555;
    color: #fff;
}

.marker-art {
    background: #ff00ff;
    color: #fff;
}

.marker-memorial {
    background: #888;
    color: #fff;
}

.marker-tower {
    background: #00d2ff;
    color: #000;
}

/* Audio Player Controls */
.audio-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1a1a1a;
    flex-shrink: 0;
    transition: transform 0.1s;
}

.play-btn:active {
    transform: scale(0.95);
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: var(--primary-color);
    transition: width 0.1s linear;
}

.hidden {
    display: none !important;
}

/* Onboarding Modal */
.modal-centered {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.modal-content p {
    margin-bottom: 25px;
    opacity: 0.8;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ccc;
}

.input-group input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-group input:focus {
    border-color: var(--primary-color);
}

.action-btn {
    background: var(--primary-color);
    color: #1a1a1a;
    border: none;
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.3);
}

.action-btn:active {
    transform: scale(0.98);
}

.mode-preview {
    margin-bottom: 20px;
    font-style: italic;
    font-size: 0.9rem;
    color: #ffd700;
    height: 20px;
}