/* ═══════════════════════════════════════════════════════════════════════════════
   ██████╗ ██╗   ██╗██████╗  █████╗ ███╗   ███╗ █████╗ ███████╗ ██████╗ ███╗   ██╗
   ██╔══██╗╚██╗ ██╔╝██╔══██╗██╔══██╗████╗ ████║██╔══██╗██╔════╝██╔═══██╗████╗  ██║
   ██████╔╝ ╚████╔╝ ██████╔╝███████║██╔████╔██║███████║███████╗██║   ██║██╔██╗ ██║
   ██╔═══╝   ╚██╔╝  ██╔══██╗██╔══██║██║╚██╔╝██║██╔══██║╚════██║██║   ██║██║╚██╗██║
   ██║        ██║   ██║  ██║██║  ██║██║ ╚═╝ ██║██║  ██║███████║╚██████╔╝██║ ╚████║
   ╚═╝        ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═╝  ╚═╝╚══════╝ ╚═════╝ ╚═╝  ╚═══╝
   ═══════════════════════════════════════════════════════════════════════════════
   
   PYRAMASON - Ancient Sites Research Platform
   Version 1.0 - Official Release
   
   ═══════════════════════════════════════════════════════════════════════════════
   COPYRIGHT & LEGAL NOTICE
   ═══════════════════════════════════════════════════════════════════════════════
   
   © 2026 Pyramason. All Rights Reserved.
   
   Created and Developed by: Farhad Aghapour
   Website: https://pyramason.com
   Contact: support@pyramason.com
   
   This software and its source code are the intellectual property of Pyramason
   and its founder, Farhad Aghapour. Unauthorized copying, modification, 
   distribution, or use is strictly prohibited.
   
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════════
   SHOPIFY INTEGRATION FIXES
   Hide Shopify elements and adjust for embedded view
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Hide Shopify "Skip to content" button */
.skip-to-content-link,
.skip-to-content,
a.skip-to-content-link,
[class*="skip-to-content"],
.shopify-section-header-skip-link,
a[href="#MainContent"],
.visually-hidden-focusable:focus,
.sr-only-focusable:focus {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Hide Shopify header when map is loaded */
body.map-loaded .shopify-section-header,
body.map-loaded header.header,
body.map-loaded .header-wrapper,
body.map-loaded .announcement-bar,
body.map-loaded #shopify-section-header,
body.map-loaded #shopify-section-announcement-bar {
    display: none !important;
}

/* Ensure our app takes full viewport when embedded */
body.map-loaded {
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.map-loaded #MainContent,
body.map-loaded main,
body.map-loaded .main-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES (Variables)
   ═══════════════════════════════════════════════════════════════════════════════ */
:root {
    /* ─── Color Palette ─────────────────────────────────────────────────────── */
    --bg-primary: #0a0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252540;
    --bg-card: #16213e;
    --bg-hover: rgba(255, 255, 255, 0.05);
    --bg-active: rgba(255, 255, 255, 0.1);
    --bg-glass: rgba(26, 26, 46, 0.95);
    --bg-glass-light: rgba(26, 26, 46, 0.8);
    
    /* Accent Colors */
    --accent-cyan: #00f5d4;
    --accent-cyan-dim: rgba(0, 245, 212, 0.5);
    --accent-purple: #7b61ff;
    --accent-purple-dim: rgba(123, 97, 255, 0.5);
    --accent-gold: #FFD700;
    --accent-gold-dim: rgba(255, 215, 0, 0.5);
    --accent-orange: #FF9800;
    --accent-red: #FF6B6B;
    --accent-green: #4CAF50;
    --accent-blue: #2196F3;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --text-muted: rgba(255, 255, 255, 0.3);
    --text-dark: #000000;
    
    /* Border Colors */
    --border-light: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.2);
    --border-focus: var(--accent-cyan);
    
    /* ─── Gradients ─────────────────────────────────────────────────────────── */
    --gradient-primary: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    --gradient-gold: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    --gradient-danger: linear-gradient(135deg, var(--accent-red), #e74c3c);
    --gradient-dark: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
    
    /* ─── Shadows ───────────────────────────────────────────────────────────── */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow-cyan: 0 0 30px rgba(0, 245, 212, 0.3);
    --shadow-glow-purple: 0 0 30px rgba(123, 97, 255, 0.3);
    --shadow-glow-gold: 0 0 30px rgba(255, 215, 0, 0.3);
    
    /* ─── Layout Dimensions - NARROWER SIDEBARS ────────────────────────────── */
    --sidebar-width: 280px;
    --sidebar-collapsed: 0px;
    --topbar-height: 60px;      /* Matches CONFIG.LAYOUT.TOPBAR_HEIGHT */
    --bottombar-height: 36px;   /* Matches CONFIG.LAYOUT.BOTTOMBAR_HEIGHT */
    --fab-size: 56px;
    --fab-item-size: 48px;
    
    /* ─── Transitions ───────────────────────────────────────────────────────── */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* ─── Border Radius ─────────────────────────────────────────────────────── */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-round: 50%;
    
    /* ─── Z-Index Layers ────────────────────────────────────────────────────── */
    --z-base: 1;
    --z-sidebar: 100;
    --z-header: 200;
    --z-dropdown: 500;
    --z-fab: 600;
    --z-context-menu: 700;
    --z-modal-backdrop: 900;
    --z-modal: 1000;
    --z-toast: 1100;
    --z-loader: 10000;
}

/* Light theme overrides */
[data-theme="light"] {
    --bg-primary: #faf8f5;          /* Warm cream background */
    --bg-secondary: #fff9f0;        /* Soft ivory */
    --bg-tertiary: #f0ebe3;         /* Light tan */
    --bg-glass: rgba(255, 250, 240, 0.95);  /* Warm glass effect */
    --text-primary: #2d2a24;        /* Warm dark brown */
    --text-secondary: rgba(45, 42, 36, 0.7);
    --text-tertiary: rgba(45, 42, 36, 0.5);
    --border-light: rgba(139, 119, 101, 0.15);   /* Warm border */
    --border-medium: rgba(139, 119, 101, 0.25);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESET & BASE STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Links */
a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-purple);
}

/* Buttons Reset */
button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    outline: none;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form Elements */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: transparent;
    border: none;
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-tertiary);
}

/* Selection */
::selection {
    background: var(--accent-cyan);
    color: var(--text-dark);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MAP CONTAINER - FULL WIDTH (Single sidebar layout)
   ═══════════════════════════════════════════════════════════════════════════════ */
#map {
    position: fixed !important;
    top: var(--topbar-height) !important;
    left: var(--sidebar-width) !important;
    right: 0 !important;
    bottom: var(--bottombar-height) !important;
    z-index: 1;
    background: #1a2a3a;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
    transition: left var(--transition-normal);
}

/* When left sidebar is collapsed - FULL WIDTH MAP */
body.left-collapsed #map {
    left: 0 !important;
    right: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MAPBOX GL JS MAP STYLING
   ═══════════════════════════════════════════════════════════════════════════════ */
#map > div,
#map .mapboxgl-canvas-container {
    width: 100% !important;
    height: 100% !important;
}

/* Hide Mapbox attribution in corner - we show it in footer */
.mapboxgl-ctrl-logo {
    display: none !important;
}

.mapboxgl-ctrl-attrib {
    display: none !important;
}

/* Mapbox popup styling */
.mapboxgl-popup-content {
    background: var(--bg-secondary) !important;
    border-radius: var(--radius-lg) !important;
    padding: 0 !important;
    box-shadow: var(--shadow-lg) !important;
    border: 1px solid var(--border-light) !important;
    max-width: 480px !important;
}

.mapboxgl-popup-tip {
    border-top-color: var(--bg-secondary) !important;
}

.mapboxgl-popup-close-button {
    color: var(--text-secondary) !important;
    font-size: 20px;
    padding: 5px 10px;
}

.mapboxgl-popup-close-button:hover {
    color: var(--text-primary) !important;
    background: transparent !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TOP BAR / HEADER
   ═══════════════════════════════════════════════════════════════════════════════ */
#topBar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
    z-index: var(--z-header);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    filter: drop-shadow(0 0 10px var(--accent-gold-dim));
    animation: logoPulse 3s ease-in-out infinite;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 10px var(--accent-gold-dim)); }
    50% { filter: drop-shadow(0 0 20px var(--accent-gold)); }
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 3px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Search Container */
.search-container {
    position: relative;
    flex: 1;
    max-width: 450px;
    display: flex;
    align-items: center;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 0 14px;
    transition: all var(--transition-normal);
}

