* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    overflow: hidden;
}

/* App Layout */
.app-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

/* Mobile Header */
.mobile-header {
    display: none;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.mobile-header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.mobile-header .description {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Tools Panel */
.tools-panel {
    width: 400px;
    background: white;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
}

.panel-header h2 {
    font-size: 1.3rem;
}

.close-panel {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close-panel:hover {
    background-color: rgba(255,255,255,0.2);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Map Container */
.map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

.toggle-panel {
    display: none;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Cards */
.card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

/* Drop Area */
.drop-area {
    border: 2px dashed #3498db;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    background-color: #ecf0f1;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.drop-area.highlight {
    background-color: #d6eaf8;
    border-color: #2980b9;
}

.drop-area i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 10px;
}

.drop-area p {
    margin: 10px 0;
    font-size: 0.9rem;
    color: #666;
}

.image-preview {
    display: none;
    max-width: 100%;
    max-height: 200px;
    margin: 15px auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Coordinates */
.coordinates-container h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.1rem;
}

.coord-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: #7f8c8d;
    font-weight: 500;
}

.input-group input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Search */
.search-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.search-container input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
}

.search-wrapper {
    position: relative;
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.btn-success {
    background-color: #2ecc71;
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
    transform: translateY(-1px);
}

.btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
}

.action-buttons .btn {
    flex: 1;
}

/* Status Messages */
.status-message {
    padding: 12px;
    margin-top: 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    display: none;
}

.status-success {
    background-color: #d5f4e6;
    color: #27ae60;
    border: 1px solid #2ecc71;
}

.status-error {
    background-color: #fadbd8;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.status-info {
    background-color: #d6eaf8;
    color: #3498db;
    border: 1px solid #3498db;
}

/* Suggestions */
.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.suggestion-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* GPS Status */
.gps-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    display: none;
}

.gps-found {
    background-color: #d5f4e6;
    color: #27ae60;
    border: 1px solid #2ecc71;
}

.gps-not-found {
    background-color: #fef9e7;
    color: #f39c12;
    border: 1px solid #f1c40f;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }

    .mobile-header {
        display: block;
        flex-shrink: 0;
    }

    .tools-panel {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: translateX(-100%);
        border-right: none;
        z-index: 2000;
    }

    .tools-panel.active {
        transform: translateX(0);
    }

    .panel-header {
        padding: 15px;
    }

    .panel-content {
        padding: 15px;
        gap: 15px;
    }

    .close-panel {
        display: block;
    }

    .toggle-panel {
        display: flex;
    }

    .card {
        padding: 15px;
    }

    .drop-area {
        padding: 20px 15px;
    }

    .coord-inputs {
        gap: 12px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        padding: 14px 20px;
    }
}

/* Desktop Styles */
@media (min-width: 769px) {
    .app-layout {
        flex-direction: row;
    }

    .tools-panel {
        display: flex !important;
        transform: translateX(0) !important;
    }

    .map-container {
        flex: 1;
    }
}

/* Scrollbar Styling */
.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}