@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ==========================================================================
   Design System & Variables
   ========================================================================== */
:root {
    /* Color Palette - Premium White/Light Theme */
    --bg-primary: #f8fafc;
    --bg-secondary: rgba(255, 255, 255, 0.85);
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-hover: rgba(241, 245, 249, 0.95);
    
    --border-color: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(15, 23, 42, 0.15);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    /* Brand Accent Colors */
    --accent-blue: #0077b6; /* Darker blue for contrast on white layout */
    --accent-purple: #7c3aed;
    --accent-gradient: linear-gradient(135deg, #0f172a 0%, #334155 100%); /* Slate gradient for primary buttons */
    --accent-glow: rgba(234, 179, 8, 0.25);
    
    /* Secondary Accent Color - Warm Yellow */
    --accent-yellow: #ca8a04; /* Rich amber gold for legibility and visual pop */
    --accent-yellow-bg: #fef08a; /* Soft yellow backdrop */
    --accent-yellow-glow: rgba(234, 179, 8, 0.35);
    --accent-yellow-gradient: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    
    --accent-success: #059669;
    --accent-warning: #d97706;
    --accent-danger: #dc2626;
    
    /* Layout & Shadows */
    --sidebar-width: 420px;
    --header-height: 70px;
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    
    --shadow-premium: 0 10px 30px -5px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
    --shadow-inset: inset 0 1px 1px rgba(255, 255, 255, 0.8);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* ==========================================================================
   Global Resets & Structure
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.12);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 23, 42, 0.25);
}

/* ==========================================================================
   Celebration Ticker Banner
   ========================================================================== */
.ticker-banner {
    background: #0072c6; /* Dynamic light-vibrant Helsinki brand blue */
    color: #ffffff;
    height: 30px;
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    z-index: 110;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ticker-text {
    position: absolute;
    white-space: nowrap;
    will-change: transform;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    animation: marquee-lr 18s linear infinite;
}

@keyframes marquee-lr {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100vw);
    }
}

/* ==========================================================================
   App Header
   ========================================================================== */
.app-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-logo:hover {
    transform: scale(1.03);
}

.hel-logo-svg {
    height: 36px;
    width: auto;
    display: block;
}

.brand-title {
    font-size: 1.35rem;
    font-weight: 700;
    background: linear-gradient(to right, #0f172a, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-badge {
    background: rgba(234, 179, 8, 0.10);
    border: 1px solid rgba(234, 179, 8, 0.25);
    color: var(--accent-yellow);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-header:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent-yellow-gradient);
    color: #0f172a;
    border: none;
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #fde047 0%, #ca8a04 100%);
    box-shadow: 0 6px 16px rgba(234, 179, 8, 0.4);
    color: #0f172a;
}

/* ==========================================================================
   Main Layout Container
   ========================================================================== */
.main-container {
    flex: 1;
    display: flex;
    position: relative;
    height: calc(100vh - var(--header-height) - 30px);
    width: 100%;
}

/* ==========================================================================
   Glassmorphic Sidebar
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    background: var(--bg-secondary);
    backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 90;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-premium);
}

/* Search and Filters */
.search-filter-panel {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 12px 16px 12px 42px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-yellow);
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.15);
    background: #ffffff;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

/* Filter Tags (Pills) Scroll area */
.categories-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.category-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.category-pill:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.category-pill.active {
    background: var(--accent-yellow-gradient);
    border-color: transparent;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.3);
}

/* Static filters info badge */
.filters-info-badge {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(234, 179, 8, 0.06);
    border: 1px solid rgba(234, 179, 8, 0.25);
    border-radius: var(--border-radius-sm);
    color: var(--accent-yellow);
    font-size: 0.8rem;
    font-weight: 500;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 1px rgba(234, 179, 8, 0.05);
}

.filters-info-badge span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filters-info-badge span:not(:last-child)::after {
    content: "•";
    margin-left: 12px;
    color: rgba(0, 210, 255, 0.25);
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Event List Scroll Container */
.event-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Event Item Card */
.event-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 12px;
    min-height: 110px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
}

.event-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0px;
    background: var(--accent-yellow-gradient);
    transition: width 0.2s ease;
}