.search-container:focus-within {
    border-color: var(--accent-cyan);
    background: rgba(0, 245, 212, 0.05);
    box-shadow: var(--shadow-glow-cyan);
}

.search-icon {
    font-size: 14px;
    margin-right: 8px;
    opacity: 0.6;
}

#searchInput {
    flex: 1;
    height: 38px;
    font-size: 13px;
    background: transparent;
}

.search-shortcut {
    font-size: 10px;
    padding: 3px 6px;
    background: var(--bg-active);
    border-radius: var(--radius-xs);
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-hover);
}

.search-result-icon {
    font-size: 18px;
    width: 28px;
    text-align: center;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-location {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* Top Bar Actions */
.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Top bar history controls (Undo/Redo/Clear) */
.top-bar-history-controls .icon-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.top-bar-history-controls .icon-btn:hover {
    background: rgba(0, 245, 212, 0.15);
    border-color: rgba(0, 245, 212, 0.3);
}

.top-bar-history-controls .icon-btn:active {
    transform: scale(0.95);
}

.stats-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 4px 10px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
}

.stats-display span:first-child {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-cyan);
}

.stats-label {
    font-size: 10px;
    color: var(--text-tertiary);
}

.zoom-display {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-secondary);
}

.icon-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background: var(--bg-active);
    border-color: var(--border-medium);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 5px;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    transition: all var(--transition-fast);
}

.user-menu-button:hover {
    background: var(--bg-active);
    border-color: var(--accent-cyan);
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-round);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-dark);
    background-size: cover;
    background-position: center;
}

.user-name {
    font-size: 12px;
    font-weight: 500;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pro-badge {
    font-size: 8px;
    padding: 2px 5px;
    background: var(--gradient-gold);
    color: var(--text-dark);
    border-radius: var(--radius-xs);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.dropdown-arrow {
    font-size: 8px;
    color: var(--text-tertiary);
    transition: transform var(--transition-fast);
}

.user-menu.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: none;
    overflow: hidden;
    z-index: var(--z-dropdown);
}

.user-dropdown.active {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: var(--bg-hover);
    border-bottom: 1px solid var(--border-light);
}

/* Removed dropdown-user-avatar - redundant with header avatar */

.dropdown-user-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.dropdown-user-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--accent-cyan);
}

.dropdown-user-email {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    text-align: left;
    transition: background var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

.dropdown-icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.dropdown-item.highlight {
    color: var(--accent-gold);
}

.dropdown-item.danger {
    color: var(--accent-red);
}

.dropdown-badge {
    margin-left: auto;
    font-size: 10px;
    padding: 2px 6px;
    background: var(--accent-cyan);
    color: var(--text-dark);
    border-radius: var(--radius-xs);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   SIDEBAR - SINGLE SIDEBAR LAYOUT
   ═══════════════════════════════════════════════════════════════════════════════ */
#leftSidebar {
    position: fixed;
    top: var(--topbar-height);
    bottom: var(--bottombar-height);
    left: 0;
    width: var(--sidebar-width);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: var(--z-sidebar);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal), opacity var(--transition-normal);
    border-right: 1px solid var(--border-light);
}

/* Collapsed State */
body.left-collapsed #leftSidebar {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    font-size: 14px;
    font-weight: bold;
    color: #000;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(0, 245, 212, 0.4);
}

.sidebar-toggle:hover {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

#leftSidebarToggle {
    left: var(--sidebar-width);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    border-left: none;
    transition: left var(--transition-normal);
}

body.left-collapsed #leftSidebarToggle {
    left: 0;
}

/* History controls move to corner when sidebar is collapsed */
body.left-collapsed #historyControls {
    left: 20px !important;
}

/* Collapsible Sections */
.collapsed-section .section-content {
    display: none;
}

.collapsed-section.expanded .section-content {
    display: block;
}

.collapsed-section .section-header {
    cursor: pointer;
}

.collapsed-section .section-header:hover {
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
}

.section-toggle {
    font-size: 10px;
    opacity: 0.5;
    transition: transform 0.2s;
}

.collapsed-section.expanded .section-toggle {
    transform: rotate(180deg);
}

/* Compact styles for moved sections */
.style-grid.compact {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.style-grid.compact .style-btn {
    padding: 8px 4px;
    font-size: 10px;
}

.style-grid.compact .style-icon {
    font-size: 16px;
}

.community-links.compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.community-links.compact .link-btn {
    padding: 8px;
    font-size: 11px;
    justify-content: center;
}

.community-links.compact .link-btn span:first-child {
    margin-right: 4px;
}

/* Sidebar Scroll Container */
.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
}

/* Sidebar Sections */
.sidebar-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.section-icon {
    font-size: 14px;
}

.section-action {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    font-size: 12px;
    transition: all var(--transition-fast);
}

.section-action:hover {
    background: var(--accent-cyan);
    color: var(--text-dark);
}

/* Collapsible Section Styles */
.collapsible-header {
    cursor: pointer;
    user-select: none;
}

.collapsible-header:hover {
    opacity: 0.9;
}

.section-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.section-toggle:hover {
    background: var(--bg-hover);
    color: var(--accent-cyan);
}

