/* ====================================================================
   TOP20ONMAP - HORIZONTAL NAVIGATION STYLES
   ==================================================================== */

/* ====================================================
   RESET & GLOBAL STYLES
   ==================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', system-ui, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ====================================================
   HORIZONTAL NAVIGATION BAR - THREE DOTS DESIGN
   ==================================================== */
.horizontal-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

/* Logo Section - Just the Icon */
.logo-section {
    display: flex;
    align-items: center;
    margin-right: 30px;
}

.logo-icon {
    font-size: 2rem;
    color: white;
}

/* Navigation Area */
.nav-area {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

/* Three Dots Menu */
.dots-menu {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dots-menu:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* FIXED: More specific selector for active state */
.dots-menu.active > .categories-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.dots-icon {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Add this to help debug the issue */
.dots-menu.active {
    background: rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.8) !important;
}

/* Categories Dropdown - FIXED */
.categories-dropdown {
    position: absolute;
    top: 60px;
    left: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    padding: 20px;
    min-width: 320px;
    max-width: 350px;
    width: 320px; /* Force specific width */
    min-height: 200px; /* Force minimum height */
    border: 1px solid #e1e5e9;
    z-index: 9999; /* Higher z-index */
    
    /* Start hidden but with proper box model */
    display: none;
    visibility: hidden;
    opacity: 0;
}

.dropdown-header {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f2ff;
}

.dropdown-header h3 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    margin-left: 10px;
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: #f8f9fa;
}

.category-item:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
    transform: translateX(5px);
}

.category-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #5a67d8;
}

.category-icon {
    font-size: 1.6rem;
    margin-right: 12px;
    min-width: 30px;
}

.category-content {
    flex: 1;
}

.category-name {
    font-weight: 600;
    font-size: 0.95rem;
}

/* Right Side Controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.region-selector {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 10px 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.region-selector:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* About Button - FIXED */
.about-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.about-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* FIXED: More specific selector for about menu */
.about-btn.active > .about-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.about-icon {
    color: white;
    font-size: 1.3rem;
}

.about-menu {
    position: absolute;
    top: 65px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 20px;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    border: 1px solid #e1e5e9;
    pointer-events: none;
}

/* FIXED: Force visibility when active */
.about-btn.active .about-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

.about-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e1e5e9;
}

.about-header h3 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin-left: 8px;
}

.about-content {
    color: #666;
    line-height: 1.5;
}

.about-content p {
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.about-features {
    list-style: none;
    margin: 15px 0;
}

.about-features li {
    padding: 4px 0;
    font-size: 0.85rem;
    color: #555;
}

.about-features li::before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    margin-right: 8px;
}

.about-footer {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #e1e5e9;
    text-align: center;
}

.about-footer p {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 8px;
}

.about-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.about-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.about-link:hover {
    background: #f0f2ff;
    color: #5a67d8;
}

/* ====================================================
   CURRENT SELECTION INDICATOR - LATEST VERSION
   ==================================================== */
.current-selection-indicator {
    display: flex;
    align-items: center;
    gap: 10px; /* Increased gap */
    margin-left: 15px;
    padding: 8px 16px; /* Bigger padding */
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px; /* Bigger border radius */
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 44px; /* Minimum height for better alignment */
}

.current-selection-indicator:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ENHANCED: Bigger category indicator with perfect alignment */
.category-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; /* Increased from 28px */
    height: 36px; /* Increased from 28px */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.2) 100%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    /* Perfect centering */
    flex-shrink: 0;
    position: relative;
}

.category-indicator .category-icon {
    font-size: 18px; /* Increased from 14px */
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    /* Perfect emoji centering */
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

/* ENHANCED: Bigger, brighter bundle indicator */
.bundle-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px; /* Increased from 20px */
    height: 26px; /* Increased from 20px */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #ffffff;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    /* ENHANCED BRIGHT LIGHT EFFECT */
    box-shadow: 
        0 0 0 2px rgba(102, 126, 234, 0.6),
        0 0 10px rgba(102, 126, 234, 0.8),
        0 0 20px rgba(102, 126, 234, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.2);
    animation: brightPulse 2s infinite;
}

