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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    min-height: 100vh;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    color: #4a5568;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.input-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.input-section h2 {
    margin-bottom: 15px;
    color: #4a5568;
}

.info-box {
    background: #e6fffa;
    border: 1px solid #81e6d9;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #234e52;
}

.info-box strong {
    color: #1a202c;
}

#addressInput {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

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

.button-container {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

#processBtn:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#clearBtn {
    background: #e53e3e;
    color: white;
}

#clearBtn:hover {
    background: #c53030;
    transform: translateY(-2px);
}

.status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.status.loading {
    background: #bee3f8;
    color: #2b6cb0;
    display: block;
}

.status.success {
    background: #c6f6d5;
    color: #22543d;
    display: block;
}

.status.error {
    background: #fed7d7;
    color: #c53030;
    display: block;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

.map-section, .results-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.map-section h2, .results-section h2 {
    margin-bottom: 20px;
    color: #4a5568;
}

#map {
    height: 400px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}

.table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    background: #f7fafc;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
}

td {
    padding: 12px 8px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

tr:hover {
    background: #f7fafc;
}

.no-data td {
    text-align: center;
    color: #718096;
    font-style: italic;
    padding: 30px;
}

.address-cell {
    max-width: 250px;
    word-wrap: break-word;
}

.area-found {
    font-weight: 500;
    color: #2d3748;
}

.clickable-area {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-decoration: underline;
    text-decoration-style: dotted;
    color: #667eea;
}

.clickable-area:hover {
    background-color: #e6fffa;
    color: #234e52;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-style: solid;
}

.clickable-area::after {
    content: " 🗺️";
    font-size: 12px;
    opacity: 0.7;
}

.population {
    font-weight: 600;
    color: #2d3748;
}

.na-value {
    color: #a0aec0;
    font-style: italic;
}



/* Loading animation */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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