.section-toggle i,
.section-toggle [data-lucide] {
    transition: transform 0.3s ease;
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible-content.collapsed {
    max-height: 0 !important;
    margin-bottom: 0;
}

.sidebar-section.collapsed .section-header {
    margin-bottom: 0;
}

/* Filter List */
.filter-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-item:hover {
    background: var(--bg-active);
}

.filter-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.filter-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Individual filter dot glows */
.filter-item[data-type="featured"] .filter-dot { box-shadow: 0 0 6px #FF6B6B; }
.filter-item[data-type="pyramids"] .filter-dot { box-shadow: 0 0 6px #FFD700; }
.filter-item[data-type="stone_circles"] .filter-dot { box-shadow: 0 0 6px #8B4513; }
.filter-item[data-type="standing_stones"] .filter-dot { box-shadow: 0 0 6px #A0522D; }
.filter-item[data-type="dolmens"] .filter-dot { box-shadow: 0 0 6px #9C27B0; }
.filter-item[data-type="burial_mounds"] .filter-dot { box-shadow: 0 0 6px #7B1FA2; }
.filter-item[data-type="passage_tombs"] .filter-dot { box-shadow: 0 0 6px #6A1B9A; }
.filter-item[data-type="settlements"] .filter-dot { box-shadow: 0 0 6px #4CAF50; }
.filter-item[data-type="rock_art"] .filter-dot { box-shadow: 0 0 6px #2196F3; }
.filter-item[data-type="temples"] .filter-dot { box-shadow: 0 0 6px #E91E63; }
.filter-item[data-type="fortifications"] .filter-dot { box-shadow: 0 0 6px #795548; }
.filter-item[data-type="crosses"] .filter-dot { box-shadow: 0 0 6px #607D8B; }
.filter-item[data-type="other_ancient"] .filter-dot { box-shadow: 0 0 6px #9E9E9E; }
.filter-item[data-type="community"] .filter-dot { box-shadow: 0 0 6px #00BCD4; }
.filter-item[data-type="imported"] .filter-dot { box-shadow: 0 0 6px #00f5d4; }

.filter-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.filter-label {
    flex: 1;
    font-size: 12px;
}

.filter-count {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--bg-primary);
    border-radius: var(--radius-xs);
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 4px;
}

.tools-grid.three-col {
    grid-template-columns: repeat(3, 1fr);
}

.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 6px;
    background: var(--bg-hover);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    min-height: 60px;
}

.tool-btn:hover {
    background: var(--bg-active);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 245, 212, 0.2);
}

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

.tool-icon {
    font-size: 22px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

/* Tool icon colors - subtle and consistent */
.tool-btn:nth-child(1) .tool-icon { color: #00f5d4; }
.tool-btn:nth-child(2) .tool-icon { color: #00f5d4; }
.tool-btn:nth-child(3) .tool-icon { color: #7b61ff; }
.tool-btn:nth-child(4) .tool-icon { color: #7b61ff; }
.tool-btn:nth-child(5) .tool-icon { color: #00f5d4; }
.tool-btn:nth-child(6) .tool-icon { color: #FFD700; }

.tool-btn.pro-feature .tool-icon { opacity: 0.8; }

.tool-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}

/* Timeline */
.timeline-container {
    padding: 8px 0;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.timeline-slider-container {
    position: relative;
    height: 30px;
    margin-bottom: 12px;
}

.timeline-slider-container input[type="range"] {
    position: absolute;
    width: 100%;
    height: 4px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
}

.timeline-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-cyan);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 0 10px var(--accent-cyan-dim);
}

.timeline-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.timeline-presets button {
    padding: 5px 8px;
    font-size: 10px;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.timeline-presets button:hover {
    background: var(--accent-cyan);
    color: var(--text-dark);
    border-color: var(--accent-cyan);
}

/* Style Grid */
.style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.style-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--bg-hover);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.style-btn:hover {
    background: var(--bg-active);
}

.style-btn.active {
    border-color: var(--accent-cyan);
    background: rgba(0, 245, 212, 0.1);
}

.style-icon {
    font-size: 22px;
}

.style-btn span:last-child {
    font-size: 11px;
    color: var(--text-secondary);
}

/* View Options */
.view-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.toggle-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
}

.toggle-option input {
    display: none;
}

.toggle-slider {
    width: 40px;
    height: 22px;
    background: var(--bg-primary);
    border-radius: 11px;
    position: relative;
    transition: background var(--transition-fast);
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: var(--text-tertiary);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.toggle-option input:checked + .toggle-slider {
    background: var(--accent-cyan);
}

.toggle-option input:checked + .toggle-slider::after {
    left: 21px;
    background: var(--text-dark);
}

/* Data Actions */
.data-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Community Links */
.community-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.link-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    font-size: 12px;
    transition: all var(--transition-fast);
}

.link-btn:hover {
    background: var(--bg-active);
    padding-left: 16px;
}

.link-btn span:first-child {
    font-size: 14px;
}

.link-arrow {
    margin-left: auto;
    color: var(--text-tertiary);
}

/* Help & Tour & About Buttons */
.help-btn,
.tour-btn,
.about-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    font-size: 12px;
    margin-bottom: 6px;
    transition: all var(--transition-fast);
}

/* Tour/Help/About buttons in sidebar - uniform sizing */
.tour-help-section .tool-btn {
    padding: 6px 4px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    height: 44px !important;
}

.tour-help-section .tool-btn .tool-icon {
    font-size: 14px !important;
}

.tour-help-section .tool-btn .tool-label {
    font-size: 9px !important;
}

.help-btn:hover,
.tour-btn:hover,
.about-btn:hover {
    background: var(--bg-active);
}

.tour-btn {
    background: rgba(0, 245, 212, 0.1);
    border: 1px solid var(--accent-cyan-dim);
    color: var(--accent-cyan);
}

.about-btn {
    background: rgba(0, 245, 212, 0.1);
    border: 1px solid var(--accent-cyan-dim);
    color: var(--accent-cyan);
}

/* Button Styles */
.btn-primary {
    padding: 10px 16px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 13px;
    color: var(--text-dark);
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-cyan);
}

.btn-secondary {
    padding: 10px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 13px;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--bg-active);
    border-color: var(--accent-cyan);
}

.btn-text {
    padding: 6px 0;
    font-size: 12px;
    color: var(--accent-cyan);
    transition: color var(--transition-fast);
}

.btn-text:hover {
    color: var(--accent-purple);
}

.btn-link {
    color: var(--accent-cyan);
    text-decoration: underline;
    font-size: inherit;
}

.full-width {
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BOTTOM BAR / FOOTER
   ═══════════════════════════════════════════════════════════════════════════════ */
#bottomBar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottombar-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: var(--z-header);
    font-size: 11px;
}

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

/* Fix: Give left section fixed width so center doesn't shift */
.bottom-section.bottom-left {
    min-width: 140px;
    width: 140px;
}

/* Fix: Center section should be centered and not shift */
.bottom-section.bottom-center {
    flex: 1;
    justify-content: center;
}

/* Fix: Right section matches left width for symmetry */
.bottom-section.bottom-right {
    min-width: 140px;
    width: 140px;
    justify-content: flex-end;
}

.coordinates {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-secondary);
    white-space: nowrap;
}

.brand-link {
    font-weight: 600;
    color: var(--accent-gold);
}

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

.separator {
    color: var(--text-muted);
}

.text-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 11px;
    transition: color var(--transition-fast);
}

.text-btn:hover {
    color: var(--accent-cyan);
}

.version {
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FLOATING ACTION BUTTON (FAB) - ENHANCED QUICK ACTIONS
   ═══════════════════════════════════════════════════════════════════════════════ */
.fab-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: var(--z-fab);
}

.fab-main {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #00f5d4, #00d4aa);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 245, 212, 0.35);
    transition: all var(--transition-normal);
    border: none;
}

.fab-main:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0, 245, 212, 0.45);
}

.fab-icon {
    font-size: 22px;
    font-weight: 300;
    color: #0a0f1a;
    transition: transform var(--transition-normal);
}

.fab-container.open .fab-icon {
    transform: rotate(45deg);
}

.fab-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
}

.fab-container.open .fab-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.fab-item {
    width: 44px;
    height: 44px;
    background: rgba(15, 22, 41, 0.95);
    border: 1px solid rgba(0, 245, 212, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-fast);
    color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

.fab-item:nth-child(1) { color: #00f5d4; }
.fab-item:nth-child(2) { color: #00f5d4; }
.fab-item:nth-child(3) { color: #7b61ff; }
.fab-item:nth-child(4) { color: #00f5d4; }

.fab-item:hover {
    background: rgba(0, 245, 212, 0.15);
    border-color: rgba(0, 245, 212, 0.35);
    color: #00f5d4;
    transform: scale(1.05);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CONTEXT MENU (Right-Click)
   ═══════════════════════════════════════════════════════════════════════════════ */
.context-menu {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 8px 0;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-context-menu);
    display: none;
}

.context-menu.active {
    display: block;
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    font-size: 13px;
    text-align: left;
    transition: background var(--transition-fast);
}

.context-menu-item:hover {
    background: var(--bg-hover);
}

.context-icon {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.context-menu-divider {
    height: 1px;
    background: var(--border-light);
    margin: 6px 0;
}

/* Context Menu Submenus */
.context-menu-submenu {
    position: relative;
}

.context-menu-parent {
    justify-content: space-between;
}

.submenu-arrow {
    font-size: 10px;
    opacity: 0.5;
    margin-left: auto;
}

.context-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 8px 0;
    min-width: 160px;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 701;
}

.context-menu-submenu:hover .context-submenu {
    display: block;
    animation: fadeIn 0.15s ease;
}

/* Adjust submenu position if near right edge */
.context-submenu.flip-left {
    left: auto;
    right: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-backdrop);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-hover);
    border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.modal-header.gradient-header {
    background: var(--gradient-gold);
    color: var(--text-dark);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    font-size: 20px;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--accent-red);
    color: white;
}

.modal-body {
    padding: 20px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

/* Form Groups */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-group input:focus {
    border-color: var(--accent-cyan);
    background: rgba(0, 245, 212, 0.05);
}

.form-error {
    padding: 10px 12px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid var(--accent-red);
    border-radius: var(--radius-sm);
    color: var(--accent-red);
    font-size: 12px;
    margin-bottom: 16px;
}

/* Auth Footer */
.auth-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-footer p {
    margin-bottom: 8px;
}

/* Pricing Card */
.pricing-card {
    text-align: center;
    padding: 24px;
    background: var(--bg-hover);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.currency {
    font-size: 24px;
    color: var(--accent-gold);
}

.amount {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-gold);
}

.period {
    font-size: 14px;
    color: var(--text-tertiary);
}

.trial-text {
    margin-top: 8px;
    font-size: 13px;
    color: var(--accent-cyan);
}

/* Feature List */
.feature-list {
    list-style: none;
    margin-bottom: 20px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list .check {
    color: var(--accent-green);
    font-weight: bold;
}

.cancel-text {
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LOADING & LOADERS
   ═══════════════════════════════════════════════════════════════════════════════ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 26, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    backdrop-filter: blur(5px);
}

.loading-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 245, 212, 0.2);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
    position: relative;
}

.loading-spinner::before {
    content: '';
    position: absolute;
    inset: 6px;
    border: 3px solid rgba(123, 97, 255, 0.2);
    border-top-color: #7b61ff;
    border-radius: 50%;
    animation: spin 1.2s linear infinite reverse;
}

.loading-spinner::after {
    content: '';
    position: absolute;
    inset: 14px;
    border: 3px solid rgba(255, 215, 0, 0.2);
    border-top-color: #FFD700;
    border-radius: 50%;
    animation: spin 1.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Initial Loader */
.initial-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loader);
    transition: opacity 0.5s ease;
}

.loader-content {
    text-align: center;
}

.loader-icon {
    font-size: 64px;
    animation: logoPulse 2s ease-in-out infinite;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-icon img {
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

.loader-text {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 6px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.loader-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: var(--bg-hover);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 12px;
}

.loader-progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 0;
    transition: width 0.3s ease;
}

.loader-status {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform var(--transition-normal);
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    background: rgba(76, 175, 80, 0.2);
    color: var(--accent-green);
}

.toast-error .toast-icon {
    background: rgba(255, 107, 107, 0.2);
    color: var(--accent-red);
}

.toast-warning .toast-icon {
    background: rgba(255, 152, 0, 0.2);
    color: var(--accent-orange);
}

.toast-info .toast-icon {
    background: rgba(0, 245, 212, 0.2);
    color: var(--accent-cyan);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 12px;
    color: var(--text-secondary);
}

.toast-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DISCOVERY MODE PANEL
   ═══════════════════════════════════════════════════════════════════════════════ */
.discovery-panel {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-xl);
    z-index: var(--z-fab);
}

.discovery-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.discovery-icon {
    font-size: 24px;
}

.discovery-title {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
}

.discovery-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    font-size: 18px;
}

.discovery-content {
    text-align: center;
    margin-bottom: 16px;
}

.discovery-site-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.discovery-site-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.discovery-site-location {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.discovery-site-desc {
    font-size: 12px;
    color: var(--text-tertiary);
}

.discovery-actions {
    display: flex;
    gap: 10px;
}

.discovery-actions button {
    flex: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MEASUREMENT DISPLAY
   ═══════════════════════════════════════════════════════════════════════════════ */
.measurement-display {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 12px 20px;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-fab);
}

.measurement-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 8px;
}

.measurement-header span {
    font-size: 13px;
    color: var(--text-secondary);
}

.measurement-header button {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.measurement-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-cyan);
    font-family: 'JetBrains Mono', monospace;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TOUR OVERLAY
   ═══════════════════════════════════════════════════════════════════════════════ */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: calc(var(--z-modal) + 10);
}

.tour-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.tour-tooltip {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-cyan);
    border-radius: var(--radius-xl);
    padding: 20px;
    max-width: 360px;
    box-shadow: var(--shadow-xl), var(--shadow-glow-cyan);
}

.tour-step {
    font-size: 11px;
    color: var(--accent-cyan);
    margin-bottom: 8px;
}

.tour-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.tour-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.tour-content p {
    margin-bottom: 8px;
}

.tour-content kbd {
    padding: 2px 6px;
    background: var(--bg-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xs);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

.tour-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FREQUENCY VISUALIZER
   ═══════════════════════════════════════════════════════════════════════════════ */
.frequency-visualizer {
    position: fixed;
    bottom: 60px;
    left: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 12px;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-fab);
    transition: left var(--transition-normal);
}

body:not(.left-collapsed) .frequency-visualizer {
    left: calc(var(--sidebar-width) + 20px);
}

.freq-display {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-cyan);
    margin: 8px 0;
}

.freq-stop {
    width: 100%;
    padding: 8px;
    background: var(--accent-red);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 220px;
    }
}

@media (max-width: 992px) {
    /* Collapse sidebars by default on tablets */
    body {
        --sidebar-width: 200px;
    }
    
    body:not(.sidebars-shown) #leftSidebar {
        transform: translateX(-100%);
    }
    
    body:not(.sidebars-shown) #map {
        left: 0;
        right: 0;
    }
}

@media (max-width: 768px) {
    :root {
        --topbar-height: 52px;
        --bottombar-height: 32px;
    }
    
    #topBar {
        padding: 0 12px;
        gap: 10px;
    }
    
    .logo-text {
        display: none;
    }
    
    .search-container {
        max-width: none;
    }
    
    .search-shortcut {
        display: none;
    }
    
    .stats-display {
        display: none;
    }
    
    .zoom-display {
        display: none;
    }
    
    .user-name {
        display: none;
    }
    
    #leftSidebar {
        width: 100%;
        max-width: 300px;
    }
    
    #bottomBar {
        font-size: 10px;
        padding: 0 10px;
    }
    
    .bottom-center {
        display: none;
    }
}

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

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

/* Pro-only features locked state */
.pro-only.locked {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.pro-only.locked::after {
    content: '🔒 PRO';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    padding: 2px 6px;
    background: var(--accent-gold);
    color: var(--text-dark);
    border-radius: var(--radius-xs);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   FLOATING MAP CONTROLS PANEL (Right Side)
   ═══════════════════════════════════════════════════════════════════════════════ */
.map-controls-panel {
    position: fixed;
    top: 160px; /* Moved lower to avoid Mapbox zoom controls */
    right: 15px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.controls-toggle {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.controls-toggle:hover {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
    border-color: var(--accent-gold);
    transform: scale(1.05);
}

.controls-content {
    margin-top: 10px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    padding: 12px;
    min-width: 140px;
    display: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.map-controls-panel.open .controls-content {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.controls-section {
    margin-bottom: 8px;
}

.controls-section:last-child {
    margin-bottom: 0;
}

.controls-title {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.style-buttons,
.toggle-buttons {
    display: flex;
    gap: 6px;
}

.style-btn-mini,
.toggle-btn {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.style-btn-mini:hover,
.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.style-btn-mini.active,
.toggle-btn.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: var(--accent-primary);
}

.controls-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

.reset-btn {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.reset-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   STREET VIEW PEGMAN BUTTON
   ═══════════════════════════════════════════════════════════════════════════════ */

.street-view-pegman {
    position: fixed;
    top: 80px;
    right: 70px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.street-view-pegman:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 152, 0, 0.2));
    border-color: var(--accent-gold);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.street-view-pegman:active {
    transform: scale(0.95);
}

.street-view-pegman.active {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.3), rgba(255, 152, 0, 0.3));
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.pegman-icon {
    font-size: 22px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ENHANCED LOADING ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Primary spinning loader */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pulse animation for loading dots */
@keyframes pulse {
    0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Glow pulse effect */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 245, 212, 0.3); }
    50% { box-shadow: 0 0 20px rgba(0, 245, 212, 0.6), 0 0 40px rgba(123, 97, 255, 0.4); }
}

/* Gradient rotation */
@keyframes gradientRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Enhanced loading spinner container */
.loading-spinner-animated {
    position: relative;
    width: 50px;
    height: 50px;
}

.loading-spinner-animated::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid rgba(0, 245, 212, 0.1);
    border-radius: 50%;
}

.loading-spinner-animated::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: #00f5d4;
    border-right-color: #7b61ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Three-dot loading indicator */
.loading-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #00f5d4, #7b61ff);
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* AI Research loading animation */
.ai-loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
}

.ai-loading-animation .brain-icon {
    font-size: 36px;
    animation: glowPulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(123, 97, 255, 0.5));
}

.ai-loading-animation .scanning-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.ai-loading-animation .scanning-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #00f5d4, #7b61ff, transparent);
    animation: scanMove 1.5s ease-in-out infinite;
}

@keyframes scanMove {
    0% { left: -50%; }
    100% { left: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TOUR & HELP SECTION
   ═══════════════════════════════════════════════════════════════════════════════ */

.tour-help-section {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, transparent, rgba(0, 245, 212, 0.03));
}

.tools-grid.two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tour-btn,
.help-btn,
.about-btn {
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.1), rgba(123, 97, 255, 0.1)) !important;
    border: 1px solid rgba(0, 245, 212, 0.2) !important;
}

.tour-btn:hover,
.help-btn:hover,
.about-btn:hover {
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.2), rgba(123, 97, 255, 0.2)) !important;
    border-color: rgba(0, 245, 212, 0.4) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ZOOM INDICATOR (Bottom Bar)
   ═══════════════════════════════════════════════════════════════════════════════ */

