/* Modern Titlebar Card */
.app-title {
    text-align: center;
    color: var(--text-color);
}

.app-title h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 500;
    color: #1a202c;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.app-title .subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Modern Header Buttons */
.modern-header-buttons .modern-btn {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px 0 rgba(108,77,247,0.08);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 8px 20px;
    margin-left: 6px;
    transition: background 0.2s, box-shadow 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modern-header-buttons .modern-btn.primary {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}
.modern-header-buttons .modern-btn:hover {
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 4px 16px 0 rgba(108,77,247,0.13);
}
.modern-header-buttons .modern-btn i {
    font-size: 1.2em;
}

/* Help Button Styling */
.help-btn {
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px 0 rgba(59,130,246,0.15);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 16px;
    margin-left: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.help-btn:hover {
    background: linear-gradient(90deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 4px 16px 0 rgba(59,130,246,0.25);
    transform: translateY(-1px);
}

.help-btn i {
    font-size: 1.1em;
}

.help-btn span {
    font-weight: 600;
}

/* Dropdown Styles */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    position: relative;
}

.dropdown-arrow {
    margin-left: 4px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown-container.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 999999;
    display: none;
    min-width: 180px;
    margin-top: 4px;
}

/* Export dropdown positioning */
#exportDropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    margin-top: 2px;
    display: none;
    min-width: 180px;
}

/* Make sure the dropdown container doesn't clip */
.collapsible-section .dropdown-container {
    position: relative;
    overflow: visible;
    z-index: 1000;
}

.section-content {
    overflow: visible;
}

.section-content.collapsed {
    overflow: hidden;
}

.section-content .dropdown-container {
    overflow: visible;
}

/* Position dropdowns above button if near bottom of screen */
.sidebar-actions-section .dropdown-menu {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 4px;
}

.sidebar-actions-section .dropdown-container.active .dropdown-arrow {
    transform: rotate(0deg);
}

/* Shape label styling */
.shape-label {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 2px 6px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #333 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

.shape-label::before {
    display: none !important;
}

/* Symbol search styling */
.symbol-search-bar {
    position: relative;
    margin-bottom: 12px;
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.clear-search-btn:hover {
    background: #f3f4f6;
    color: #333;
}

/* Custom symbol icon styling */
.custom-div-icon {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.custom-div-icon.no-background {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.custom-div-icon i {
    margin: 0 !important;
}

.dropdown-container.active .dropdown-menu {
    display: block !important;
    animation: dropdownFadeIn 0.2s ease;
}

.dropdown-container.active #exportDropdown {
    display: block !important;
}

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

.dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

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

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

.dropdown-item i {
    width: 16px;
    text-align: center;
}

/* Sidebar Actions Section */
.sidebar-actions-section {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-btn {
    width: 100%;
    padding: 8px 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.sidebar-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.sidebar-btn i {
    margin-right: 8px;
}

.sidebar-btn .dropdown-arrow {
    margin-left: auto;
    margin-right: 0;
}

/* Symbol Picker Modal */
.symbol-picker-modal {
    min-width: 480px;
    max-width: 700px;
    padding: 24px 32px 18px 32px;
}
.symbol-category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    margin-top: 8px;
}
.symbol-tab {
    background: #f3f4f6;
    border: none;
    border-radius: 8px;
    padding: 6px 18px;
    font-size: 1rem;
    color: #2563eb;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.symbol-tab.active, .symbol-tab:hover {
    background: #2563eb;
    color: #fff;
}
.colorful-symbols .symbol-item i {
    font-size: 2.1em;
    /* Colorful by default, see JS for per-symbol color */
}
.colorful-symbols .symbol-item {
    background: #fff;
    border: 1.5px solid #e0e7ef;
    border-radius: 14px;
    box-shadow: 0 2px 8px 0 rgba(37,99,235,0.06);
    transition: box-shadow 0.2s, border 0.2s;
    padding: 16px 0 10px 0;
}
.colorful-symbols .symbol-item:hover {
    box-shadow: 0 4px 16px 0 rgba(37,99,235,0.13);
    border: 1.5px solid #2563eb;
}
:root {
    --primary-color: #6C4DF7;
    --primary-light: #8B7BFF;
    --primary-dark: #5A3FE5;
    --secondary-color: #23222B;
    --accent-color: #7B61FF;
    --background-color: #F8F9FC;
    --surface-color: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #23222B;
    --text-light: #64748B;
    --border-color: #E3E0F3;
    --shadow-sm: 0 2px 8px rgba(108, 77, 247, 0.04);
    --shadow-md: 0 4px 16px rgba(108, 77, 247, 0.08);
    --shadow-lg: 0 8px 32px rgba(108, 77, 247, 0.12);
    --sidebar-width: 320px;
    --header-height: 70px;
    --footer-height: 32px;
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --border-radius-lg: 20px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #f8f9fc 0%, #e3e0f3 100%);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header Styles */
.app-header {
    height: var(--header-height);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.08), 0 2px 8px -2px rgba(0, 0, 0, 0.06);
    z-index: 100;
    position: relative;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
.header-center {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 32px;
}
.icon-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: background 0.2s cubic-bezier(.4,0,.2,1);
}
.icon-btn:hover {
    background: var(--background-color);
    color: var(--primary-color);
}
}

.header-buttons {
    display: flex;
    gap: 10px;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    display: flex;
    position: relative;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-radius: var(--border-radius-lg);
    margin: 20px 0;
    height: calc(100vh - var(--header-height) - var(--footer-height) - 40px);
    max-height: calc(100vh - var(--header-height) - var(--footer-height) - 40px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.left-sidebar {
    border-right: none;
    margin-left: 20px;
    position: relative;
    overflow-y: auto !important;
    overflow-x: hidden;
    height: calc(100vh - var(--header-height) - var(--footer-height) - 40px) !important;
}
.left-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-color) 50%, transparent 100%);
    opacity: 0.3;
}

.right-sidebar {
    border-left: none;
    margin-right: 16px;
    min-width: 260px;
    max-width: 320px;
    transition: transform 0.2s cubic-bezier(.4,0,.2,1);
}

/* Collapsible Sidebar */
.sidebar.left-sidebar {
    transition: width 0.2s cubic-bezier(.4,0,.2,1), min-width 0.2s cubic-bezier(.4,0,.2,1);
    min-width: var(--sidebar-width);
    width: var(--sidebar-width);
    position: relative;
    z-index: 20;
}
.sidebar.left-sidebar.collapsed {
    min-width: 56px;
    width: 56px;
    overflow-x: hidden;
}
.collapse-sidebar-btn {
    position: absolute;
    top: 60px;
    right: 8px;
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.2em;
    cursor: pointer;
    z-index: 21;
    transition: color 0.2s;
}
.collapse-sidebar-btn:hover {
    color: var(--primary-color);
}

/* Toolbox Styles */
.toolbox {
    padding: 20px 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.tool-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin: 0;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
}

.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.actions-grid {
    grid-template-columns: 1fr 1fr;
}

.drawing-tools {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}

.tool-btn {
    padding: 6px 4px;
    border: 2px solid transparent;
    background: var(--background-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 0.75rem;
    color: var(--text-color);
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    min-height: 44px;
    text-align: center;
}
.tool-btn i {
    font-size: 1rem;
    margin-bottom: 1px;
}
.tool-btn span {
    font-size: 0.65rem;
    line-height: 1;
    font-weight: 400;
}
.tool-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s ease;
}
.tool-btn:hover::before {
    left: 100%;
}

.tool-btn:hover {
    background: var(--surface-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.tool-btn.active {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: #fff !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 0 2px #22c55e40, var(--shadow-lg) !important;
    transform: translateY(-1px);
}

.tool-btn.primary {
    background: var(--background-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
}
.tool-btn.primary:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.tool-btn.danger {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}
.tool-btn.danger:hover {
    background: #dc2626;
    color: #fff;
    border-color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Symbol Library Styles */
.symbol-library {
    padding: 10px 12px 18px 12px;
    border-top: 1px solid var(--border-color);
}

.search-bar {
    margin-bottom: 10px;
}

.search-bar input {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    font-size: 1rem;
    background: var(--background-color);
    transition: border-color 0.2s cubic-bezier(.4,0,.2,1);
    border-color: var(--primary-color);
    outline: none;
}

.symbol-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 8px;
}

.symbol-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 0 8px 0;
    border: none;
    background: var(--background-color);
    border-radius: 14px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--secondary-color);
    box-shadow: none;
    transition: background 0.2s cubic-bezier(.4,0,.2,1), color 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1);
    outline: none;
}

.symbol-item:hover {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 2px 8px 0 rgba(37,99,235,0.08);
    font-size: 1.5rem;
}
.symbol-item span {
    font-size: 0.95rem;
    margin-top: 2px;
}

/* Map Settings Section */
.map-settings-section {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
}

.settings-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin: 0 0 12px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
}

.modern-select, .modern-input {
    padding: 6px 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    background: var(--surface-color);
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    outline: none;
}

.modern-select {
    cursor: pointer;
}

.modern-select:focus, .modern-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 77, 247, 0.1), var(--shadow-md);
    transform: translateY(-1px);
}