.bundle-indicator .bundle-icon-small {
    font-size: 13px; /* Increased from 10px */
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    /* Perfect emoji centering */
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

/* ENHANCED: Bigger, brighter active state dot */
.bundle-indicator::after {
    content: '';
    position: absolute;
    top: -4px; /* Adjusted for bigger size */
    right: -4px; /* Adjusted for bigger size */
    width: 10px; /* Increased from 8px */
    height: 10px; /* Increased from 8px */
    background: #10b981;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 
        0 0 0 1px rgba(16, 185, 129, 0.4),
        0 0 8px rgba(16, 185, 129, 0.8),
        0 0 16px rgba(16, 185, 129, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.3);
    animation: greenDotPulse 2s infinite 0.5s;
}

#region-selector {
     background: transparent; 
    
    border: none;                           /* Remove border */
    border-radius: 10px;
    padding: 10px 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}



#region-selector label {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    margin: 0;
    white-space: nowrap;
}

#region-selector select {
    border: none;                           /* Remove border */
    border-radius: 4px;
    padding: 2px 2px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    cursor: pointer;
    min-width: 90px;
    font-family: inherit;
}







/* ENHANCED: More prominent pulsing animation */
@keyframes brightPulse {
    0% {
        box-shadow: 
            0 0 0 2px rgba(102, 126, 234, 0.6),
            0 0 10px rgba(102, 126, 234, 0.8),
            0 0 20px rgba(102, 126, 234, 0.4),
            0 2px 4px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 
            0 0 0 4px rgba(102, 126, 234, 0.8),
            0 0 16px rgba(102, 126, 234, 1.0),
            0 0 32px rgba(102, 126, 234, 0.6),
            0 2px 4px rgba(0, 0, 0, 0.2);
    }
    100% {
        box-shadow: 
            0 0 0 2px rgba(102, 126, 234, 0.6),
            0 0 10px rgba(102, 126, 234, 0.8),
            0 0 20px rgba(102, 126, 234, 0.4),
            0 2px 4px rgba(0, 0, 0, 0.2);
    }
}

/* Green dot pulse animation */
@keyframes greenDotPulse {
    0% {
        box-shadow: 
            0 0 0 1px rgba(16, 185, 129, 0.4),
            0 0 8px rgba(16, 185, 129, 0.8),
            0 0 16px rgba(16, 185, 129, 0.4),
            0 1px 3px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 
            0 0 0 3px rgba(16, 185, 129, 0.6),
            0 0 12px rgba(16, 185, 129, 1.0),
            0 0 24px rgba(16, 185, 129, 0.6),
            0 1px 3px rgba(0, 0, 0, 0.3);
    }
    100% {
        box-shadow: 
            0 0 0 1px rgba(16, 185, 129, 0.4),
            0 0 8px rgba(16, 185, 129, 0.8),
            0 0 16px rgba(16, 185, 129, 0.4),
            0 1px 3px rgba(0, 0, 0, 0.3);
    }
}

/* ✅ FAST, RESPONSIVE TOOLTIPS */
.category-indicator[title]:hover::before,
.bundle-indicator[title]:hover::before {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease-out 0.1s forwards; /* Fast appearance */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.category-indicator[title]:hover::after,
.bundle-indicator[title]:hover::after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(0, 0, 0, 0.9);
    z-index: 10001;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease-out 0.1s forwards; /* Fast appearance */
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Enhanced hover effects */
.current-selection-indicator:hover .bundle-indicator {
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.8),
        0 0 16px rgba(102, 126, 234, 1.0),
        0 0 32px rgba(102, 126, 234, 0.8),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

.current-selection-indicator:hover .bundle-indicator::after {
    box-shadow: 
        0 0 0 3px rgba(16, 185, 129, 0.6),
        0 0 12px rgba(16, 185, 129, 1.0),
        0 0 24px rgba(16, 185, 129, 0.8),
        0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ====================================================
   MAIN LAYOUT - UPDATED FOR 70PX NAV HEIGHT
   ==================================================== */
.main-container {
    margin-top: 70px;
    height: calc(100vh - 70px);
    display: flex;
}

.map-section {
    flex: 1;
    position: relative;
    background: #f8f9fa;
}

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

.ranking-section {
    width: 350px;
    background: white;
    border-left: 1px solid #e9ecef;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

.ranking-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ranking-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.ranking-subtitle {
    opacity: 0.9;
    font-size: 0.9rem;
}

.ranking-tiles {
    padding: 20px;
}

.ranking-tile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ranking-tile:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.1rem;
}

.location-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.location-info p {
    color: #666;
    font-size: 0.9rem;
}

.score {
    color: #667eea;
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 4px;
}

.no-data {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-style: italic;
}

/* Loading State */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #666;
    font-size: 1.1rem;
}

/* Loading state styling */
.loading-bundles {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
}

/* ====================================================
   BUNDLE STRIP STYLES - LATEST VERSION
   ==================================================== */
.bundle-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding-left: 60px;
}