.zoom-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s;
}

.zoom-indicator:hover {
    background: rgba(0, 245, 212, 0.1);
    border-color: rgba(0, 245, 212, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TOUR GUIDE POPUP POSITIONING
   ═══════════════════════════════════════════════════════════════════════════════ */

.tour-popup {
    position: fixed !important;
    z-index: 10000 !important;
    max-width: 380px;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(15, 15, 30, 0.98));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 245, 212, 0.3);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 245, 212, 0.1);
    animation: tourPopupIn 0.3s ease-out;
}

@keyframes tourPopupIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.tour-popup.top-left { top: 80px; left: 310px; }
.tour-popup.top-right { top: 80px; right: 80px; }
.tour-popup.bottom-left { bottom: 80px; left: 310px; }
.tour-popup.bottom-right { bottom: 80px; right: 80px; }
.tour-popup.center { top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* ═══════════════════════════════════════════════════════════════════════════════
   DRAWING MARKERS (Different from site markers)
   ═══════════════════════════════════════════════════════════════════════════════ */

.drawing-marker {
    width: 12px !important;
    height: 12px !important;
    background: #FF00FF !important;
    border: 2px solid #fff !important;
    transform: rotate(45deg);
    box-shadow: 0 2px 8px rgba(255, 0, 255, 0.5);
}

.measurement-marker {
    width: 10px !important;
    height: 10px !important;
    background: #00FFFF !important;
    border: 2px solid #fff !important;
    border-radius: 0 !important;
    transform: rotate(45deg);
    box-shadow: 0 2px 8px rgba(0, 255, 255, 0.5);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   TIMELINE SLIDER FIX
   ═══════════════════════════════════════════════════════════════════════════════ */

.timeline-slider-container {
    position: relative;
    height: 30px;
    margin: 10px 0;
}

.timeline-slider-container input[type="range"] {
    position: absolute;
    width: 100%;
    height: 6px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
}

.timeline-slider-container input[type="range"]::-webkit-slider-thumb {
    pointer-events: all;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.timeline-slider-container input[type="range"]::-moz-range-thumb {
    pointer-events: all;
    width: 16px;
    height: 16px;
    background: var(--accent-primary);
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
}

.timeline-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.timeline-presets button {
    flex: 1;
    min-width: 70px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.timeline-presets button:hover,
.timeline-presets button.active {
    background: rgba(0, 245, 212, 0.15);
    border-color: rgba(0, 245, 212, 0.4);
    color: #00f5d4;
}


/* Toast Animation */
@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

#pyramasonToast {
    animation: toastIn 0.3s ease forwards;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ISSUE FIXES CSS - v3.0
   ═══════════════════════════════════════════════════════════════════════════════ */

/* FIX 10: Toggle buttons grid for 4 items (3D, Cluster, Labels, Earth Grid) */
.toggle-buttons {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
}

/* Earth Grid button active state */
#btnGrid.active {
    background: rgba(0, 245, 212, 0.3) !important;
    border-color: #00f5d4 !important;
}

/* FIX 13: Top bar zoom display hover effect */
.zoom-display-top:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Pro Feature Styling for Research Tools */
.tool-btn.pro-feature {
    background: linear-gradient(135deg, rgba(255,215,0,0.1), rgba(123,97,255,0.1)) !important;
    border: 1px solid rgba(255,215,0,0.25) !important;
    position: relative;
}

.tool-btn.pro-feature::after {
    display: none; /* Using explicit .pro-tag instead */
}

.tool-btn .pro-tag {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #FFD700, #FF9800);
    color: #000;
    font-size: 7px;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(255,215,0,0.4);
}

.tool-btn.pro-feature:hover {
    background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(123,97,255,0.2)) !important;
    border-color: rgba(255,215,0,0.4) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,215,0,0.2);
}

/* Pro feature locked state for non-Pro users */
.tool-btn.pro-feature.locked {
    opacity: 0.7;
}

.tool-btn.pro-feature.locked:hover::before {
    content: '🔒';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    border-radius: inherit;
    font-size: 20px;
}

/* Mystery Decoder Results Styling */
.mystery-score-bar {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.mystery-score-fill {
    height: 100%;
    background: linear-gradient(90deg, #00f5d4, #7b61ff, #FFD700);
    transition: width 0.5s ease;
}

.mystery-finding {
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid var(--finding-color, #00f5d4);
}

.mystery-finding.extraordinary {
    --finding-color: #FFD700;
    background: rgba(255,215,0,0.05);
}

.mystery-finding.high {
    --finding-color: #7b61ff;
}

.mystery-finding.medium {
    --finding-color: #00f5d4;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   PRO COMMUNITY LIVE CHAT STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Chat Toggle Button */
.chat-toggle-btn {
    position: fixed;
    bottom: 68px;
    right: 90px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7b61ff, #00f5d4);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(123, 97, 255, 0.4);
    z-index: 1001;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(123, 97, 255, 0.6);
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF6B6B;
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* Chat Panel */
.chat-panel {
    position: fixed;
    bottom: 170px;
    right: 20px;
    width: 380px;
    height: 520px;
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    border: 1px solid rgba(123, 97, 255, 0.3);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
}

.chat-panel.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Chat Header */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, rgba(123, 97, 255, 0.2), rgba(0, 245, 212, 0.1));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-title {
    font-weight: 600;
    font-size: 15px;
    color: #fff;
}

.chat-online {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 6px;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.chat-close-btn:hover {
    background: rgba(255, 107, 107, 0.3);
    color: #FF6B6B;
}

/* Chat Channels */
.chat-channels {
    display: flex;
    gap: 6px;
    padding: 10px;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-channels::-webkit-scrollbar {
    height: 4px;
}

.chat-channels::-webkit-scrollbar-thumb {
    background: rgba(123, 97, 255, 0.3);
    border-radius: 2px;
}

.chat-channel-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.chat-channel-btn:hover {
    background: rgba(123, 97, 255, 0.2);
    border-color: rgba(123, 97, 255, 0.3);
}

.chat-channel-btn.active {
    background: linear-gradient(135deg, rgba(123, 97, 255, 0.3), rgba(0, 245, 212, 0.2));
    border-color: rgba(123, 97, 255, 0.5);
    color: #fff;
}

/* Online Users */
.chat-online-users {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    overflow-x: auto;
    min-height: 36px;
}

.online-user {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

.online-indicator {
    width: 6px;
    height: 6px;
    background: #4CAF50;
    border-radius: 50%;
}

.online-more {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(123, 97, 255, 0.3);
    border-radius: 3px;
}

.chat-loading, .chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    text-align: center;
}

/* Chat Message */
.chat-message {
    display: flex;
    gap: 10px;
    animation: fadeInUp 0.2s ease;
}

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

.chat-message.own {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-message-content {
    max-width: 70%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-message.own .chat-message-content {
    align-items: flex-end;
}

.chat-message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.chat-message.own .chat-message-header {
    flex-direction: row-reverse;
}

.chat-username {
    color: #7b61ff;
    font-weight: 600;
}

.chat-message.own .chat-username {
    color: #00f5d4;
}

.chat-time {
    color: rgba(255, 255, 255, 0.4);
}

.chat-message-body {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 14px;
    border-radius: 16px;
    border-top-left-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    word-break: break-word;
}

.chat-message.own .chat-message-body {
    background: linear-gradient(135deg, rgba(123, 97, 255, 0.3), rgba(0, 245, 212, 0.2));
    border-top-left-radius: 16px;
    border-top-right-radius: 4px;
}

.chat-message-body a {
    color: #00f5d4;
    text-decoration: none;
}

.chat-message-body a:hover {
    text-decoration: underline;
}

/* Site Share Card */
.chat-site-share {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 245, 212, 0.1);
    border: 1px solid rgba(0, 245, 212, 0.2);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-site-share:hover {
    background: rgba(0, 245, 212, 0.15);
    border-color: rgba(0, 245, 212, 0.4);
}

.chat-site-icon {
    font-size: 24px;
}

.chat-site-name {
    font-weight: 600;
    color: #00f5d4;
    font-size: 13px;
}

.chat-site-coords {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Space Mono', monospace;
}

.chat-site-action {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

/* Discovery Share Card */
.chat-discovery {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(123, 97, 255, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 12px;
    padding: 12px;
}

.chat-discovery-header {
    font-size: 11px;
    color: #FFD700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-discovery-site {
    font-weight: 600;
    color: #fff;
    font-size: 14px;
    margin-bottom: 8px;
}

.chat-discovery-score {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.chat-discovery-score .score-bar {
    flex: 1;
    height: 6px;
    background: linear-gradient(90deg, #00f5d4, #7b61ff, #FFD700);
    border-radius: 3px;
}

.chat-discovery-score span {
    font-weight: bold;
    color: #FFD700;
    font-size: 14px;
}

.chat-discovery-stats {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

/* Chat Notification */
.chat-notification {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    white-space: nowrap;
}

.chat-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Chat Input */
.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#chatInput {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 12px 18px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

#chatInput::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#chatInput:focus {
    border-color: rgba(123, 97, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7b61ff, #00f5d4);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(123, 97, 255, 0.4);
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-panel {
        width: calc(100% - 20px);
        right: 10px;
        bottom: 80px;
        height: 60vh;
    }
    
    .chat-toggle-btn {
        bottom: 60px;
        right: 80px;
        width: 40px;
        height: 40px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   OVERLAY CONTROL PANEL
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Overlay control panel - OLD - HIDDEN (using new historyControls instead) */
#overlayControlPanel {
    display: none !important;
    position: fixed;
    top: 80px;
    left: 295px;
    z-index: 1000;
}

.overlay-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(26, 26, 46, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 4px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.overlay-controls button {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    position: relative;
}

.overlay-controls button:hover:not(:disabled) {
    background: rgba(123, 97, 255, 0.2);
    border-color: rgba(123, 97, 255, 0.4);
    transform: translateY(-1px);
}

.overlay-controls button:disabled {
    cursor: not-allowed;
}

.overlay-controls button:active:not(:disabled) {
    transform: translateY(0);
}

.overlay-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 4px;
}

.overlay-clear-btn {
    background: rgba(255, 107, 107, 0.1) !important;
    border-color: rgba(255, 107, 107, 0.2) !important;
}

.overlay-clear-btn:hover {
    background: rgba(255, 107, 107, 0.2) !important;
    border-color: rgba(255, 107, 107, 0.4) !important;
}

.overlay-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    background: #FF6B6B;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.overlay-clear-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: rgba(26, 26, 46, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 6px;
    min-width: 180px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.overlay-clear-menu button {
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.overlay-clear-menu button:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.overlay-clear-menu .menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 6px 0;
}

.overlay-clear-menu .clear-all {
    color: #FF6B6B;
}

.overlay-clear-menu .clear-all:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* Mobile responsive - overlay controls hidden */
@media (max-width: 768px) {
    #overlayControlPanel {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MAPBOX POPUP / INFO WINDOW STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Custom dark scrollbar for site info content */
.site-info-window {
    scrollbar-width: thin;
    scrollbar-color: rgba(123, 97, 255, 0.3) transparent;
}

.site-info-window::-webkit-scrollbar {
    width: 6px;
}

.site-info-window::-webkit-scrollbar-track {
    background: transparent;
}

.site-info-window::-webkit-scrollbar-thumb {
    background: rgba(123, 97, 255, 0.3);
    border-radius: 3px;
}

.site-info-window::-webkit-scrollbar-thumb:hover {
    background: rgba(123, 97, 255, 0.5);
}

/* Mapbox native popup enhancements */
.mapboxgl-popup {
    z-index: 999 !important;
}

.mapboxgl-popup-content {
    background: rgba(10, 15, 26, 0.98) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   UI/UX POLISH - VERSION 1.0 ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── Enhanced Tool Buttons ──────────────────────────────────────────────────── */
.tool-btn {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.tool-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 245, 212, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.tool-btn:hover::before {
    left: 100%;
}

.tool-btn:hover .tool-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.tool-btn:hover .tool-label {
    color: var(--accent-cyan);
}

/* Pro Feature Button Style */
.tool-btn.pro-only::after {
    content: '⭐';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 10px;
    opacity: 0.8;
}

/* ─── Enhanced Section Headers ───────────────────────────────────────────────── */
.section-header {
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
    transition: width 0.3s ease;
}

.sidebar-section:hover .section-header::after {
    width: 60px;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 14px;
}

/* ─── Improved Filter Items ──────────────────────────────────────────────────── */
.filter-item {
    position: relative;
    transition: all 0.2s ease;
}

.filter-item:hover {
    background: rgba(255, 255, 255, 0.05);
    padding-left: 12px;
}

.filter-item:hover .filter-icon {
    transform: scale(1.2);
}

.filter-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(0, 245, 212, 0.1);
    border-radius: 10px;
    color: var(--accent-cyan);
    transition: all 0.2s ease;
}

.filter-item:hover .filter-count {
    background: rgba(0, 245, 212, 0.2);
}

/* ─── Enhanced Modal Styling ─────────────────────────────────────────────────── */
#messageModal {
    animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content {
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

/* Modal close button enhancement */
.modal-close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: var(--accent-red);
    color: var(--accent-red);
    transform: rotate(90deg);
}

/* ─── Enhanced Toast Notifications ───────────────────────────────────────────── */
.toast-notification {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-notification.toast-success {
    border-left: 4px solid var(--accent-green);
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(26, 26, 46, 0.95));
}

.toast-notification.toast-error {
    border-left: 4px solid var(--accent-red);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(26, 26, 46, 0.95));
}

.toast-notification.toast-warning {
    border-left: 4px solid var(--accent-orange);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15), rgba(26, 26, 46, 0.95));
}

.toast-notification.toast-info {
    border-left: 4px solid var(--accent-cyan);
    background: linear-gradient(135deg, rgba(0, 245, 212, 0.15), rgba(26, 26, 46, 0.95));
}

/* ─── Pro Badge Enhancement ──────────────────────────────────────────────────── */
.pro-badge {
    background: linear-gradient(135deg, #FFD700, #FF9800) !important;
    color: #000 !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    animation: proBadgeGlow 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

@keyframes proBadgeGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    }
}

/* ─── Loading Spinner Enhancement ────────────────────────────────────────────── */
.loading-spinner {
    position: relative;
}

.loading-spinner::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 245, 212, 0.1);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Loading overlay for panels (use class .panel-loading-overlay for local overlays) */
.panel-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 15, 26, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.loading-text {
    color: var(--text-secondary);
    font-size: 13px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ─── Empty State Styling ────────────────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state-title {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state-message {
    color: var(--text-tertiary);
    font-size: 13px;
    max-width: 250px;
    line-height: 1.5;
}

/* ─── Button Ripple Effect ───────────────────────────────────────────────────── */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ─── Improved Input Fields ──────────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
textarea,
select {
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Dropdown option styling for dark theme */
select option {
    background: #1a1f2e;
    color: #ffffff;
    padding: 10px;
}

select option:hover,
select option:focus,
select option:checked {
    background: #2a3142;
    color: #00f5d4;
}

/* Style the select dropdown itself */
select:not([multiple]) {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 0 3px rgba(0, 245, 212, 0.1);
}

/* ─── Scrollbar Styling ──────────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 245, 212, 0.2);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 245, 212, 0.4);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 245, 212, 0.2) rgba(255, 255, 255, 0.02);
}

/* ─── Tooltip Enhancement ────────────────────────────────────────────────────── */
[title] {
    position: relative;
}

/* Custom tooltip via data attribute */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    pointer-events: none;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ─── Card Hover Effects ─────────────────────────────────────────────────────── */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 245, 212, 0.2);
}

/* ─── Stats Counter Animation ────────────────────────────────────────────────── */
.stats-display {
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
}

.stats-display:hover {
    background: rgba(0, 245, 212, 0.1);
    border-radius: 8px;
}

#visibleSitesCount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 13px;
    color: var(--accent-cyan);
    white-space: nowrap;
}

/* ─── Sidebar Section Collapse Animation ─────────────────────────────────────── */
.sidebar-section .section-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.sidebar-section.collapsed-section .section-content {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.sidebar-section.collapsed-section.expanded .section-content {
    max-height: 500px;
    opacity: 1;
}

.section-toggle {
    transition: transform 0.3s ease;
}

.sidebar-section.expanded .section-toggle {
    transform: rotate(180deg);
}

/* ─── Enhanced Top Bar ───────────────────────────────────────────────────────── */
#topBar {
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo:hover .logo-icon {
    animation: logoSpin 0.6s ease;
}

@keyframes logoSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ─── Search Enhancement ─────────────────────────────────────────────────────── */
.search-container {
    transition: all 0.3s ease;
}

.search-container:focus-within {
    box-shadow: 0 0 0 2px rgba(0, 245, 212, 0.3);
}

#searchInput::placeholder {
    transition: opacity 0.2s ease;
}

#searchInput:focus::placeholder {
    opacity: 0.5;
}

/* ─── Map Controls Enhancement ───────────────────────────────────────────────── */
.map-controls-panel {
    /* Removed backdrop-filter blur - was causing visual artifacts */
}

.style-btn-mini,
.toggle-btn {
    transition: all 0.2s ease;
}

.style-btn-mini:hover,
.toggle-btn:hover {
    transform: scale(1.1);
}

.style-btn-mini.active,
.toggle-btn.active {
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.3);
}

/* ─── User Menu Enhancement ──────────────────────────────────────────────────── */
.user-dropdown {
    animation: dropdownSlide 0.2s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    padding-left: 20px;
}

.dropdown-item.highlight {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 152, 0, 0.1));
    border-left: 3px solid var(--accent-gold);
}

.dropdown-item.highlight:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 152, 0, 0.2));
}

/* ─── Site Info Window Enhancement ───────────────────────────────────────────── */
.site-info-window {
    animation: infoWindowPop 0.3s ease;
}

@keyframes infoWindowPop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ─── Bottom Bar Enhancement ─────────────────────────────────────────────────── */
#bottomBar {
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.coordinates-display {
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.3px;
}

/* ─── Tab System Enhancement ─────────────────────────────────────────────────── */
.tab-btn {
    position: relative;
    transition: all 0.2s ease;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tab-btn:hover::after,
.tab-btn.active::after {
    width: 100%;
}

/* ─── Responsive Improvements ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .tool-btn {
        min-height: 50px;
        padding: 10px 4px;
    }
    
    .tool-icon {
        font-size: 18px;
    }
    
    .tool-label {
        font-size: 9px;
    }
    
    .tools-grid.three-col {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .section-header::after {
        display: none;
    }
    
    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
}

/* ─── Keyboard Focus Indicators ──────────────────────────────────────────────── */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* ─── Selection Styling ──────────────────────────────────────────────────────── */
::selection {
    background: rgba(0, 245, 212, 0.3);
    color: var(--text-primary);
}

/* ─── Print Styles ───────────────────────────────────────────────────────────── */
@media print {
    #leftSidebar,
    #topBar,
    #bottomBar,
    .map-controls-panel,
    .toast-container {
        display: none !important;
    }
    
    #map {
        position: static !important;
        height: 100vh !important;
    }
}

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

/* ═══════════════════════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE - Complete mobile experience
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Tablet/Small Laptop */
@media (max-width: 1024px) {
    #leftSidebar {
        width: 260px;
    }
    
    #map {
        left: 260px !important;
    }
}

/* Mobile Landscape / Small Tablet */
@media (max-width: 768px) {
    /* Sidebar becomes collapsible drawer */
    #leftSidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        z-index: 1002;
        transition: left 0.3s ease;
    }
    
    #leftSidebar.open {
        left: 0;
    }
    
    /* Map takes full width */
    #map {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
    }
    
    /* Mobile menu toggle button */
    .mobile-menu-btn {
        display: flex !important;
        position: fixed;
        top: 70px;
        left: 10px;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: rgba(20, 20, 30, 0.95);
        border: 1px solid rgba(123, 97, 255, 0.3);
        color: #7b61ff;
        font-size: 20px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 1001;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    
    /* Floating controls repositioned for mobile */
    #historyControls {
        bottom: 60px !important;
        left: 10px !important;
    }
    
    #historyControls button {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }
    
    /* Chat button */
    #chatToggleBtn {
        bottom: 60px !important;
        right: 70px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 16px !important;
    }
    
    /* FAB container */
    .fab-container {
        bottom: 15px !important;
        right: 15px !important;
    }
    
    .fab-main {
        width: 50px !important;
        height: 50px !important;
    }
    
    /* Map controls panel */
    .map-controls-panel {
        right: 5px !important;
        top: 70px !important;
    }
    
    /* Tool panels - make them full width on mobile */
    #unifiedToolsToolbar {
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        top: 70px !important;
    }
    
    /* Mapbox popup responsive */
    .mapboxgl-popup-content {
        max-width: 90vw !important;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    /* Top bar compact */
    #topBar {
        padding: 0 8px;
        gap: 6px;
    }
    
    .search-container {
        flex: 1;
        min-width: 0;
    }
    
    .search-input {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .logo-icon {
        width: 32px !important;
        height: 32px !important;
    }
    
    /* Even smaller floating controls */
    #historyControls {
        gap: 5px !important;
    }
    
    #historyControls button {
        width: 32px !important;
        height: 32px !important;
        font-size: 12px !important;
        border-radius: 8px !important;
    }
    
    /* Smaller chat button */
    #chatToggleBtn {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
        right: 60px !important;
    }
    
    /* Smaller FAB */
    .fab-main {
        width: 44px !important;
        height: 44px !important;
    }
    
    .fab-item {
        width: 36px !important;
        height: 36px !important;
    }
    
    /* Bottom bar minimal */
    #bottomBar {
        padding: 0 8px;
        font-size: 9px;
    }
    
    .coordinates {
        display: none;
    }
    
    /* Toast notifications */
    .toast-container {
        bottom: 60px !important;
        left: 10px !important;
        right: 10px !important;
    }
    
    .toast {
        padding: 10px 14px;
        font-size: 12px;
    }
}

