@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&display=swap');

:root {
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --accent-primary: #2563eb;
    --accent-hover: #1d4ed8;
    --success-color: #16a34a;
    --success-hover: #15803d;
    --header-bg: rgba(255, 255, 255, 0.9);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

header {
    background: var(--header-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 5%;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

main {
    max-width: 800px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.card p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* File Input */
input[type="file"] {
    display: block;
    width: 100%;
    padding: 1rem;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="file"]:hover {
    border-color: var(--accent-primary);
    background: #eff6ff;
}

input[type="file"]::-webkit-file-upload-button {
    background: #e5e7eb;
    color: var(--text-primary);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 1rem;
    font-family: inherit;
    font-weight: 500;
    transition: background 0.2s ease;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background: #d1d5db;
}

.file-info {
    font-size: 0.95rem;
    color: var(--text-secondary) !important;
    margin-top: 0.75rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary);
}

select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn.primary {
    background: var(--accent-primary);
    color: #fff;
}

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

.btn.success {
    background: var(--success-color);
    color: #fff;
}

.btn.success:not(:disabled):hover {
    background: var(--success-hover);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Map area */
#map-info {
    font-size: 0.9rem;
}

#map {
    height: 400px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    background: #e5e7eb;
    z-index: 10;
}

.actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

#result-status {
    font-weight: 500;
    color: var(--text-primary) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}