.bundle-icon {
    width: 24px;  /* Slightly larger for better visibility */
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;  /* Always have border for consistent sizing */
    box-sizing: border-box;
}

/* Culture Explorer Bundle */
.bundle-icon.culture-explorer {
    background: #e3f2fd;
    color: #1976d2;
}

.bundle-icon.culture-explorer.active {
    background: #1976d2;
    color: white;
    border: 2px solid #0d47a1;  /* UPDATED: Circular border instead of tick */
    box-shadow: 0 0 0 2px #bbdefb;  /* Outer glow effect */
}

/* Biodiversity/Nature Explorer Bundle */
.bundle-icon.biodiversity-seeker,
.bundle-icon.nature-explorer {
    background: #e8f5e8;
    color: #2e7d32;
}

.bundle-icon.biodiversity-seeker.active,
.bundle-icon.nature-explorer.active {
    background: #2e7d32;
    color: white;
    border: 2px solid #1b5e20;  /* UPDATED: Circular border instead of tick */
    box-shadow: 0 0 0 2px #c8e6c8;  /* Outer glow effect */
}

/* Adventure Seeker Bundle */
.bundle-icon.adventure-seeker {
    background: #fff3e0;
    color: #f57c00;
}

.bundle-icon.adventure-seeker.active {
    background: #f57c00;
    color: white;
    border: 2px solid #ef6c00;  /* UPDATED: Circular border instead of tick */
    box-shadow: 0 0 0 2px #ffcc02;  /* Outer glow effect */
}

/* Family Traveler Bundle */
.bundle-icon.family-traveler {
    background: #fef7e0;
    color: #f59e0b;
}

.bundle-icon.family-traveler.active {
    background: #f59e0b;
    color: white;
    border: 2px solid #d97706;  /* UPDATED: Circular border instead of tick */
    box-shadow: 0 0 0 2px #fbbf24;  /* Outer glow effect */
}

/* Enhanced hover effects */
.bundle-icon:hover {
    transform: scale(1.15);  /* Slightly larger scale */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bundle-icon.active:hover {
    transform: scale(1.15);
    /* Keep the selection border on hover */
}

/* Dynamic color support (for bundles with custom colors from API) */
.bundle-icon[style*="--bundle-color"] {
    background: color-mix(in srgb, var(--bundle-color) 20%, white);
    color: var(--bundle-color);
}

.bundle-icon[style*="--bundle-color"].active {
    background: var(--bundle-color);
    color: white;
    border-color: color-mix(in srgb, var(--bundle-color) 80%, black);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--bundle-color) 30%, white);
}

/* Current Bundle Display in Ranking Header */
.current-bundle-display {
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
}

.bundle-label {
    opacity: 0.8;
    margin-right: 6px;
}

.bundle-name {
    font-weight: 600;
    color: white;
}

/* ====================================================
   MAP MARKER & POPUP STYLES
   ==================================================== */
/* Popup Styles */
.marker-popup {
    text-align: left;
    min-width: 280px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f2ff;
}

.popup-rank {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 0.9rem;
}

.popup-category {
    background: #f8f9fa;
    color: #666;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
}

.marker-popup h3 {
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 8px 0;
    line-height: 1.3;
}

.marker-popup p {
    color: #666;
    font-size: 0.9rem;
    margin: 6px 0;
    line-height: 1.4;
}

.popup-description {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    font-style: italic;
    border-left: 3px solid #667eea;
}

.popup-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