/* Touch-friendly adjustments */
@media (pointer: coarse) {
    /* Larger touch targets */
    .tool-btn,
    .link-btn,
    .btn-secondary,
    .context-menu-item {
        min-height: 44px;
        padding: 12px;
    }
    
    /* More spacing in lists */
    .filter-item,
    .sidebar-section {
        margin-bottom: 8px;
    }
    
    /* Larger checkboxes */
    .filter-checkbox {
        width: 22px;
        height: 22px;
    }
}

/* Landscape orientation fix for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    #leftSidebar {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }
    
    .sidebar-content {
        max-height: calc(100vh - 100px);
    }
    
    #map {
        top: 50px !important;
        bottom: 30px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   VERSION BADGE
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Version Badge */
.version-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(123, 97, 255, 0.2));
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #FFD700;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    animation: versionGlow 3s ease-in-out infinite;
}

@keyframes versionGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.2); }
    50% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }
}

/* Copyright text in bottom bar */
.copyright-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .mobile-hide {
        display: none !important;
    }
    
    .version-badge {
        font-size: 8px;
        padding: 2px 4px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LUCIDE ICONS STYLING - v2.0 Enhancement
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Base Lucide icon styling */
[data-lucide] {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    vertical-align: middle;
}

/* Pyramid icon special styling */
.pyramid-icon {
    color: #FFD700;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

/* Section icons */
.section-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Filter icons */
.filter-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Tool icons */
.tool-icon {
    width: 20px;
    height: 20px;
}

/* Icon buttons */
.icon-btn [data-lucide] {
    width: 16px;
    height: 16px;
}

.icon-btn.danger [data-lucide] {
    color: #FF6B6B;
}

/* Dropdown icons */
.dropdown-item [data-lucide] {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    opacity: 0.7;
}

.dropdown-item:hover [data-lucide] {
    opacity: 1;
}

/* Context menu icons */
.context-icon {
    width: 14px;
    height: 14px;
    margin-right: 10px;
    opacity: 0.7;
}

/* Check icons in feature list */
.feature-list .check {
    width: 16px;
    height: 16px;
    color: #00f5d4;
    margin-right: 10px;
}

/* Spinning loader */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Zoom display icon */
.zoom-icon {
    width: 14px;
    height: 14px;
    opacity: 0.5;
}

/* Button icon alignment */
.btn-primary [data-lucide],
.btn-secondary [data-lucide] {
    width: 14px;
    height: 14px;
    margin-right: 6px;
}

/* FAB icons */
.fab-item [data-lucide] {
    width: 18px;
    height: 18px;
}

.fab-main [data-lucide] {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.fab-container.open .fab-main [data-lucide] {
    transform: rotate(45deg);
}

/* Map control icons */
.style-btn-mini [data-lucide] {
    width: 16px;
    height: 16px;
}

.toggle-btn [data-lucide] {
    width: 16px;
    height: 16px;
}

.controls-toggle [data-lucide] {
    width: 18px;
    height: 18px;
}

/* Street view pegman */
.pegman-icon {
    width: 20px;
    height: 20px;
}

/* Modal close button */
.modal-close [data-lucide] {
    width: 20px;
    height: 20px;
}

/* Discovery panel */
.discovery-icon {
    width: 20px;
    height: 20px;
    color: #00f5d4;
}

.discovery-close [data-lucide] {
    width: 16px;
    height: 16px;
}

/* Measurement display */
.measurement-header [data-lucide] {
    width: 16px;
    height: 16px;
}

/* Tour navigation */
.tour-actions [data-lucide] {
    width: 14px;
    height: 14px;
}

/* Text button icons */
.text-btn [data-lucide] {
    width: 12px;
    height: 12px;
    margin-right: 4px;
}

/* Link button icons */
.link-btn [data-lucide] {
    width: 14px;
    height: 14px;
    margin-right: 6px;
}

/* Dropdown arrow */
.dropdown-arrow {
    width: 12px;
    height: 12px;
    opacity: 0.5;
    transition: transform 0.2s ease;
}

.user-menu.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Toolbar separator */
.toolbar-separator {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 8px;
}

/* Top bar history controls */
.top-bar-history-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Three column compact grid */
.two-col-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.three-col-compact {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}

/* Sidebar footer */
.sidebar-footer {
    text-align: center;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
}

/* Tour help section padding */
.tour-help-section {
    padding: 8px 12px;
}

/* Chat button styling */
.chat-btn {
    background: linear-gradient(135deg, rgba(123, 97, 255, 0.3), rgba(0, 245, 212, 0.3));
    border: 1px solid rgba(123, 97, 255, 0.5);
    position: relative;
}

.chat-btn .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    background: #FF6B6B;
    border-radius: 8px;
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Globe button styling */
.globe-btn {
    background: linear-gradient(135deg, rgba(123, 97, 255, 0.2), rgba(0, 245, 212, 0.2));
    border: 1px solid rgba(0, 245, 212, 0.3);
}

/* Zoom display styling */
.zoom-display-top {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    margin-right: 10px;
}

.zoom-display-top #topBarZoomLevel {
    color: #00f5d4;
    font-weight: 500;
}

/* Loader improvements */
.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 30px;
}

.loading-icon {
    font-size: 36px;
    color: #00f5d4;
}

.loading-spinner-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: #00f5d4;
    border-right-color: #7b61ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 15px rgba(0, 245, 212, 0.3);
}

