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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.header .logo {
    height: 75px;
    width: 150px;
    margin-bottom: 10px;
    object-fit: contain;
}

.header p {
    font-size: 1.1rem;
    color: #d1d5db;
}

.main-content {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.map-container {
    flex: 1;
    min-height: 500px;
}

.map {
    width: 100%;
    height: 500px;
    border: 2px solid #444;
    border-radius: 8px;
    background-color: #2d2d2d;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.controls {
    flex: 0 0 350px;
    height: 500px;
    background-color: #2d2d2d;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.section {
    margin-bottom: 12px;
}

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

.status {
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 0.9rem;
}

.status.info {
    background-color: #1e3a8a;
    color: #93c5fd;
    border: 1px solid #3b82f6;
}

.status.success {
    background-color: #166534;
    color: #86efac;
    border: 1px solid #22c55e;
}

.status.error {
    background-color: #991b1b;
    color: #fca5a5;
    border: 1px solid #ef4444;
}

.btn {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 6px;
}

.btn:last-child {
    margin-bottom: 0;
}

.btn {
    background-color: #2196f3;
    color: white;
}

.btn:hover {
    background-color: #1976d2;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-navigation {
    background-color: #28a745;
    color: white;
}

.btn-navigation:hover {
    background-color: #218838;
}

.input-group {
    margin-bottom: 10px;
}

.input-group label {
    display: block;
    margin-bottom: 3px;
    font-weight: 500;
    color: #d1d5db;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 8px;
    background-color: #374151;
    border: 2px solid #4b5563;
    color: #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #3b82f6;
}

.coordinate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.share-url {
    background-color: #374151;
    border: 2px solid #4b5563;
    color: #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.9rem;
    margin-top: 10px;
}

.location-info {
    background-color: #374151;
    border: 2px solid #4b5563;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
}

.location-info h3 {
    margin-bottom: 10px;
    color: #f3f4f6;
}

.location-info p {
    margin-bottom: 5px;
}

.hidden {
    display: none !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .controls {
        flex: none;
        height: auto;
        min-height: 400px;
    }
    
    .map {
        height: 400px;
    }
}

/* Leaflet map styling */
.leaflet-container {
    height: 100%;
    border-radius: 6px;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        margin-bottom: 20px;
    }
    
    .header .logo {
        height: 56px;
        width: 112px;
    }
    
    .controls {
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .map {
        height: 350px;
        min-height: 350px;
    }
    
    .map-container {
        min-height: 350px;
    }
    
    /* Improve touch targets on mobile */
    .btn {
        padding: 12px;
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .input-group input {
        padding: 12px;
        font-size: 1rem;
    }
    
    /* Prevent zoom on input focus on iOS */
    .input-group input {
        font-size: 16px;
    }
}

/* Prevent body scroll when interacting with map on mobile */
.leaflet-container {
    touch-action: pan-x pan-y;
}

/* Improve scrollbar styling for controls */
.controls::-webkit-scrollbar {
    width: 6px;
}

.controls::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 3px;
}

.controls::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.controls::-webkit-scrollbar-thumb:hover {
    background: #666;
}