/* Collapsible Sections */
.collapsible-section {
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s ease;
    user-select: none;
}

.section-header:hover {
    background-color: var(--glass-bg);
}

.section-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.section-icon {
    font-size: 0.8rem;
    color: var(--primary-color);
}

.collapse-icon {
    font-size: 0.8rem;
    color: var(--text-light);
    transition: transform 0.3s ease;
}

.section-header:not(.collapsed) .collapse-icon {
    transform: rotate(180deg);
}

.section-content {
    padding: 0 16px 16px 16px;
    overflow: visible;
    transition: max-height 0.3s ease, padding 0.3s ease;
    max-height: 500px;
}

.section-content.collapsed {
    max-height: 0;
    padding: 0 16px;
    overflow: hidden;
}

/* Location Search Styles */
.search-group {
    margin-top: 8px;
}

.location-search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.location-search-bar input {
    flex: 1;
}

.search-btn {
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.search-btn:hover {
    background: var(--accent-color);
}

.location-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--surface-color);
}

.location-item {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

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

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

.location-item .place-name {
    font-weight: 500;
    color: var(--text-color);
}

.location-item .place-details {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 2px;
}

.setting-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    padding: 2px 0;
}

.setting-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-radius: 3px;
    background: var(--surface-color);
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.setting-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.setting-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.checkbox-label {
    flex: 1;
    user-select: none;
}