.spinner-ring.inner {
    inset: 8px;
    border-top-color: #7b61ff;
    border-right-color: transparent;
    animation: spin 1.2s linear infinite reverse;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #00f5d4, #7b61ff);
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    background: linear-gradient(135deg, #7b61ff, #FFD700);
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    background: linear-gradient(135deg, #FFD700, #00f5d4);
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Initial loader styling */
.loader-icon img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.6));
}

/* Frequency stop button */
.freq-stop [data-lucide] {
    width: 12px;
    height: 12px;
    margin-right: 4px;
}


/* ═══════════════════════════════════════════════════════════════════════════════
   3D FEATURE BUTTONS - Enhanced Styling
   ═══════════════════════════════════════════════════════════════════════════════ */

/* 3D Features section styling */
.controls-section .toggle-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

/* When there are more than 4 buttons, allow wrap */
@media (max-width: 300px) {
    .controls-section .toggle-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 3D Terrain button active state */
#btn3DTerrain.active {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.4), rgba(139, 195, 74, 0.4));
    border-color: #4CAF50;
    color: #4CAF50;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
}

#btn3DTerrain.active i {
    color: #4CAF50;
}

/* 3D Buildings button active state */
#btn3DBuildings.active {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.4), rgba(100, 181, 246, 0.4));
    border-color: #2196F3;
    color: #2196F3;
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.3);
}