.popup-btn {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.popup-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.popup-btn:active {
    transform: translateY(0);
}

/* Custom Map Marker Styles */
.custom-marker-wrapper {
    background: transparent !important;
    border: none !important;
}

.custom-marker {
    animation: markerPulse 2s infinite;
}

.custom-marker:hover {
    transform: scale(1.1);
    z-index: 1000;
}

.marker-icon {
    z-index: 1;
    position: relative;
}

.marker-rank {
    animation: rankBounce 3s infinite;
}

/* Animations for markers */
@keyframes markerPulse {
    0% {
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    50% {
        box-shadow: 0 4px 12px rgba(0,0,0,0.3), 0 0 0 10px rgba(102, 126, 234, 0.1);
    }
    100% {
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
}

@keyframes rankBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ====================================================
   RESPONSIVE DESIGN - UPDATED FOR THREE DOTS DESIGN
   ==================================================== */

/* Current Selection Indicator Responsive */
@media (max-width: 768px) {
    .current-selection-indicator {
        padding: 6px 12px;
        gap: 8px;
        margin-left: 10px;
        min-height: 38px;
    }
    
    .category-indicator {
        width: 30px;
        height: 30px;
    }
    
    .category-indicator .category-icon {
        font-size: 15px;
    }
    
    .bundle-indicator {
        width: 22px;
        height: 22px;
    }
    
    .bundle-indicator .bundle-icon-small {
        font-size: 11px;
    }
    
    .bundle-indicator::after {
        top: -3px;
        right: -3px;
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 480px) {
    .current-selection-indicator {
        padding: 4px 8px;
        gap: 6px;
        margin-left: 8px;
        min-height: 32px;
    }
    
    .category-indicator {
        width: 24px;
        height: 24px;
    }
    
    .category-indicator .category-icon {
        font-size: 12px;
    }
    
    .bundle-indicator {
        width: 18px;
        height: 18px;
    }
    
    .bundle-indicator .bundle-icon-small {
        font-size: 9px;
    }
    
    .bundle-indicator::after {
        top: -2px;
        right: -2px;
        width: 6px;
        height: 6px;
    }
}

/* Bundle Strip Responsive */
@media (max-width: 768px) {
    .bundle-icon {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    .bundle-strip {
        gap: 6px;
    }
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .ranking-section {
        width: 300px;
    }
    
    .horizontal-nav {
        padding: 0 15px;
    }
    
    .logo-section {
        margin-right: 20px;
    }
    
   .categories-dropdown {
      /* Keep your existing styles... */
      display: none;
      opacity: 0;
      transform: translateY(-10px); /* Start slightly above */
      transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .dots-menu.active .categories-dropdown {
      display: block;
      opacity: 1;
      transform: translateY(0); /* Slide down to final position */
    }
}

.selection-text {
    font-size: 8px;  /* Very small */
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 6px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    text-align: center;
    letter-spacing: 0.2px;  /* Helps with readability at small sizes */
}

.current-selection-indicator {
    position: relative; /* Important: This creates positioning context */
    display: flex;
    align-items: center;
    margin-left: 12px;
}

.indicator-icons {
    display: flex;
    align-items: center;
    gap: 6px; /* Keep icons horizontal */
}

.category-indicator,
.bundle-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

/* ✅ UPDATED: Left-align text with selection indicator area */
.selection-text {
    position: absolute;
    top: 36px;
    left: 0;
    
    font-size: 8px;
    color: #FFD700;
    font-weight: bold;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 6px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    text-align: left;
    letter-spacing: 0.2px;
    
    z-index: 10;
    
    /* ✅ MOBILE FIXES */
    min-width: fit-content;
    overflow: visible;
}

   /* Demo styling to simulate your app */
        body {
            margin: 0;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
        }

        .demo-nav {
            background: rgba(255,255,255,0.1);
            padding: 12px 20px;
            display: flex;
            align-items: center;
            gap: 20px;
            backdrop-filter: blur(10px);
        }

        .demo-dots {
            background: rgba(255,255,255,0.2);
            padding: 8px 12px;
            border-radius: 20px;
            cursor: pointer;
        }

        .demo-selection {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .demo-icon {
            width: 32px;
            height: 32px;
            background: rgba(255,255,255,0.2);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .demo-map {
            height: 300px;
            background: #a8dadc;
            margin: 20px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #666;
        }

        .demo-ranking {
            position: fixed;
            right: 20px;
            top: 120px;
            width: 200px;
            background: white;
            border-radius: 10px;
            padding: 15px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        }

        /* QUICK TOUR STYLES */
        .quick-tour-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.4); /* ✅ LIGHTER: Reduced opacity from 0.7 to 0.4 */
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .tour-spotlight {
            position: absolute;
            border: 3px solid #FFD700;
            border-radius: 8px;
            box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45); /* ✅ LIGHTER: Reduced from 0.7 to 0.45 */
            transition: all 0.5s ease;
            pointer-events: none;
            /* ✅ GLOW EFFECT: Make highlighted area more visible */
            filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
        }

        .tour-tooltip {
            position: absolute;
            background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); /* ✅ GRADIENT BACKGROUND */
            padding: 18px 22px;
            border-radius: 16px; /* ✅ MORE ROUNDED */
            box-shadow: 0 12px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.1); /* ✅ BETTER SHADOW */
            max-width: 300px; /* ✅ SLIGHTLY WIDER */
            z-index: 10001;
            transform: translateY(-50%);
            border: 2px solid rgba(102, 126, 234, 0.1); /* ✅ SUBTLE BORDER */
        }

        .tour-tooltip h3 {
            margin: 0 0 10px 0;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* ✅ GRADIENT TEXT */
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            font-size: 17px;
            font-weight: 700; /* ✅ BOLDER */
            letter-spacing: -0.3px;
        }

        .tour-tooltip p {
            margin: 0 0 18px 0;
            color: #4a5568; /* ✅ BETTER CONTRAST */
            font-size: 14px;
            line-height: 1.5; /* ✅ BETTER READABILITY */
            font-weight: 400;
        }

        .tour-controls {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .tour-btn {
            padding: 10px 18px; /* ✅ SLIGHTLY BIGGER */
            border: none;
            border-radius: 8px; /* ✅ MORE ROUNDED */
            font-size: 14px; /* ✅ BIGGER FONT */
            font-weight: 600; /* ✅ BOLDER */
            cursor: pointer;
            transition: all 0.3s ease; /* ✅ SMOOTHER TRANSITION */
            text-transform: none;
            letter-spacing: 0.3px;
        }

        .tour-btn.primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* ✅ GRADIENT */
            color: white;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25); /* ✅ GLOW EFFECT */
        }

        .tour-btn.primary:hover {
            background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%); /* ✅ HOVER GRADIENT */
            transform: translateY(-1px); /* ✅ LIFT EFFECT */
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
        }

        .tour-btn.secondary {
            background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%); /* ✅ GRADIENT */
            color: #4a5568;
            border: 1px solid rgba(74, 85, 104, 0.2);
        }

        .tour-btn.secondary:hover {
            background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
            transform: translateY(-1px);
        }

        .tour-progress {
            font-size: 12px;
            color: #718096; /* ✅ BETTER COLOR */
            font-weight: 500;
            background: rgba(102, 126, 234, 0.1); /* ✅ SUBTLE BACKGROUND */
            padding: 4px 8px;
            border-radius: 12px;
        }

        /* Arrow pointing to elements */
        .tour-tooltip::before {
            content: '';
            position: absolute;
            width: 0;
            height: 0;
            border: 8px solid transparent;
        }

        .tour-tooltip.arrow-left::before {
            right: -16px;
            top: 10%;
            transform: translateY(-50%);
            border-left-color: white;
        }

        .tour-tooltip.arrow-right::before {
            left: -16px;
            top: 10%;
            transform: translateY(-50%);
            border-right-color: white;
        }

        .tour-tooltip.arrow-bottom::before {
            top: -16px;
            left: 40%;
            transform: translateX(-50%);
            border-bottom-color: white;
        }

        /* Welcome modal */
        .tour-welcome {
            background: white;
            padding: 30px;
            border-radius: 16px;
            text-align: center;
            max-width: 400px;
            margin: 20px;
        }

        .tour-welcome h2 {
            color: #333;
            margin: 0 0 15px 0;
            font-size: 24px;
        }

        .tour-welcome p {
            color: #666;
            margin: 0 0 25px 0;
            line-height: 1.5;
        }

        .welcome-buttons {
            display: flex;
            gap: 12px;
            justify-content: center;
        }

        /* Hide tour button */
        .start-tour-btn {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: #667eea;
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 25px;
            cursor: pointer;
            font-weight: 500;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }

        @media (max-width: 768px) {
            .tour-tooltip {
                max-width: 250px;
                padding: 12px 16px;
            }
            
            .tour-welcome {
                margin: 10px;
                padding: 25px;
            }
        }
        /* ✅ Quick Tour Button */
        .start-tour-btn {
            position: absolute;
            bottom: 20px;
            right: 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 25px;
            cursor: pointer;
            font-weight: 600;
            font-size: 13px;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
            z-index: 1000;
            transition: all 0.3s ease;
        }

        .start-tour-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
        }

        /* Add these styles to your CSS file for the bundle explanation tour */