/* Symbol Search Bar */
.symbol-search-bar {
    margin: 16px 48px 12px 16px;
    display: flex;
    align-items: center;
    position: relative;
}
.symbol-search-bar::before {
    content: '\f002';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 16px;
    color: var(--text-light);
    font-size: 0.9rem;
    z-index: 1;
}
.symbol-search-bar input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--surface-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    outline: none;
}
.symbol-search-bar input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 77, 247, 0.1), var(--shadow-md);
    transform: translateY(-1px);
}
.symbol-search-bar input::placeholder {
    color: var(--text-light);
    font-weight: 500;
}

/* Symbol Search Results */
.symbol-search-results {
    margin: 0 16px 16px 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 12px;
    border: 1px solid var(--border-color);
}
.symbol-search-results::-webkit-scrollbar {
    width: 6px;
}
.symbol-search-results::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 3px;
}
.symbol-search-results::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
    opacity: 0.3;
}
.symbol-search-results::-webkit-scrollbar-thumb:hover {
    opacity: 0.6;
}
.symbol-search-results .symbol-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px 6px 4px;
    border: 2px solid transparent;
    background: var(--background-color);
    border-radius: var(--border-radius-sm);
    cursor: grab;
    font-size: 0.9rem;
    color: var(--text-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    user-select: none;
    position: relative;
    overflow: hidden;
    min-height: 60px;
}
.symbol-search-results .symbol-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}
.symbol-search-results .symbol-item:hover::before {
    opacity: 0.1;
}
.symbol-search-results .symbol-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px) scale(1.02);
    color: var(--primary-color);
}
.symbol-search-results .symbol-item:active {
    cursor: grabbing;
}
.symbol-search-results .symbol-item i {
    font-size: 1.6em;
}
.symbol-search-results .symbol-item span {
    font-size: 0.75rem;
    margin-top: 1px;
    text-align: center;
    line-height: 1.1;
}

/* Safari-specific SVG fixes for symbol search */
.symbol-search-results .symbol-item svg {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
}

.symbol-search-results .symbol-item div[style*="width:24px"] {
    flex-shrink: 0;
}

/* Map Container Styles */
.map-container {
    flex: 1;
    background-color: var(--background-color);
    border-radius: var(--border-radius-lg);
    margin: 20px 20px 20px 0;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
}
.map-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    pointer-events: none;
    z-index: 10;
}

