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

/* ============================================================================
   THEME SYSTEM - CSS Variables
   ============================================================================ */

:root {
    /* Dark Theme Colors (Default) */
    --bg-primary: #0f1419;
    --bg-secondary: #1a202c;
    --bg-tertiary: #2d3748;
    --bg-elevated: #2d3748;
    --bg-elevated-hover: #3d4758;
    
    --border-color: #3d4758;
    --border-color-light: #4a5568;
    
    --text-primary: #e1e8ed;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    
    /* Purple Accent (Default) */
    --accent-primary: #667eea;
    --accent-primary-hover: #5a67d8;
    --accent-secondary: #4c51bf;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Accent Alpha Variants for Overlays */
    --accent-alpha-15: rgba(102, 126, 234, 0.15);
    --accent-alpha-20: rgba(102, 126, 234, 0.20);
    --accent-alpha-25: rgba(102, 126, 234, 0.25);
    --accent-alpha-40: rgba(102, 126, 234, 0.40);
    --accent-alpha-60: rgba(102, 126, 234, 0.60);
    --accent-alpha-80: rgba(102, 126, 234, 0.80);
    
    /* Semantic Colors */
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #ed8936;
    --info: #4299e1;
    
    /* Canvas */
    --canvas-bg: #0f1419;
}

/* Light Theme */
body.theme-light {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f5;
    --bg-elevated: #ffffff;
    --bg-elevated-hover: #f1f3f5;
    
    --border-color: #dee2e6;
    --border-color-light: #ced4da;
    
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    
    --canvas-bg: #ffffff;
}

/* Accent Color Variants */
body.accent-blue {
    --accent-primary: #4299e1;
    --accent-primary-hover: #3182ce;
    --accent-secondary: #2c5282;
    --accent-gradient: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    --accent-alpha-15: rgba(66, 153, 225, 0.15);
    --accent-alpha-20: rgba(66, 153, 225, 0.20);
    --accent-alpha-25: rgba(66, 153, 225, 0.25);
    --accent-alpha-40: rgba(66, 153, 225, 0.40);
    --accent-alpha-60: rgba(66, 153, 225, 0.60);
    --accent-alpha-80: rgba(66, 153, 225, 0.80);
}

body.accent-green {
    --accent-primary: #10b981;
    --accent-primary-hover: #059669;
    --accent-secondary: #276749;
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --accent-alpha-15: rgba(16, 185, 129, 0.15);
    --accent-alpha-20: rgba(16, 185, 129, 0.20);
    --accent-alpha-25: rgba(16, 185, 129, 0.25);
    --accent-alpha-40: rgba(16, 185, 129, 0.40);
    --accent-alpha-60: rgba(16, 185, 129, 0.60);
    --accent-alpha-80: rgba(16, 185, 129, 0.80);
}

body.accent-amber {
    --accent-primary: #ed8936;
    --accent-primary-hover: #dd6b20;
    --accent-secondary: #c05621;
    --accent-gradient: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    --accent-alpha-15: rgba(237, 137, 54, 0.15);
    --accent-alpha-20: rgba(237, 137, 54, 0.20);
    --accent-alpha-25: rgba(237, 137, 54, 0.25);
    --accent-alpha-40: rgba(237, 137, 54, 0.40);
    --accent-alpha-60: rgba(237, 137, 54, 0.60);
    --accent-alpha-80: rgba(237, 137, 54, 0.80);
}

body.accent-purple {
    --accent-primary: #667eea;
    --accent-primary-hover: #5a67d8;
    --accent-secondary: #4c51bf;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-alpha-15: rgba(102, 126, 234, 0.15);
    --accent-alpha-20: rgba(102, 126, 234, 0.20);
    --accent-alpha-25: rgba(102, 126, 234, 0.25);
    --accent-alpha-40: rgba(102, 126, 234, 0.40);
    --accent-alpha-60: rgba(102, 126, 234, 0.60);
    --accent-alpha-80: rgba(102, 126, 234, 0.80);
}

body.accent-red {
    --accent-primary: #ef4444;
    --accent-primary-hover: #dc2626;
    --accent-secondary: #c53030;
    --accent-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --accent-alpha-15: rgba(239, 68, 68, 0.15);
    --accent-alpha-20: rgba(239, 68, 68, 0.20);
    --accent-alpha-25: rgba(239, 68, 68, 0.25);
    --accent-alpha-40: rgba(239, 68, 68, 0.40);
    --accent-alpha-60: rgba(239, 68, 68, 0.60);
    --accent-alpha-80: rgba(239, 68, 68, 0.80);
}

