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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.2);
}

body {
    font-family: 'Segoe UI', 'Cairo', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Navigation Header Bar */
.navigation-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary-gradient);
    color: white;
    padding: 16px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navigation-header:not(.hidden) {
    transform: translateY(0);
}

.navigation-header.hidden {
    transform: translateY(-100%);
}

.nav-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-header-icon {
    font-size: 36px;
    animation: headerIconBounce 2s infinite;
}

@keyframes headerIconBounce {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(10deg); }
}

.nav-header-info {
    flex: 1;
}

.nav-header-instruction {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-header-distance {
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: distancePulse 1.5s infinite;
}

@keyframes distancePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.nav-header-stats {
    display: flex;
    gap: 24px;
}

.nav-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-label {
    font-size: 11px;
    opacity: 0.9;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Adjust map container when header is visible */
body:has(.navigation-header:not(.hidden)) #map {
    margin-top: 88px;
    height: calc(100vh - 88px);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-header-content {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .nav-header-icon {
        font-size: 28px;
    }
    
    .nav-header-instruction {
        font-size: 16px;
    }
    
    .nav-header-distance {
        font-size: 24px;
    }
    
    .nav-header-stats {
        width: 100%;
        justify-content: space-around;
        gap: 8px;
    }
}

/* Save Location Modal */
.save-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.save-modal:not(.hidden) {
    opacity: 1;
    pointer-events: all;
}

.save-modal-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.save-modal:not(.hidden) .save-modal-content {
    transform: scale(1);
}

.save-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 2px solid #f0f0f0;
    background: var(--primary-gradient);
    color: white;
    border-radius: 20px 20px 0 0;
}

.save-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

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

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.save-modal-body {
    padding: 24px;
}

.save-input-group {
    margin-bottom: 20px;
}

.save-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.save-input,
.save-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Segoe UI', 'Cairo', Tahoma, sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.save-input:focus,
.save-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.save-textarea {
    min-height: 80px;
    resize: vertical;
}

.add-category-btn {
    padding: 12px 20px;
    background: var(--success-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.add-category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

.save-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.confirm-save-btn,
.cancel-save-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-save-btn {
    background: var(--primary-gradient);
    color: white;
}

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

.cancel-save-btn {
    background: #f5f5f5;
    color: #666;
}

.cancel-save-btn:hover {
    background: #e0e0e0;
}

@media (max-width: 600px) {
    .save-modal-content {
        width: 95%;
        border-radius: 16px;
    }
    
    .save-modal-header {
        padding: 16px 20px;
    }
    
    .save-modal-body {
        padding: 20px;
    }
    
    .save-modal-actions {
        flex-direction: column;
    }
}

/* User Account Button */
.user-account-btn {
    position: fixed;
    top: 80px;
    left: 20px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 1500;
}

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

.user-account-btn #userIcon {
    font-size: 20px;
}

/* Offline Mode Button */
.offline-mode-btn {
    position: fixed;
    top: 210px;
    left: 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    transition: all 0.3s ease;
    z-index: 1500;
}

.offline-mode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.offline-mode-btn.offline {
    background: linear-gradient(135deg, #F44336 0%, #d32f2f 100%);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
    animation: offline-pulse 2s infinite;
}

@keyframes offline-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.offline-mode-btn #offlineIcon {
    font-size: 20px;
}

/* Profile Sections */
.profile-info {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
    margin-bottom: 24px;
}

.profile-info h4 {
    margin: 0 0 8px 0;
    font-size: 24px;
}

.profile-info p {
    margin: 0;
    opacity: 0.9;
}

.profile-section {
    margin-bottom: 24px;
}

.profile-section h4 {
    margin-bottom: 16px;
    color: #333;
    font-size: 18px;
}

.saved-locations-list {
    max-height: 400px;
    overflow-y: auto;
}

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

.category-header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 12px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-item {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.location-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    transform: translateX(-4px);
}

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

.location-name {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.location-coords {
    font-size: 12px;
    color: #999;
}

.location-notes {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

.location-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.location-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-btn {
    background: var(--primary-gradient);
    color: white;
}

.view-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.share-btn {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
}

.share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
}

.delete-btn {
    background: #f44336;
    color: white;
}

.delete-btn:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

.empty-locations {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-locations-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

[dir="rtl"] .user-account-btn {
    right: auto;
    left: 20px;
}

@media (max-width: 768px) {
    .user-account-btn {
        top: 10px;
        right: 10px;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    [dir="rtl"] .user-account-btn {
        right: auto;
        left: 10px;
    }
}

.container {
    max-width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header h1 {
    color: #333;
    font-size: 24px;
    margin-bottom: 5px;
}

.header p {
    color: #666;
    font-size: 14px;
}

/* Search Container */
.search-container {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #667eea;
}

.search-btn, .location-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.location-btn {
    background: #4CAF50;
    color: white;
    padding: 12px 20px;
}

.location-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* Navigation Panel - Glassmorphism Style */
.navigation-panel {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 380px;
    max-height: 85vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 1002;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[dir="rtl"] .navigation-panel {
    right: auto;
    left: 20px;
}

.navigation-panel.hidden {
    display: none;
}

.nav-header {
    background: var(--primary-gradient);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.nav-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.close-nav-btn {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.close-nav-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: rotate(90deg) scale(1.1);
}

.nav-content {
    padding: 20px;
    max-height: calc(80vh - 70px);
    overflow-y: auto;
}

.nav-input-group {
    margin-bottom: 15px;
}

.nav-input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.nav-input-group {
    position: relative;
}

.nav-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-input:focus {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2), 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

/* Suggestions List */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.suggestions-list.hidden {
    display: none;
}

.suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

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

.suggestion-item:hover {
    background: #f5f5f5;
}

.suggestion-item.active {
    background: #e3f2fd;
}

.suggestion-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    margin-bottom: 2px;
}

.suggestion-address {
    font-size: 12px;
    color: #666;
}

.no-suggestions {
    padding: 10px 12px;
    color: #999;
    font-size: 13px;
    text-align: center;
}

.use-location-btn {
    position: absolute;
    right: 5px;
    top: 32px;
    background: #4CAF50;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

[dir="rtl"] .use-location-btn {
    right: auto;
    left: 5px;
}

.use-location-btn:hover {
    background: #45a049;
}

.nav-options {
    margin-bottom: 15px;
}

.nav-options label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.nav-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    background: white;
    cursor: pointer;
}

.get-directions-btn,
.clear-route-btn,
.start-navigation-btn,
.stop-navigation-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 10px;
}

.get-directions-btn {
    background: var(--primary-gradient);
    color: white;
    position: relative;
    overflow: hidden;
}

.get-directions-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.get-directions-btn:hover::before {
    width: 300px;
    height: 300px;
}

.get-directions-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.start-navigation-btn {
    background: var(--success-gradient);
    color: white;
    animation: pulse 2s infinite;
    position: relative;
    overflow: hidden;
}

.start-navigation-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.start-navigation-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(79, 172, 254, 0.4);
}

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

.stop-navigation-btn {
    background: #FF9800;
    color: white;
}

.stop-navigation-btn:hover {
    background: #F57C00;
}

.clear-route-btn {
    background: #f44336;
    color: white;
}

.clear-route-btn:hover {
    background: #d32f2f;
}

.route-info {
    margin-top: 15px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.route-info.hidden {
    display: none;
}

.route-summary {
    margin-bottom: 15px;
}

.route-summary p {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
}

.route-steps {
    max-height: 200px;
    overflow-y: auto;
}

.route-step {
    padding: 8px;
    margin-bottom: 5px;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
}

/* Navigation Info - Modern Card Style */
.navigation-info {
    background: var(--primary-gradient);
    color: white;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.navigation-info::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.navigation-info.hidden {
    display: none;
}

.current-instruction {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.instruction-icon {
    font-size: 48px;
    animation: bounce 1s infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

@keyframes bounce {
    0%, 100% { transform: translateX(0) scale(1); }
    50% { transform: translateX(10px) scale(1.1); }
}

.instruction-text {
    font-size: 20px;
    font-weight: 700;
    flex: 1;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.next-instruction {
    padding: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 12px;
}

.distance-to-turn {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

/* Current location marker pulse */
.location-marker {
    animation: locationPulse 2s infinite;
}

@keyframes locationPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* Navigation Toggle Button - Floating Action Button */
.nav-toggle-btn {
    position: fixed;
    top: 150px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-toggle-btn:hover {
    transform: scale(1.15) rotate(90deg);
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.5);
}

.nav-toggle-btn:active {
    transform: scale(0.95);
}

/* Map Type Toggle Button - Modern Floating Style */
.map-type-toggle {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

[dir="rtl"] .map-type-toggle {
    left: auto;
    right: 20px;
}

.map-type-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #333;
}

.map-type-btn:hover {
    background: white;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px) scale(1.02);
}

#mapTypeIcon {
    font-size: 18px;
}

#mapTypeText {
    font-size: 14px;
}

.map-type-menu {
    position: absolute;
    bottom: 55px;
    left: 0;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    min-width: 150px;
}

[dir="rtl"] .map-type-menu {
    left: auto;
    right: 0;
}

.map-type-menu.hidden {
    display: none;
}

.map-type-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: none;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
    text-align: right;
}

[dir="rtl"] .map-type-option {
    text-align: right;
}

.map-type-option:last-child {
    border-bottom: none;
}

.map-type-option:hover {
    background: #f5f5f5;
}

.map-type-option.active {
    background: #e3f2fd;
    color: #1976d2;
}

.type-icon {
    font-size: 20px;
}

.type-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.map-type-option.active .type-label {
    color: #1976d2;
    font-weight: bold;
}

/* Map Container */
#map {
    flex: 1;
    width: 100%;
    z-index: 1;
}

/* Info Panel */
.info-panel {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    max-width: 300px;
    z-index: 1001;
    transition: all 0.3s;
}

.info-panel.hidden {
    display: none;
}

.close-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.close-btn:hover {
    background: #cc0000;
}

#infoTitle {
    margin-top: 20px;
    color: #333;
    font-size: 18px;
}

#infoCoords {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

#infoDetails {
    margin-top: 15px;
    color: #555;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    text-align: center;
    font-size: 12px;
    color: #666;
    z-index: 1000;
}

.footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

.footer a:hover {
    text-decoration: underline;
}

/* Leaflet Custom Styles */
.leaflet-popup-content-wrapper {
    border-radius: 15px;
    padding: 10px;
}

.leaflet-popup-content {
    margin: 15px;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 20px;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .controls {
        flex-wrap: wrap;
    }
    
    .info-panel {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* RTL Support */
[dir="rtl"] .info-panel {
    right: auto;
    left: 20px;
}

[dir="rtl"] .close-btn {
    left: auto;
    right: 10px;
}

/* Offline Cache Modal Styles */
.offline-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.info-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
}

.info-icon {
    font-size: 36px;
    line-height: 1;
}

.info-content h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.info-value {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.offline-description {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.offline-description h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 16px;
}

.offline-description ul {
    margin: 0;
    padding: 0 0 0 24px;
    color: #666;
}

.offline-description li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.offline-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.primary-btn {
    background: var(--primary-gradient);
    color: white;
}

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

.danger-btn {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
}

.danger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
}

@media (max-width: 768px) {
    .offline-info {
        grid-template-columns: 1fr;
    }
    
    .offline-actions {
        flex-direction: column;
    }
    
    .user-account-btn,
    .offline-mode-btn,
    .nav-toggle-btn {
        left: 10px;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .user-account-btn {
        top: 70px;
    }
    
    .nav-toggle-btn {
        top: 140px;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .offline-mode-btn {
        top: 200px;
    }
}