/* Properties Panel Styles */
.properties-panel {
    padding: 18px 18px 8px 18px;
    background: var(--surface-color);
    border-radius: 14px;
    box-shadow: 0 4px 24px 0 rgba(30,41,59,0.08);
    margin: 10px 0;
.properties-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="color"],
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

/* Footer Styles */
.app-footer {
    height: 32px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.04);
    font-size: 0.75rem;
}

.footer-info, .footer-marketing {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Marketing Badge */
.marketing-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1a202c;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(251, 191, 36, 0.2);
}

@keyframes subtle-pulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(251, 191, 36, 0.25); }
    50% { box-shadow: 0 4px 16px rgba(251, 191, 36, 0.4); }
}

/* Contact Link */
.contact-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.2s;
}

.contact-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    transform: translateY(-1px);
}

.contact-link i {
    font-size: 0.9em;
}

/* Improved Scale and Coordinates */
.scale-info, .coordinates {
    font-weight: 600;
    color: #374151;
    font-size: 0.65rem;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(5px);
}

.scale-info span, .coordinates span {
    color: #1f2937;
    font-weight: 700;
}

/* Mobile Responsive Footer */
@media (max-width: 768px) {
    .app-footer {
        height: 28px;
        padding: 0 12px;
        font-size: 0.7rem;
    }
    
    .footer-info, .footer-marketing {
        gap: 8px;
    }
    
    .marketing-badge {
        font-size: 0.6rem;
        padding: 1px 6px;
    }
    
    .contact-link {
        font-size: 0.6rem;
    }
    
    .scale-info, .coordinates {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
}

/* Modal Styles */
.modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.modal.show {
    display: flex !important;
}
@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

.modal-content {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 400px;
    max-width: 500px;
    padding: 24px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
}

/* Button Styles */
.btn {
    padding: 10px 16px;
    border: 2px solid transparent;
    background: var(--background-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}
.btn:hover::before {
    left: 100%;
}

.btn:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    border-color: var(--primary-light);
}
.btn.primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn i {
    font-size: 1rem;
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.loading-shimmer {
    position: relative;
    overflow: hidden;
}
.loading-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    z-index: 999;
    align-items: center;
    justify-content: center;
}
.mobile-menu-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Show mobile menu button on small screens */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex !important;
    }
}

/* Focus States */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection Styles */
::selection {
    background: var(--primary-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 1400px) {
    :root {
        --sidebar-width: 280px;
    }
}

@media (max-width: 1200px) {
    :root {
        --sidebar-width: 260px;
        --header-height: 65px;
    }
    .app-header {
        padding: 0 24px;
    }
    .app-title h1 {
        font-size: 1.3rem;
    }
    .app-title .subtitle {
        font-size: 0.8rem;
    }
}

@media (max-width: 900px) {
    :root {
        --header-height: 60px;
    }
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    .sidebar.left-sidebar {
        min-width: 60px;
        width: 60px;
    }
    .sidebar.left-sidebar:not(.collapsed) {
        min-width: var(--sidebar-width);
        width: var(--sidebar-width);
        position: fixed;
        z-index: 9999;
        top: var(--header-height);
        left: 0;
        height: calc(100vh - var(--header-height) - var(--footer-height));
        margin: 0;
        border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
        overflow-y: auto;
        overflow-x: hidden;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    }
    .sidebar.left-sidebar.show {
        position: fixed !important;
        z-index: 9999 !important;
        top: var(--header-height) !important;
        left: 0 !important;
        width: 85vw !important;
        height: calc(100vh - var(--header-height)) !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3) !important;
    }
    .app-title h1 {
        font-size: 1.2rem;
    }
    .app-title .subtitle {
        font-size: 0.75rem;
    }
    .app-header {
        padding: 0 16px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 55px;
        --footer-height: 28px;
    }
    .main-content {
        flex-direction: column;
        height: calc(100vh - var(--header-height) - var(--footer-height));
    }
    
    .sidebar {
        width: 100%;
        height: 35vh;
        margin: 0;
        border-radius: 0;
        max-height: 35vh;
        min-height: 200px;
        overflow-y: auto;
        flex-shrink: 0;
    }
    
    .left-sidebar {
        order: 2;
        height: 35vh;
        max-height: 35vh;
        overflow-y: auto;
    }
    
    .left-sidebar.show {
        position: fixed !important;
        top: var(--header-height) !important;
        left: 0 !important;
        width: 85vw !important;
        height: calc(100vh - var(--header-height)) !important;
        z-index: 9999 !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3) !important;
        border-radius: 0 !important;
        margin: 0 !important;
        order: unset !important;
        max-height: none !important;
    }
    
    .map-container {
        order: 1;
        height: 65vh;
        margin: 0;
        border-radius: 0;
        flex: 0 0 65vh;
    }
    
    .app-title h1 {
        font-size: 1.1rem;
    }
    .app-title .subtitle {
        font-size: 0.7rem;
    }
    .app-header {
        padding: 0 12px;
    }
}