body.accent-teal {
    --accent-primary: #38b2ac;
    --accent-primary-hover: #319795;
    --accent-secondary: #285e61;
    --accent-gradient: linear-gradient(135deg, #38b2ac 0%, #319795 100%);
    --accent-alpha-15: rgba(56, 178, 172, 0.15);
    --accent-alpha-20: rgba(56, 178, 172, 0.20);
    --accent-alpha-25: rgba(56, 178, 172, 0.25);
    --accent-alpha-40: rgba(56, 178, 172, 0.40);
    --accent-alpha-60: rgba(56, 178, 172, 0.60);
    --accent-alpha-80: rgba(56, 178, 172, 0.80);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    user-select: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

.topbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
}

.logo-hex {
    font-size: 28px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.logo-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.breadcrumb {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb strong {
    color: var(--text-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Header Button Styles */
.header-btn {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-btn:hover {
    background: var(--bg-elevated-hover);
    border-color: var(--border-color-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Light mode button styling */
body.theme-light .header-btn {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.theme-light .header-btn:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.header-btn.saving {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.header-btn.saved {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.header-btn-icon {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-elevated);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-btn-icon:hover {
    background: var(--bg-elevated-hover);
    border-color: var(--border-color-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-btn-profile {
    padding: 4px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
}

.header-btn-profile:hover {
    border-color: var(--accent-primary);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.icon.spinning {
    animation: spin 1s linear infinite;
}

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

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    min-width: 240px;
    padding: 6px;
    display: none;
    animation: dropdown-appear 0.15s ease-out;
    z-index: 1000;
}

/* Light theme dropdown shadow */
body.theme-light .dropdown-menu {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.05);
}

.dropdown-menu.show {
    display: block;
}

@keyframes dropdown-appear {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
    font-size: 14px;
}

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

/* Make dropdown items more visible in light mode */
body.theme-light .dropdown-item:hover {
    background: var(--bg-elevated);
}

.dropdown-item .icon {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    background: var(--bg-elevated);
    margin: 6px 0;
}

.dropdown-user-info {
    padding: 12px;
    border-bottom: 1px solid var(--bg-elevated);
    margin-bottom: 6px;
}

.dropdown-user-info .name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.dropdown-user-info .email {
    font-size: 12px;
    color: var(--text-muted);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 20, 25, 0.85);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fade-in 0.2s ease-out;
}

body.theme-light .modal-overlay {
    background: rgba(255, 255, 255, 0.85);
}

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

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color-light);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    animation: modal-appear 0.3s ease-out;
}

body.theme-light .modal {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}


@keyframes modal-appear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.modal-title {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.modal-close:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

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

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

/* Settings Modal Content */
.settings-content {
    display: flex;
    gap: 24px;
}

.settings-sidebar {
    width: 150px;
    flex-shrink: 0;
}

.settings-nav-item {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.settings-nav-item:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.settings-nav-item.active {
    background: var(--accent-primary);
    color: white;
}

.settings-panel {
    flex: 1;
}

.setting-group {
    margin-bottom: 24px;
}

.setting-group h3 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    margin-bottom: 8px;
}

.setting-label {
    font-size: 13px;
    color: var(--text-primary);
}

.setting-description {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--bg-elevated);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-switch.active {
    background: var(--accent-primary);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.toggle-switch.active::after {
    transform: translateX(20px);
}

/* Theme Picker */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.theme-card {
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    background: var(--bg-tertiary);
    position: relative;
}

.theme-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.theme-card.active {
    border-color: var(--accent-primary);
    border-width: 3px;
    padding: 19px; /* Compensate for thicker border */
    background: var(--bg-elevated);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.theme-card.active::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.theme-preview {
    width: 100%;
    height: 60px;
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
}

.theme-preview.dark {
    background: linear-gradient(135deg, #1a1f26 0%, #0f1419 100%);
}

.theme-preview.light {
    background: linear-gradient(135deg, #ffffff 0%, #f1f3f5 100%);
}

.theme-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Keyboard Shortcuts */
.keyboard-shortcuts {
    display: grid;
    gap: 16px;
}

.shortcut-group h3 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.shortcut-action {
    font-size: 13px;
    color: var(--text-primary);
}

.shortcut-keys {
    display: flex;
    gap: 4px;
    align-items: center;
}

.key {
    padding: 4px 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--bg-elevated-hover);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    font-family: monospace;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-color);
}

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

.btn-primary {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background: var(--accent-primary-hover);
    border-color: var(--accent-primary-hover);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger-hover);
    border-color: var(--danger-hover);
}

.main {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.sidebar-left {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--bg-elevated);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.tool-section {
    padding: 20px;
    border-bottom: 1px solid var(--bg-elevated);
}

.tool-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* VIEW MODE TOGGLE */
.view-mode-section {
    padding: 20px;
    border-bottom: 1px solid var(--bg-elevated);
    background: var(--bg-tertiary);
}

.view-mode-toggle {
    display: inline-flex;
    background: var(--bg-elevated);
    border-radius: 8px;
    padding: 3px;
    width: 100%;
}

.view-mode-option {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.view-mode-option:hover {
    color: var(--text-primary);
}

.view-mode-option.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.view-mode-icon {
    width: 16px;
    height: 16px;
}

.view-mode-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* TOOLS GRID - 2x2 layout for 4 tools */
.mode-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.mode-btn {
    padding: 14px 10px;
    background: var(--bg-elevated);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
}

.mode-btn:hover {
    background: var(--bg-elevated-hover);
    transform: translateY(-1px);
    color: var(--text-primary);
}

.mode-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.mode-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.brush-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.brush-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.brush-control label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-elevated);
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: none;
}

.slider-value {
    min-width: 30px;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Visual Brush Size Selector */
.brush-size-visual {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    padding: 4px 0;
}

.brush-size-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 4px;
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.brush-size-option:hover {
    background: var(--bg-elevated-hover);
    border-color: var(--border-color-light);
    transform: translateY(-2px);
    color: var(--text-primary);
}

.brush-size-option.active {
    background: var(--accent-gradient);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-alpha-25);
    color: #ffffff;
}

.brush-size-preview {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brush-size-preview svg {
    width: 100%;
    height: 100%;
}

.brush-size-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

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

.terrain-btn {
    padding: 12px;
    background: var(--bg-elevated);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.terrain-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.terrain-btn.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.terrain-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.terrain-icon img {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.terrain-name {
    font-size: 11px;
    color: var(--text-primary);
    font-weight: 500;
}

.canvas-container {
    flex: 1;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

#hexCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.canvas-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(26, 31, 38, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--bg-elevated);
    font-size: 12px;
    color: var(--text-secondary);
    pointer-events: none;
}

.canvas-overlay strong {
    color: var(--text-primary);
}

.zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.zoom-btn:hover {
    background: var(--bg-elevated-hover);
    transform: scale(1.1);
    border-color: var(--border-color-light);
}

.zoom-level {
    font-size: 11px !important;
    font-weight: 600 !important;
}

.sidebar-right {
    width: 320px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--bg-elevated);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* MINIMAP */
.minimap-container {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--bg-elevated);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.minimap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px;
}

.minimap-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.minimap-stats {
    font-size: 10px;
    color: #4a5568;
    font-weight: 500;
}

.minimap-wrapper {
    position: relative;
    background: var(--bg-elevated);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Darker background for dark mode */
body:not(.theme-light) .minimap-wrapper {
    background: #0a0e13;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.minimap-canvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    width: 100%;
    height: 100%;
}

.minimap-viewport {
    position: absolute;
    border: 2px solid var(--accent-primary);
    background: var(--accent-alpha-15);
    cursor: move;
    pointer-events: all;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5),
                0 0 20px var(--accent-alpha-80),
                0 0 40px var(--accent-alpha-40),
                inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    transition: none;
    will-change: transform;
}

.minimap-viewport:hover {
    background: var(--accent-alpha-20);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5),
                0 0 24px var(--accent-primary),
                0 0 48px var(--accent-alpha-60),
                inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.minimap-viewport:active {
    background: var(--accent-alpha-25);

    cursor: grabbing;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5),
                0 0 28px rgba(102, 126, 234, 1),
                0 0 56px rgba(102, 126, 234, 0.7),
                inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.no-selection {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.no-selection-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.details-header {
    padding: 20px;
    border-bottom: 1px solid var(--bg-elevated);
}

.details-header h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.details-header .coords {
    font-size: 12px;
    color: var(--text-muted);
}

.details-content {
    padding: 20px;
    flex: 1;
}

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

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--bg-elevated-hover);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.form-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--bg-elevated-hover);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.details-actions {
    padding: 20px;
    border-top: 1px solid var(--bg-elevated);
    display: flex;
    gap: 8px;
}

/* ============================================================================
   MOBILE RESPONSIVE STYLES
   ============================================================================ */

@media (max-width: 768px) {
    /* Lock viewport - prevent browser scrolling */
    html, body {
        position: fixed;
        overflow: hidden;
        width: 100%;
        height: 100%;
        touch-action: none;
        overscroll-behavior: none;
        -webkit-overflow-scrolling: touch;
    }

    .app {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: hidden;
    }

    .main {
        touch-action: none;
        overscroll-behavior: none;
    }

    #hexCanvas {
        touch-action: none;
        overscroll-behavior: none;
    }

    /* Allow scrolling ONLY in these areas */
    .mobile-content {
        touch-action: pan-y;
        overscroll-behavior: contain;
    }

    .mobile-terrain-scroll {
        touch-action: pan-x;
        overscroll-behavior: contain;
    }

    /* Hide desktop sidebar */
    .sidebar-left {
        display: none;
    }

    /* Full width canvas */
    .canvas-container {
        width: 100%;
    }

    .sidebar-right {
        display: none;
    }

    /* Mobile Top Bar */
    .topbar {
        padding: 10px 16px;
    }

    .topbar-left {
        gap: 12px;
    }

    .logo {
        font-size: 16px;
    }

    .breadcrumb {
        font-size: 12px;
    }

    .topbar-right {
        gap: 8px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Mobile Canvas Overlay - Cleaner */
    .canvas-overlay {
        top: 12px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(26, 31, 38, 0.95);
        backdrop-filter: blur(20px);
        padding: 8px 16px;
        border-radius: 20px;
        border: 1px solid rgba(45, 55, 72, 0.5);
        font-size: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        width: auto;
        text-align: center;
    }

    .canvas-overlay #instructionText {
        display: none;
    }

    /* Mobile Zoom Controls - Repositioned */
    .zoom-controls {
        bottom: 200px;
        right: 16px;
        flex-direction: column;
        padding: 8px;
        gap: 8px;
    }

    .zoom-btn {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .zoom-level {
        font-size: 11px;
        padding: 8px 4px;
        min-width: 44px;
    }

    /* Mobile Bottom Sheet - IMPROVED */
    .mobile-bottom-sheet {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(26, 31, 38, 0.98);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(45, 55, 72, 0.5);
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
        z-index: 90;
        flex-direction: column;
        max-height: 70vh;
        transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
        will-change: transform;
    }

    .mobile-bottom-sheet.collapsed {
        transform: translateY(calc(100% - 52px));
    }

    .mobile-bottom-sheet.expanded {
        transform: translateY(0);
    }

    /* Sheet Handle - IMPROVED */
    .mobile-sheet-handle {
        width: 36px;
        height: 4px;
        background: rgba(160, 174, 192, 0.5);
        border-radius: 2px;
        margin: 10px auto 6px;
        cursor: grab;
        transition: all 0.2s;
        touch-action: none;
        position: relative;
    }

    .mobile-sheet-handle::after {
        content: '';
        position: absolute;
        top: -8px;
        left: -20px;
        right: -20px;
        bottom: -8px;
        /* Larger touch target */
    }

    .mobile-sheet-handle:active {
        cursor: grabbing;
        background: rgba(160, 174, 192, 0.8);
        transform: scaleX(1.3);
    }

    /* Drag overlay when sheet is being dragged */
    .mobile-sheet-dragging {
        transition: none !important;
    }

    /* Mobile Tabs - IMPROVED */
    .mobile-tabs {
        display: flex;
        padding: 0 16px 8px;
        gap: 4px;
        border-bottom: 1px solid rgba(45, 55, 72, 0.5);
        overflow-x: auto;
        scrollbar-width: none;
        position: relative;
        cursor: grab;
        user-select: none;
    }

    .mobile-tabs::before {
        content: '⌃';
        position: absolute;
        top: -20px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 16px;
        color: rgba(160, 174, 192, 0.4);
        transition: all 0.2s;
        pointer-events: none;
    }

    .mobile-bottom-sheet.collapsed .mobile-tabs::before {
        content: '⌃';
        animation: bounce 2s ease-in-out infinite;
    }

    .mobile-bottom-sheet.expanded .mobile-tabs::before {
        content: '⌄';
    }

    @keyframes bounce {
        0%, 100% { transform: translateX(-50%) translateY(0); }
        50% { transform: translateX(-50%) translateY(-4px); }
    }

    .mobile-tabs::-webkit-scrollbar {
        display: none;
    }

    .mobile-tab {
        padding: 14px 20px;
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        border-bottom: 3px solid transparent;
        white-space: nowrap;
        transition: all 0.2s;
    }

    .mobile-tab.active {
        color: var(--accent-primary);
        border-bottom-color: var(--accent-primary);
    }

    /* Mobile Content */
    .mobile-content {
        padding: 20px 16px;
        overflow-y: auto;
        flex: 1;
    }

    /* Mobile Tool Grid */
    .mobile-tool-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }

    .mobile-tool-card {
        aspect-ratio: 1;
        background: var(--bg-elevated);
        border: 2px solid transparent;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        cursor: pointer;
        transition: all 0.2s;
        padding: 10px;
        position: relative;
    }

    .mobile-tool-card:active {
        transform: scale(0.95);
        background: rgba(102, 126, 234, 0.3);
    }

    .mobile-tool-card.active {
        border-color: var(--accent-primary);
        background: rgba(102, 126, 234, 0.2);
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }

    .mobile-tool-card .mode-icon {
        width: 28px;
        height: 28px;
    }

    .mobile-tool-card .mode-icon svg {
        width: 100%;
        height: 100%;
        fill: var(--text-secondary);
    }

    .mobile-tool-card.active .mode-icon svg {
        fill: var(--accent-primary);
    }

    .mobile-tool-label {
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-secondary);
        text-align: center;
    }

    .mobile-tool-card.active .mobile-tool-label {
        color: var(--accent-primary);
    }

    /* Mobile Terrain Scroll */
    .mobile-terrain-scroll {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding: 4px 0 16px;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-terrain-scroll::-webkit-scrollbar {
        display: none;
    }

    .mobile-terrain-card {
        min-width: 85px;
        flex-shrink: 0;
        background: var(--bg-elevated);
        border: 2px solid transparent;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        cursor: pointer;
        scroll-snap-align: start;
        transition: all 0.2s;
        padding: 12px;
    }

    .mobile-terrain-card:active {
        transform: scale(0.95);
    }

    .mobile-terrain-card.active {
        border-color: var(--accent-primary);
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }

    .mobile-terrain-icon {
        width: 44px;
        height: 44px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 4px;
    }

    .mobile-terrain-icon img {
        width: 28px;
        height: 28px;
    }

    .mobile-terrain-name {
        font-size: 11px;
        font-weight: 600;
        color: var(--text-secondary);
        text-align: center;
    }

    .mobile-terrain-card.active .mobile-terrain-name {
        color: var(--accent-primary);
    }

    /* Mobile Brush Controls */
    .mobile-brush-control {
        background: rgba(45, 55, 72, 0.3);
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 12px;
    }

    .mobile-brush-label {
        font-size: 11px;
        font-weight: 600;
        color: var(--text-secondary);
        margin-bottom: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-slider-control {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mobile-slider-control .slider {
        flex: 1;
        height: 6px;
    }

    .mobile-slider-control .slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }

    .mobile-slider-control .slider-value {
        min-width: 36px;
        background: rgba(102, 126, 234, 0.2);
        padding: 4px 10px;
        border-radius: 6px;
        font-size: 14px;
    }

    /* Mobile Section Header */
    .mobile-section-header {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--accent-primary);
        margin-bottom: 14px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mobile-section-header::before {
        content: '';
        width: 3px;
        height: 14px;
        background: var(--accent-primary);
        border-radius: 2px;
    }

    /* Mobile Info Card */
    .mobile-info-card {
        background: rgba(102, 126, 234, 0.1);
        border: 1px solid rgba(102, 126, 234, 0.3);
        border-radius: 10px;
        padding: 12px;
        margin-top: 12px;
        font-size: 11px;
        line-height: 1.6;
        color: var(--text-secondary);
    }

    /* Hide desktop-only elements */
    .minimap-container {
        display: none;
    }

    /* Mobile Minimap - Floating */
    .mobile-minimap-float {
        position: fixed;
        bottom: 200px;
        left: 16px;
        width: 100px;
        height: 100px;
        background: rgba(26, 31, 38, 0.95);
        backdrop-filter: blur(20px);
        border-radius: 16px;
        border: 1px solid rgba(45, 55, 72, 0.5);
        overflow: hidden;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        z-index: 80;
        display: block;
        transition: all 0.2s;
    }

    .mobile-minimap-float:active {
        transform: scale(0.95);
    }

    .mobile-minimap-float canvas {
        width: 100%;
        height: 100%;
    }

    /* Context Menu */
    .context-menu {
        position: fixed;
        background: rgba(26, 31, 38, 0.98);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(45, 55, 72, 0.5);
        border-radius: 16px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
        z-index: 100;
        min-width: 200px;
        overflow: hidden;
        animation: contextMenuIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
        transform-origin: center;
    }

    @keyframes contextMenuIn {
        from {
            opacity: 0;
            transform: scale(0.8);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    .context-menu-item {
        padding: 14px 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        cursor: pointer;
        transition: background 0.15s;
        border-bottom: 1px solid rgba(45, 55, 72, 0.3);
        font-size: 14px;
        color: #e2e8f0;
    }

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

    .context-menu-item:active {
        background: rgba(102, 126, 234, 0.2);
    }

    .context-menu-item.danger {
        color: var(--danger);
    }

    .context-menu-item.danger:active {
        background: rgba(245, 101, 101, 0.2);
    }

    .context-menu-icon {
        font-size: 18px;
        width: 24px;
        text-align: center;
    }

    /* Fullscreen Minimap - IMPROVED ANIMATION */
    .minimap-fullscreen {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 13, 17, 0.95);
        backdrop-filter: blur(10px);
        z-index: 95;
        display: flex;
        flex-direction: column;
        animation: minimapGrowIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        transform-origin: 16px calc(100vh - 250px); /* Origin at small minimap position */
    }

    @keyframes minimapGrowIn {
        from {
            opacity: 0;
            transform: scale(0.08); /* Start at small minimap size (80px/1000px ≈ 0.08) */
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    .minimap-fullscreen.closing {
        animation: minimapShrinkOut 0.3s cubic-bezier(0.4, 0, 0.6, 1);
    }

    @keyframes minimapShrinkOut {
        from {
            opacity: 1;
            transform: scale(1);
        }
        to {
            opacity: 0;
            transform: scale(0.08);
        }
    }

    .minimap-fullscreen-header {
        padding: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid rgba(45, 55, 72, 0.5);
    }

    .minimap-fullscreen-header h3 {
        font-size: 18px;
        font-weight: 600;
        color: #e2e8f0;
    }

    .minimap-fullscreen-close {
        width: 36px;
        height: 36px;
        background: rgba(45, 55, 72, 0.5);
        border: none;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        font-size: 20px;
        cursor: pointer;
    }

    .minimap-fullscreen-close:active {
        background: rgba(102, 126, 234, 0.3);
        color: var(--accent-primary);
    }

    .minimap-fullscreen-canvas {
        flex: 1;
        position: relative;
        margin: 16px;
        border-radius: 12px;
        overflow: hidden;
        background: #0a0d11;
        border: 2px solid rgba(102, 126, 234, 0.3);
        box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
    }

    .minimap-fullscreen-canvas canvas {
        width: 100%;
        height: 100%;
        cursor: pointer;
        image-rendering: pixelated; /* Sharper hexes */
    }

    .minimap-viewport-box {
        position: absolute;
        border: 3px solid var(--accent-primary);
        background: rgba(102, 126, 234, 0.2);
        pointer-events: none;
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.8),
                    inset 0 0 20px rgba(102, 126, 234, 0.4);
        border-radius: 4px;
        animation: pulseViewport 2s ease-in-out infinite;
    }

    @keyframes pulseViewport {
        0%, 100% {
            box-shadow: 0 0 30px rgba(102, 126, 234, 0.8),
                        inset 0 0 20px rgba(102, 126, 234, 0.4);
        }
        50% {
            box-shadow: 0 0 40px rgba(102, 126, 234, 1),
                        inset 0 0 30px rgba(102, 126, 234, 0.6);
        }
    }

    .minimap-fullscreen-actions {
        padding: 16px;
        display: flex;
        gap: 12px;
        border-top: 1px solid rgba(45, 55, 72, 0.5);
    }

    .minimap-action-btn {
        flex: 1;
        padding: 14px;
        background: rgba(45, 55, 72, 0.5);
        border: 1px solid rgba(45, 55, 72, 0.8);
        border-radius: 10px;
        color: #e2e8f0;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: all 0.2s;
    }

    .minimap-action-btn:active {
        background: rgba(102, 126, 234, 0.3);
        color: var(--accent-primary);
        transform: scale(0.95);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .mode-btn,
    .terrain-btn {
        min-height: 44px;
    }

    /* Remove hover effects on touch devices */
    .btn:hover,
    .mode-btn:hover,
    .terrain-btn:hover {
        transform: none;
    }

    /* Add active states for touch feedback */
    .btn:active,
    .mode-btn:active,
    .terrain-btn:active {
        transform: scale(0.95);
    }
}
/* Example Maps Grid */
.example-maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.example-map-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--bg-elevated);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.example-map-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.example-map-preview {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.example-map-info {
    padding: 16px;
}

.example-map-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.example-map-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}
/* ========================================
   MODERN PATH CONTROLS
   ======================================== */

.path-type-selector,
.path-style-selector,
.path-properties {
    margin-bottom: 16px;
}

.section-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Path Type Grid */
.path-type-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.path-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: #2d3748;
    border: 2px solid #3d4758;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.path-type-btn:hover {
    background: #374151;
    border-color: #4b5563;
    transform: translateY(-2px);
}

.path-type-btn.active {
    background: var(--accent-gradient);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-alpha-25);
}

.path-type-btn.active .path-type-icon {
    color: #ffffff;
}

.path-type-icon {
    width: 32px;
    height: 32px;
    color: #9ca3af;
    transition: color 0.2s ease;
}

.path-type-btn:hover .path-type-icon {
    color: #d1d5db;
}

.path-type-label {
    font-size: 11px;
    color: #d1d5db;
    font-weight: 500;
}

.path-type-btn.active .path-type-label {
    color: #ffffff;
}

/* Path Style Grid */
.path-style-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.path-style-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #2d3748;
    border: 2px solid #3d4758;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.path-style-btn:hover {
    background: #374151;
    border-color: #4b5563;
}

.path-style-btn.active {
    background: var(--accent-gradient);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-alpha-25);
}

.path-style-preview {
    width: 60px;
    height: 30px;
    flex-shrink: 0;
}

.path-style-btn span {
    font-size: 13px;
    color: #d1d5db;
    font-weight: 500;
}

.path-style-btn.active span {
    color: #ffffff;
}

/* Divider */
.divider {
    height: 1px;
    background: #3d4758;
    margin: 16px 0;
}

/* Control Rows */
.control-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.control-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.control-icon {
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.control-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #3d4758;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    background: #60a5fa;
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3b82f6;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
    background: #60a5fa;
    transform: scale(1.1);
}

.slider-value {
    min-width: 24px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #d1d5db;
}

/* Color Picker Group */
.color-picker-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-input {
    width: 50px;
    height: 32px;
    border: 2px solid #3d4758;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.color-input:hover {
    border-color: #4b5563;
}

.btn-icon-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: #2d3748;
    border: 1px solid #3d4758;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon-small:hover {
    background: #374151;
    border-color: #4b5563;
}

.btn-icon-small svg {
    width: 16px;
    height: 16px;
    fill: #9ca3af;
}

.btn-icon-small:hover svg {
    fill: #d1d5db;
}

/* Quick Actions */
.path-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Tool Help */
.tool-help {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 8px;
    padding: 12px;
}

.tool-help-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 8px;
}

.tool-help-title .icon {
    width: 14px;
    height: 14px;
    color: #6b7280;
}

.tool-help-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.6;
}

.tool-help-list li {
    padding-left: 16px;
    position: relative;
    margin-bottom: 4px;
}

.tool-help-list li:before {
    content: "•";
    position: absolute;
    left: 4px;
    color: #6b7280;
}

.tool-help-list kbd {
    display: inline-block;
    padding: 2px 6px;
    background: #374151;
    border: 1px solid #4b5563;
    border-radius: 3px;
    font-size: 10px;
    font-family: monospace;
    color: #d1d5db;
    margin: 0 2px;
}

/* ========================================
   TOOLTIP SYSTEM
   ======================================== */

#tooltip-container {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
}

.tooltip {
    position: fixed;
    background: var(--accent-gradient, linear-gradient(135deg, #1e40af 0%, #3b82f6 100%));
    color: #ffffff;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    max-width: 320px;
    min-width: 280px;
    pointer-events: auto;
    animation: tooltipFadeIn 0.3s ease-out;
    z-index: 10001;
}

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

.tooltip-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tooltip-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    flex: 1;
}

.tooltip-icon {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.tooltip-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

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

.tooltip-close svg {
    width: 14px;
    height: 14px;
    fill: #ffffff;
}

.tooltip-content {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 12px;
}

.tooltip-content p {
    margin: 0 0 8px 0;
}

.tooltip-content p:last-child {
    margin-bottom: 0;
}

.tooltip-content strong {
    color: #ffffff;
    font-weight: 600;
}

.tooltip-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.tooltip-list li {
    padding-left: 20px;
    position: relative;
    margin-bottom: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.tooltip-list li:last-child {
    margin-bottom: 0;
}

.tooltip-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.7);
    font-weight: bold;
}

.tooltip-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.tooltip-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.tooltip-badge svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.tooltip-action {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tooltip-action:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Tooltip Arrow */
.tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.tooltip-arrow.top {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 8px 8px 8px;
    border-color: transparent transparent var(--accent-primary, #3b82f6) transparent;
}

.tooltip-arrow.bottom {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-color: var(--accent-primary, #3b82f6) transparent transparent transparent;
}

.tooltip-arrow.left {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 8px 8px 0;
    border-color: transparent var(--accent-primary, #3b82f6) transparent transparent;
}

.tooltip-arrow.right {
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 8px;
    border-color: transparent transparent transparent var(--accent-primary, #3b82f6);
}

/* Tooltip Highlight Pulse */
@keyframes tooltipPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
    }
}

.tooltip-highlight {
    animation: tooltipPulse 2s infinite;
    position: relative;
    z-index: 9999;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tooltip {
        max-width: 280px;
        min-width: 240px;
        padding: 14px 16px;
    }
    
    .tooltip-title {
        font-size: 14px;
    }
    
    .tooltip-content {
        font-size: 12px;
    }
}
/* ============================================================================
   MOBILE INTEGRATION ENHANCEMENTS
   ============================================================================ */

/* Canvas full-screen optimization for mobile */
@media (max-width: 768px) {
    .canvas-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 1 !important;
    }
    
    #canvas {
        touch-action: none;
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Prevent text selection and callouts on mobile */
.is-mobile * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Allow text selection in modals and input fields */
.is-mobile input,
.is-mobile textarea,
.is-mobile .modal-body,
.is-mobile .sheet-content {
    -webkit-user-select: text;
    user-select: text;
}

/* Smooth scrolling for mobile */
.is-mobile {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Hide scrollbars on mobile for cleaner look */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
    
    ::-webkit-scrollbar-track {
        background: transparent;
    }
    
    ::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 2px;
    }
}

/* ============================================================================
   WELCOME TUTORIAL MODAL
   ============================================================================ */

.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.welcome-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.welcome-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.welcome-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

/* Progress Bar */
.welcome-progress {
    height: 4px;
    background: var(--bg-tertiary);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.welcome-progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    width: 0%;
    box-shadow: 0 0 20px var(--accent-alpha-60);
}

/* Step Content */
.welcome-step-content {
    flex: 1;
    padding: 32px 32px;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.welcome-step {
    display: none;
    animation: fadeInSlide 0.4s ease-out;
}

.welcome-step.active {
    display: block;
}

.welcome-step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-alpha-15);
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    border: 2px solid var(--accent-alpha-40);
}

.welcome-step-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.welcome-step-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.5;
}

.welcome-step-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* Feature Grid */
.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.welcome-feature {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s ease;
}

.welcome-feature:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.welcome-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-alpha-15);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 24px;
}

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

.welcome-feature-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Tips List */
.welcome-tips {
    list-style: none;
    padding: 0;
    margin: 24px 0;
}

/* Choice Cards (for map selection) */
.welcome-choices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.welcome-choice-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.welcome-choice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.welcome-choice-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    background: var(--bg-elevated);
}

.welcome-choice-card:hover::before {
    opacity: 1;
}

.welcome-choice-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--accent-alpha-15);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 32px;
    transition: all 0.3s ease;
}

.welcome-choice-card:hover .welcome-choice-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--accent-alpha-25);
}