#btn3DBuildings.active i {
    color: #2196F3;
}

/* Atmosphere button active state */
#btnAtmosphere.active {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.4), rgba(233, 30, 99, 0.4));
    border-color: #9C27B0;
    color: #9C27B0;
    box-shadow: 0 0 15px rgba(156, 39, 176, 0.3);
}

#btnAtmosphere.active i {
    color: #9C27B0;
}

/* Orbit button active state - pulsing animation */
#btnOrbit.active {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.4), rgba(255, 193, 7, 0.4));
    border-color: #FF9800;
    color: #FF9800;
    animation: orbitPulse 1s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.3);
}

#btnOrbit.active i {
    color: #FF9800;
    animation: spin 2s linear infinite;
}

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

/* Hover effects for 3D buttons */
#btn3DTerrain:hover {
    border-color: #4CAF50;
}

#btn3DBuildings:hover {
    border-color: #2196F3;
}

#btnAtmosphere:hover {
    border-color: #9C27B0;
}

#btnOrbit:hover {
    border-color: #FF9800;
}

/* 3D Features title styling */
.controls-section .controls-title {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

/* Map controls panel improvements */
.map-controls-panel .controls-content {
    max-height: 400px;
    overflow-y: auto;
}

/* Scrollbar styling for controls */
.controls-content::-webkit-scrollbar {
    width: 4px;
}

.controls-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.controls-content::-webkit-scrollbar-thumb {
    background: rgba(0, 245, 212, 0.3);
    border-radius: 2px;
}

.controls-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 245, 212, 0.5);
}