.bundle-explanation-tooltip {
    width: 400px !important;
    max-width: 90vw;
}

.bundle-explanation {
    text-align: left;
}

.bundle-explanation h3 {
    margin: 0 0 10px 0;
    color: #1f2937;
    font-size: 18px;
}

.bundle-explanation p {
    margin: 0 0 15px 0;
    color: #6b7280;
    line-height: 1.4;
}

.weight-demo {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.weight-item-demo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.weight-item-demo:last-child {
    margin-bottom: 0;
}

.weight-label {
    min-width: 140px;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.weight-bar-demo {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.weight-fill-demo {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.8s ease;
}

.weight-value {
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
    min-width: 35px;
    text-align: right;
}

.tour-tip {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 10px;
    margin-top: 15px;
    font-size: 13px;
    color: #065f46;
}

.tour-tip strong {
    color: #047857;
}

/* Enhanced tour overlay styles */
.quick-tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tour-spotlight {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #667eea;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
    z-index: 10001;
}

.tour-tooltip {
    position: absolute;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    max-width: 350px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.tour-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.tour-progress {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.tour-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.tour-btn.primary {
    background: #667eea;
    color: white;
}

.tour-btn.primary:hover {
    background: #5a6fd8;
}

.tour-btn.secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.tour-btn.secondary:hover {
    background: #e5e7eb;
}

/* Animation for weight bars */
@keyframes fillBar {
    from { width: 0%; }
    to { width: var(--target-width); }
}

.weight-fill-demo {
    animation: fillBar 1s ease-out 0.3s forwards;
    width: 0%;
}

/* Add these styles to your CSS file for the bundle explanation tour */

.bundle-explanation-tooltip {
    width: 400px !important;
    max-width: 90vw;
}

.bundle-explanation {
    text-align: left;
}

.bundle-explanation h3 {
    margin: 0 0 10px 0;
    color: #1f2937;
    font-size: 18px;
}

.bundle-explanation p {
    margin: 0 0 15px 0;
    color: #6b7280;
    line-height: 1.4;
}

.weight-demo {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.weight-item-demo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.weight-item-demo:last-child {
    margin-bottom: 0;
}

.weight-label {
    min-width: 140px;
    font-size: 13px;
    color: #374151;
    font-weight: 500;
}

.weight-bar-demo {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.weight-fill-demo {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.8s ease;
}

.weight-value {
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
    min-width: 35px;
    text-align: right;
}

.tour-tip {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    padding: 10px;
    margin-top: 15px;
    font-size: 13px;
    color: #065f46;
}

.tour-tip strong {
    color: #047857;
}

/* Enhanced tour overlay styles */
.quick-tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Much lighter overlay */
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tour-spotlight {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid #667eea;
    border-radius: 8px;
    box-shadow: 
        0 0 0 4px rgba(102, 126, 234, 0.3),
        0 0 0 9999px rgba(0, 0, 0, 0.4); /* Lighter shadow */
    z-index: 10001;
    animation: spotlightPulse 2s ease-in-out infinite;
}

@keyframes spotlightPulse {
    0%, 100% { 
        border-color: #667eea;
        box-shadow: 
            0 0 0 4px rgba(102, 126, 234, 0.3),
            0 0 0 9999px rgba(0, 0, 0, 0.4);
    }
    50% { 
        border-color: #764ba2;
        box-shadow: 
            0 0 0 8px rgba(118, 75, 162, 0.4),
            0 0 0 9999px rgba(0, 0, 0, 0.3);
    }
}

.tour-tooltip {
    position: absolute;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    max-width: 350px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.tour-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.tour-progress {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.tour-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
}

.tour-btn.primary {
    background: #667eea;
    color: white;
}

.tour-btn.primary:hover {
    background: #5a6fd8;
}

.tour-btn.secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.tour-btn.secondary:hover {
    background: #e5e7eb;
}

/* Animation for weight bars */
@keyframes fillBar {
    from { width: 0%; }
    to { width: var(--target-width); }
}

.weight-fill-demo {
    animation: fillBar 1s ease-out 0.3s forwards;
    width: 0%;
}

.bundle-info-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s ease;
}

.bundle-info-btn:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: scale(1.05);
}

.current-selection-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.about-menu {
    position: absolute;
    top: 65px;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    padding: 0;
    min-width: 420px; /* Increased from 280px */
    max-width: 450px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 998;
    border: 1px solid #e1e5e9;
    pointer-events: none;
    overflow: hidden;
}

.about-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.about-header h3 {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-left: 8px;
    margin: 0 0 0 8px;
}

.about-content {
    padding: 24px;
}

.about-content p {
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #4a5568;
}

/* Two Column Layout */
.about-columns {
    display: flex;
    gap: 24px;
    margin-top: 20px;
}

.features-column,
.founder-column {
    flex: 1;
}

.features-column h4,
.founder-column h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.about-features {
    list-style: none;
    margin: 0;
    padding: 0;
}

.about-features li {
    padding: 4px 0;
    font-size: 0.82rem;
    color: #555;
    position: relative;
    padding-left: 16px;
}

.about-features li::before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 4px;
}

/* Founder Section */
.founder-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.founder-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar-icon {
    font-size: 20px;
    color: white;
}

.founder-details {
    flex: 1;
}

.founder-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 4px 0;
}

.founder-title {
    font-size: 0.8rem;
    color: #667eea;
    font-weight: 500;
    margin: 0 0 8px 0;
}

.founder-bio {
    font-size: 0.8rem;
    color: #4a5568;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.founder-links {
    display: flex;
    gap: 12px;
}

.founder-link {
    font-size: 0.75rem;
    color: #667eea;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    background: #f7fafc;
    transition: all 0.2s ease;
}

.founder-link:hover {
    background: #e2e8f0;
    color: #5a67d8;
}

.about-footer {
    margin-top: 20px;
    padding: 16px 24px;
    border-top: 1px solid #e1e5e9;
    text-align: center;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
}

.about-footer p {
    font-size: 0.8rem;
    color: #718096;
    margin: 0 0 12px 0;
}

.about-links {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.about-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    background: white;
    border: 1px solid #e2e8f0;
}

.about-link:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}
 .email-small-link {
            font-size: 10px;
            color: #4285f4;
            text-decoration: none;
            font-weight: normal;
        }
        
        .email-small-link:hover {
            text-decoration: underline;
        }

/* Mobile Responsive */
@media (max-width: 768px) {
    .about-menu {
        min-width: 350px;
        right: -20px;
    }
    
    .about-columns {
        flex-direction: column;
        gap: 16px;
    }
    
    .founder-info {
        flex-direction: column;
        text-align: center;
    }
}
/* Make sure the bundle explanation shows properly on mobile */
@media (max-width: 768px) {
    .bundle-explanation-tooltip {
        width: 350px !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    .weight-label {
        min-width: 120px;
        font-size: 12px;
    }
}
/* Make sure the bundle explanation shows properly on mobile */
@media (max-width: 768px) {
    .bundle-explanation-tooltip {
        width: 350px !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    }
    
    .weight-label {
        min-width: 120px;
        font-size: 12px;
    }
}
        @media (max-width: 768px) {
            .start-tour-btn {
                bottom: 15px;
                right: 15px;
                padding: 10px 16px;
                font-size: 12px;
            }
        }

/* ✅ SPECIFIC MOBILE PORTRAIT FIXES */
@media (max-width: 768px) and (orientation: portrait) {
    .selection-text {
        font-size: 7px; /* Slightly smaller for mobile */
        top: 34px; /* Closer to icons */
        left: 0;
        max-width: 200px; /* Prevent overflow */
        overflow: hidden;
        text-overflow: ellipsis;
        
        /* Ensure visibility */
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Make sure parent container accommodates the text */
    .current-selection-indicator {
        padding-bottom: 20px !important; /* Extra space for text */
        min-height: 55px !important;
    }
    
    /* Adjust navigation height on mobile */
    .horizontal-nav {
        min-height: 70px !important;
        padding-bottom: 10px !important;
    }
}

/* ✅ iPhone specific (very small screens) */
@media (max-width: 414px) and (orientation: portrait) {
    .selection-text {
        font-size: 6px;
        padding: 1px 4px;
        top: 32px;
        
        /* Ultra compact text for iPhone */
        max-width: 180px;
    }
}



/* Adjust navigation height to accommodate the text below */
.horizontal-nav {
    min-height: 60px; /* Give extra space for the absolute positioned text */
    padding-bottom: 8px;
}


/* Mobile responsive - hide text on very small screens */
@media (max-width: 480px) {
    .selection-text {
        display: none;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .horizontal-nav {
        height: 65px;
        padding: 0 12px;
    }
    
    .logo-icon {
        font-size: 1.7rem;
    }
    
    .nav-area {
        gap: 15px;
    }
    
    .dots-menu {
        width: 45px;
        height: 45px;
    }
    
    .categories-dropdown {
        min-width: 280px;
        left: -50px;
    }
    
    .region-selector {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .about-btn {
        width: 45px;
        height: 45px;
    }
    
    .about-menu {
        right: -20px;
        min-width: 260px;
    }
    
    .main-container {
        margin-top: 65px;
        height: calc(100vh - 65px);
        flex-direction: column;
    }
    
    .ranking-section {
        width: 100%;
        height: 250px;
        border-left: none;
        border-top: 1px solid #e9ecef;
        order: 2;
    }
    
    .map-section {
        order: 1;
    }
    
    .custom-marker {
        transform: scale(0.9);
    }
    
    .marker-popup {
        min-width: 240px;
    }
    
    .popup-actions {
        flex-direction: column;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .horizontal-nav {
        height: 60px;
        padding: 0 10px;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .nav-area {
        gap: 10px;
    }
    
    .categories-dropdown {
        min-width: 260px;
        left: -80px;
    }
    
    .region-selector {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .dots-menu {
        width: 40px;
        height: 40px;
    }
    
    .about-btn {
        width: 40px;
        height: 40px;
    }
    
    .main-container {
        margin-top: 60px;
        height: calc(100vh - 60px);
    }
    
    .ranking-section {
        height: 200px;
    }
}

/* ====================================================
   FULL RANKING, TOAST & MODAL STYLES
   ==================================================== */
.full-ranking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.full-ranking-overlay.show {
    display: flex;
}

.full-ranking-overlay.visible {
    opacity: 1;
}

.full-ranking-container {
    width: 95vw;
    max-width: 1200px;
    height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.full-ranking-overlay.visible .full-ranking-container {
    transform: scale(1);
}

.full-ranking-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.header-left .ranking-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.ranking-stats {
    font-size: 0.9rem;
    opacity: 0.9;
}

.close-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Toast Notifications */
.error-toast,
.success-toast {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 400px;
}

.error-toast.show,
.success-toast.show {
    transform: translateX(0);
}

.error-content,
.success-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
}

.error-toast {
    border-left: 4px solid #dc3545;
}

.success-toast {
    border-left: 4px solid #28a745;
}

.error-close,
.success-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #999;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 4px;
}

.modal-body {
    padding: 32px;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.region-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.region-option:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.region-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.region-name {
    font-weight: 500;
    color: #333;
}

/* ====================================================
   UTILITY CLASSES
   ==================================================== */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* ====================================================
   ACCESSIBILITY
   ==================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.nav-item:focus,
.region-selector:focus,
.mobile-menu-toggle:focus,
.ranking-item:focus,
.action-btn:focus,
.page-btn:focus,
.page-number:focus {
    outline: 2px solid rgba(102, 126, 234, 0.8);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .horizontal-nav {
        border-bottom: 2px solid white;
    }
    
    .nav-item {
        border-width: 2px;
    }
}