.welcome-choice-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
}

.welcome-choice-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.welcome-choice-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.welcome-choice-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.welcome-choice-features li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 4px;
}

.welcome-choice-features li::before {
    content: '✓';
    color: var(--accent-primary);
    font-weight: 600;
    margin-right: 8px;
}

.welcome-choice-btn {
    width: 100%;
    padding: 14px 24px;
    border-radius: 10px;
    border: 2px solid var(--accent-primary);
    background: var(--accent-alpha-15);
    color: var(--accent-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto;
}

.welcome-choice-btn:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--accent-alpha-60);
}

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

.welcome-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.welcome-tip:hover {
    border-color: var(--accent-alpha-40);
    background: var(--bg-elevated);
}

.welcome-tip-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
}

.welcome-tip-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Keyboard Shortcuts */
.welcome-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin: 24px 0;
}

.welcome-shortcut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.welcome-shortcut-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.welcome-shortcut-keys {
    display: flex;
    gap: 4px;
}

.welcome-key {
    padding: 4px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: monospace;
}

/* Hero Image/Video Container */
.welcome-hero {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    margin: 24px 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.welcome-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-hero-icon {
    font-size: 80px;
    color: var(--accent-primary);
    opacity: 0.5;
}

/* Footer */
.welcome-footer {
    padding: 24px 40px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-primary);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.welcome-nav {
    display: flex;
    gap: 12px;
}

.welcome-btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.welcome-btn-skip {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.welcome-btn-skip:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.welcome-btn-back {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.welcome-btn-back:hover {
    background: var(--bg-elevated-hover);
}

.welcome-btn-next,
.welcome-btn-start {
    background: var(--accent-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px var(--accent-alpha-40);
}

.welcome-btn-next:hover,
.welcome-btn-start:hover {
    background: var(--accent-primary-hover);
    box-shadow: 0 6px 16px var(--accent-alpha-60);
    transform: translateY(-1px);
}

.welcome-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .welcome-container {
        width: 95%;
        max-height: 90vh;
    }
    
    .welcome-step-content {
        padding: 32px 24px;
    }
    
    .welcome-step-title {
        font-size: 24px;
    }
    
    .welcome-step-subtitle {
        font-size: 16px;
    }
    
    .welcome-features {
        grid-template-columns: 1fr;
    }
    
    .welcome-footer {
        padding: 16px 24px;
        flex-direction: column;
        gap: 12px;
    }
    
    .welcome-nav {
        width: 100%;
        justify-content: space-between;
    }
    
    .welcome-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .welcome-shortcuts {
        grid-template-columns: 1fr;
    }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
    .welcome-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
}
/* Scroll indicator for welcome modal */
.welcome-step-content::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, var(--bg-secondary), transparent);
    pointer-events: none;
    display: block;
    margin: -40px -32px 0;
}

/* Better scrollbar for welcome modal */
.welcome-step-content::-webkit-scrollbar {
    width: 8px;
}

.welcome-step-content::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.welcome-step-content::-webkit-scrollbar-thumb {
    background: var(--accent-alpha-40);
    border-radius: 4px;
}

.welcome-step-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-alpha-60);
}