/* ═══════════════════════════════════════════════════════════════════════════════
   MAPBOX POPUP STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

.mapboxgl-popup {
    z-index: 100;
    max-width: 360px !important;
}

.mapboxgl-popup-content {
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    overflow: visible;
    width: auto !important;
    max-width: 360px !important;
}

.mapboxgl-popup-close-button {
    display: none !important;
}

.mapboxgl-popup-close-button:hover {
    background: transparent !important;
    opacity: 1;
}

.mapboxgl-popup-tip {
    display: none !important;
}

.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {
    display: none !important;
}

.mapboxgl-popup-anchor-top .mapboxgl-popup-tip {
    display: none !important;
}

.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
    display: none !important;
}

.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
    display: none !important;
}

/* Site popup specific */
.site-popup .mapboxgl-popup-content {
    background: transparent !important;
    max-width: 360px !important;
}

/* Pyramason info popup */
.pyramason-info-popup {
    max-width: 360px !important;
}

.pyramason-info-popup .mapboxgl-popup-content {
    background: transparent !important;
    max-width: 360px !important;
    width: auto !important;
    padding: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   NATAL CHART OVERLAY STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Natal chart popup styling */
.natal-popup .mapboxgl-popup-content {
    background: rgba(26, 26, 46, 0.98) !important;
    border-radius: 12px !important;
    padding: 0 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 245, 212, 0.2) !important;
    border: 1px solid rgba(255, 215, 0, 0.3) !important;
    overflow: hidden !important;
}

.natal-popup .mapboxgl-popup-tip {
    border-top-color: rgba(26, 26, 46, 0.98) !important;
    display: block !important;
}

/* Zodiac sign markers */
.natal-sign-marker {
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 50;
    /* Only transition visual properties, NOT transform or position */
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.natal-sign-marker:hover {
    z-index: 100 !important;
}

/* Planet markers */
.natal-planet-marker {
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 60;
    /* Only transition visual properties, NOT transform or position */
    transition: box-shadow 0.2s ease, border-width 0.2s ease !important;
}

.natal-planet-marker:hover {
    z-index: 110 !important;
}