/* iPhone XR and similar small phones */
@media (max-width: 414px) {
    .mobile-menu-btn {
        display: flex !important;
        position: fixed !important;
        top: 8px !important;
        left: 8px !important;
        width: 36px;
        height: 36px;
        z-index: 9999 !important;
    }
    
    .sidebar.left-sidebar {
        min-width: 0;
        width: 0;
        display: none;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.left-sidebar.show {
        display: block !important;
        min-width: 95vw;
        width: 95vw;
        position: fixed;
        top: var(--header-height);
        left: 0;
        z-index: 300;
        height: calc(100vh - var(--header-height));
        margin: 0;
        border-radius: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
        transform: translateX(0);
        overflow-y: auto !important;
        overflow-x: hidden;
    }
    
    .app-header {
        padding-left: 50px;
    }
    
    .logo {
        display: none;
    }
}

@media (max-width: 600px) {
    .sidebar.left-sidebar {
        min-width: 0;
        width: 0;
        display: none;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar.left-sidebar.show {
        display: block !important;
        min-width: 90vw;
        width: 90vw;
        position: fixed;
        top: var(--header-height);
        left: 0;
        z-index: 300;
        height: calc(100vh - var(--header-height));
        margin: 0;
        border-radius: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
        transform: translateX(0);
        overflow-y: auto;
        overflow-x: hidden;
    }
    .app-title {
        flex: 1;
        text-align: center;
    }
    .app-title h1 {
        font-size: 1rem;
    }
    .app-title .subtitle {
        display: none;
    }
    .logo {
        font-size: 1.3rem;
    }
    .header-buttons {
        gap: 6px;
    }
    .modern-header-buttons .modern-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    .modern-header-buttons .modern-btn span {
        display: none;
    }
    
    .app-header {
        padding-left: 60px; /* Make room for mobile menu button */
    }
    
    .logo {
        display: none; /* Hide logo on very small screens */
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .tool-btn, .btn, .symbol-item {
        min-height: 44px;
        min-width: 44px;
    }
    .symbol-search-bar input {
        padding: 16px 16px 16px 48px;
        font-size: 16px;
    }
}

/* Text Label Styles */
.custom-text-label {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.text-label {
    background: var(--surface-color);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--primary-color);
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1000;
    pointer-events: auto;
}

.text-label:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
    background: var(--primary-color);
    color: white;
}

.text-label::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--primary-color);
    transition: border-top-color 0.3s ease;
}

.text-label:hover::before {
    border-top-color: var(--primary-color);
}

/* Text Label Size Variants */
.text-label-small {
    font-size: 0.75rem;
    padding: 6px 8px;
}

.text-label-medium {
    font-size: 0.9rem;
    padding: 8px 12px;
}

.text-label-large {
    font-size: 1.1rem;
    padding: 10px 16px;
    font-weight: 700;
}

/* North Arrow Styles */
.north-arrow {
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.north-arrow-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--primary-color);
    font-weight: bold;
}

.north-arrow-icon i {
    font-size: 1.2rem;
}

.north-arrow-icon span {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #0f0f23;
        --surface-color: #1a1a2e;
        --glass-bg: rgba(26, 26, 46, 0.85);
        --glass-border: rgba(255, 255, 255, 0.1);
        --text-color: #e2e8f0;
        --text-light: #94a3b8;
        --border-color: #2d3748;
    }
    body {
        background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    }
    
    .text-label {
        background: var(--surface-color);
        color: var(--text-color);
        border-color: var(--primary-color);
    }
}