.event-card:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-premium);
}

.event-card:hover::before {
    width: 4px;
}

.event-card.selected {
    background: rgba(234, 179, 8, 0.06);
    border-color: var(--accent-yellow);
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.15);
}

.event-card.selected::before {
    width: 4px;
}

.event-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    align-self: center;
}

.event-info {
    flex: 1;
    min-width: 0; /* allows text truncation */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: stretch; /* Stretch to fill card height for vertical space-between spacing */
}

.event-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.event-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.event-location-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-tags-row {
    margin-top: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.event-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-free {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-paid {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-category {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ==========================================================
   Map Container Wrapper
   ========================================================== */
.map-wrapper {
    flex: 1;
    position: relative;
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
}

/* ==========================================================
   Custom 3D Map Markers
   ========================================================== */
.custom-marker {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(10, 14, 20, 0.7);
    border: 2px solid #fff;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

.custom-marker::after {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--accent-blue);
    opacity: 0;
    animation: markerPulse 2s infinite ease-out;
}

.custom-marker i {
    color: var(--accent-blue);
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.custom-marker:hover {
    transform: scale(1.2) translateY(-4px);
    background: var(--accent-gradient);
    border-color: #fff;
    z-index: 10;
}

.custom-marker:hover i {
    color: #fff;
    transform: rotate(15deg);
}

.custom-marker.active {
    background: var(--accent-gradient);
    border-color: #ffffff;
    width: 38px;
    height: 38px;
    z-index: 20;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.6);
}

.custom-marker.active i {
    color: #fff;
    font-size: 1rem;
}

.custom-marker.active::after {
    animation: markerPulseActive 1.5s infinite ease-out;
}

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

@keyframes markerPulseActive {
    0% {
        transform: scale(0.9);
        opacity: 0.9;
        border-color: #00d2ff;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
        border-color: #8a2be2;
    }
}

/* ==========================================================
   Map Control Overlays
   ========================================================== */
.map-controls-overlay {
    position: absolute;
    right: 20px;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 80;
}

.control-btn-group {
    background: rgba(18, 26, 38, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 4px;
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
}

.control-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.control-btn.active {
    color: var(--accent-yellow);
    background: rgba(234, 179, 8, 0.12);
}

/* Compass widget override */
.mapboxgl-ctrl-group {
    background: rgba(18, 26, 38, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-md) !important;
    box-shadow: var(--shadow-premium) !important;
}
.mapboxgl-ctrl-group button {
    background-color: transparent !important;
}

/* ==========================================================
   Modal Dialog Styles (Common)
   ========================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-window {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 90%;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-window {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(15, 23, 42, 0.06);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

/* ==========================================================
   Specific Modals (Settings & Details)
   ========================================================== */

/* Settings Window */
.settings-window {
    width: 500px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.1);
}

.form-help {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.form-help a {
    color: var(--accent-yellow);
    text-decoration: underline;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Event Detail Window */
.detail-window {
    width: 720px;
    max-height: 85vh;
}

.detail-header-hero {
    position: relative;
    height: 250px;
    width: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
}

.detail-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1) 0%, #ffffff 100%);
}

.detail-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.detail-modal-close:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
}

.detail-content {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(85vh - 250px);
}

.detail-title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 16px;
}

.meta-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.meta-item-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    background: rgba(234, 179, 8, 0.12);
    color: var(--accent-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.meta-item-content {
    display: flex;
    flex-direction: column;
}

.meta-item-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.meta-item-value {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-top: 2px;
    line-height: 1.4;
}

.detail-description {
    line-height: 1.65;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.detail-description p {
    margin-bottom: 12px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.detail-action-bar {
    display: flex;
    gap: 12px;
}

.btn-detail-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: var(--border-radius-md);
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-detail-action.secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-detail-action.secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

/* ==========================================================
   Responsive & Adaptive Styles
   ========================================================== */
@media (max-width: 992px) {
    :root {
        --sidebar-width: 360px;
    }
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column-reverse; /* map on top, list on bottom */
    }
    
    .sidebar {
        width: 100%;
        height: 55%;
        border-right: none;
        border-top: 1px solid var(--border-color);
    }
    
    .map-wrapper {
        height: 45%;
    }
    
    .detail-window {
        width: 95%;
        max-height: 90vh;
    }
    
    .detail-content {
        max-height: calc(90vh - 200px);
        padding: 20px;
    }
    
    .detail-header-hero {
        height: 180px;
    }
    
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }
    
    .map-controls-overlay {
        top: auto;
        bottom: 20px;
        right: 15px;
    }
}

/* Floating Distance Card on Map */
.map-distance-card {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    width: 290px;
    z-index: 80;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(16px);
    border-bottom: 3px solid var(--accent-yellow);
    animation: distanceSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.distance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.distance-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.distance-close-btn:hover {
    color: var(--accent-danger);
    background: rgba(239, 68, 68, 0.06);
}

.distance-title {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.distance-title i {
    color: var(--accent-yellow);
}

.distance-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 2px 0 6px 0;
}

.distance-value-wrapper,
.distance-time-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.distance-time-wrapper {
    align-items: flex-end;
}

.distance-divider {
    width: 1px;
    height: 30px;
    background: var(--border-color);
    margin: 0 14px;
}

.distance-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.distance-value,
.distance-time {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.distance-destination {
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

/* Location toggle custom styles */
.btn-header.active-gps {
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.08);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}
.btn-header.active-gps:hover {
    border-color: rgba(16, 185, 129, 0.65);
    background: rgba(16, 185, 129, 0.16);
}

@keyframes distanceSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 15px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes pulseGlow {
    0% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
    100% { opacity: 0.6; transform: scale(1); }
}

.animate-pulse {
    animation: pulseGlow 1.8s infinite ease-in-out;
}

/* Explore Mode HUD Card */
.explore-hud-card {
    position: absolute;
    bottom: 24px;
    left: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 14px 18px;
    width: 290px;
    z-index: 80;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(16px);
    border-left: 3px solid var(--accent-yellow);
    animation: hudSlideRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hud-header {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.hud-title {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hud-title i {
    color: var(--accent-yellow);
}

.hud-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hud-control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.hud-action {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.keycap-group {
    display: flex;
    gap: 4px;
    align-items: center;
}

.keycap {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: 0 2px 0 0 #94a3b8, inset 0 1px 0 0 #ffffff;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 6px;
    min-width: 20px;
    text-align: center;
    display: inline-block;
    box-sizing: border-box;
}

.hud-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    font-size: 0.68rem;
    color: var(--text-muted);
    text-align: center;
}

@keyframes hudSlideRight {
    from {
        opacity: 0;
        transform: translateX(-15px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Map Hover Tooltip Card */
.map-tooltip-card {
    position: absolute;
    pointer-events: none;
    width: 240px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(12px);
    overflow: hidden;
    z-index: 1000;
    transition: opacity 0.15s ease;
}

.tooltip-hero-img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    background: rgba(15, 23, 42, 0.05);
}

.tooltip-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tooltip-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tooltip-venue {
    font-size: 0.75rem;
    color: var(--accent-yellow);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.tooltip-venue i {
    font-size: 0.75rem;
}

/* Header responsiveness on mobile viewports */
@media (max-width: 600px) {
    .brand-badge {
        display: none;
    }
    .brand-title {
        font-size: 1.1rem;
    }
    .btn-header {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    .app-header {
        padding: 0 12px;
        gap: 8px;
    }
    .brand-section {
        gap: 8px;
    }
    .hel-logo-svg {
        height: 30px;
    }
}

/* ==========================================================
   Visited Progress Gamification & Card Badges
   ========================================================== */
.visited-progress-container {
    padding: 16px 20px;
    background: rgba(234, 179, 8, 0.05);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.progress-title {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.progress-title i {
    color: var(--accent-yellow);
}

.progress-count {
    color: var(--text-secondary);
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(15, 23, 42, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-yellow) 0%, #ca8a04 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-visited-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--accent-success);
    font-size: 1.15rem;
    z-index: 2;
    animation: bounceIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.visited-btn.completed-state {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: var(--accent-success) !important;
    color: var(--accent-success) !important;
}

.visited-btn.completed-state:hover {
    background: rgba(16, 185, 129, 0.18) !important;
}

