:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --background-color: #f5f6fa;
    --border-color: #dcdde1;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --text-color: #2c3e50;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2.2rem;
}

#propertyForm {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

input, select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

input::placeholder {
    color: #95a5a6;
}

select {
    background-color: white;
    cursor: pointer;
}

/* Map container */
#map {
    width: 100%;
    height: 400px;
    border-radius: 5px;
    margin-top: 0.5rem;
    border: 1px solid var(--border-color);
}

/* Submit button */
.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

.submit-btn:hover {
    background-color: #2980b9;
}

/* Result container */
.result-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: none;
}

.result-container.active {
    display: block;
}

/* Responsive design */
@media (min-width: 768px) {
    .form-group {
        display: inline-block;
        width: calc(50% - 1rem);
        margin-right: 1rem;
    }

    .form-group:nth-child(2n) {
        margin-right: 0;
    }

    /* Full width items */
    .form-group:has(#map),
    .form-group:has(.submit-btn) {
        width: 100%;
    }
}

/* Error states */
.error {
    border-color: var(--error-color) !important;
}

.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

/* Success states */
.success {
    border-color: var(--success-color) !important;
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: "...";
    animation: loading 1s infinite;
}

@keyframes loading {
    0% { content: "."; }
    33% { content: ".."; }
    66% { content: "..."; }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Add these to your existing CSS */
.submit-btn .loading-text {
    display: none;
}

.submit-btn.loading .button-text {
    display: none;
}

.submit-btn.loading .loading-text {
    display: inline;
}

.submit-btn.loading {
    background-color: #7f8c8d;
    cursor: wait;
}

/* Results page specific styles */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.description-section, .map-section {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.description-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    margin: 1rem 0;
    white-space: pre-wrap;
}

.nearby-places {
    margin-top: 2rem;
}

.nearby-places ul {
    list-style: none;
    padding: 0;
}

.nearby-places li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.back-btn, .copy-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.back-btn {
    background-color: var(--border-color);
    color: var(--text-color);
}

.copy-btn {
    background-color: var(--secondary-color);
    color: white;
}

.back-btn:hover {
    background-color: #bdc3c7;
}

.copy-btn:hover {
    background-color: #2980b9;
}

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

/* Add to your existing CSS */
.nearby-places li:only-child {
    color: #666;
    font-style: italic;
}

.nearby-places ul:empty::after {
    content: 'Yaxınlıqda obyekt tapılmadı';
    display: block;
    color: #666;
    font-style: italic;
    padding: 0.5rem 0;
}

/* Add these to your existing CSS file */
.upload-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.preview-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid var(--border-color);
}

.result-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.assessment-box {
    margin-top: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.repair-description, .repair-needs {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.repair-needs {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.actions .btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.actions .btn:hover {
    background-color: #2980b9;
}

/* Add these to your existing CSS */

.scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.score-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.score-card:hover {
    transform: translateY(-5px);
}

.score-card h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.score-card .score {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin: 1rem 0;
}

.score-card .weight {
    font-size: 0.9rem;
    color: #666;
}

.final-score {
    grid-column: 1 / -1;
    background: var(--primary-color);
}

.final-score h3,
.final-score .score,
.final-score .weight {
    color: white;
}

.assessment-box {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.repair-description {
    white-space: pre-line;
    line-height: 1.6;
}

/* Add these to your existing CSS */
.score-card.final-score.score-low {
    background: #e74c3c;  /* Red for low scores */
    transition: background-color 0.3s ease;
}

.score-card.final-score.score-medium {
    background: #f1c40f;  /* Yellow for medium scores */
    transition: background-color 0.3s ease;
}

.score-card.final-score.score-high {
    background: #27ae60;  /* Green for high scores */
    transition: background-color 0.3s ease;
}

/* Ensure text remains readable on all backgrounds */
.score-card.final-score.score-low h3,
.score-card.final-score.score-low .score,
.score-card.final-score.score-low .weight,
.score-card.final-score.score-medium h3,
.score-card.final-score.score-medium .score,
.score-card.final-score.score-medium .weight,
.score-card.final-score.score-high h3,
.score-card.final-score.score-high .score,
.score-card.final-score.score-high .weight {
    color: white;
}

.map-search {
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
}

.map-search input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.map-search button {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.map-search button:hover {
    background-color: #45a049;
}

.floor-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.floor-inputs input {
    width: 120px;
    text-align: center;
}

.floor-inputs span {
    font-weight: bold;
}

select[multiple] {
    width: 100%;
    padding: 5px;
}

select[multiple] option {
    padding: 5px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
}

.checkbox-item label {
    margin: 0;
    cursor: pointer;
}