* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #2c3e50;
    text-align: center;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid #3498db;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #3498db, #2c3e50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    font-size: 1.1rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

.container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 1800px;
    margin: 0 auto;
    min-height: calc(100vh - 120px);
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Controls Section */
#controls {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-container {
    position: relative;
    margin-bottom: 1rem;
}

#cityInput {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

#cityInput:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#suggestions div {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

#suggestions div:hover {
    background: #3498db;
    color: white;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

button {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Layer Controls */
.layer-controls {
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 10px;
    border: 2px dashed #e0e0e0;
}

.layer-controls h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.layer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.layer-toggle {
    display: flex;
    align-items: center;
}

.layer-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
    border: 1px solid #e0e0e0;
    flex: 1;
}

.layer-label:hover {
    background: #e3f2fd;
    border-color: #3498db;
}

.layer-toggle input[type="checkbox"] {
    display: none;
}

.layer-toggle input[type="checkbox"]:checked + .layer-label {
    background: #e3f2fd;
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

/* Layer Icons */
.solar-icon { color: #FFD700; }
.temp-icon { color: #FF4500; }
.wind-icon { color: #87CEEB; }
.air-icon { color: #696969; }
.turbine-icon { color: #3498db; }
.solution-icon { color: #9b59b6; }

/* Layer Actions */
.layer-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.layer-actions .btn-outline {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.8rem;
    background: transparent;
    border: 1px solid #3498db;
    color: #3498db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.layer-actions .btn-outline:hover {
    background: #3498db;
    color: white;
}

/* Map Containers */
.map-container {
    position: relative;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    flex: 1;
}

#map {
    width: 100%;
    height: 500px;
    border-radius: 15px;
}

.map-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.map-overlay h3 {
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-overlay p {
    font-size: 0.8rem;
    color: #7f8c8d;
}

/* Results Section */
#results {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex: 1;
    overflow-y: auto;
}

#results h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
}

#output {
    line-height: 1.6;
    color: #555;
}

/* Enhanced results styling */
.city-summary {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 5px solid #3498db;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.data-card {
    background: white;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
    border: 1px solid #f0f0f0;
}

.data-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.data-card i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.data-value {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0.5rem 0;
    color: #2c3e50;
}

.data-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
}

/* Enhanced Form Styling */
.form-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-container h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.urgency-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.urgency-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.urgency-option:hover {
    border-color: #3498db;
    background: #e3f2fd;
}

.urgency-option input[type="radio"] {
    margin-right: 0.5rem;
}

.urgency-option input[type="radio"]:checked + .urgency-label {
    color: #3498db;
    font-weight: 600;
}

.urgency-option:has(input[type="radio"]:checked) {
    border-color: #3498db;
    background: #e3f2fd;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 2px solid #3498db;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* Success Message Styling */
.success-message {
    padding: 2rem;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-radius: 12px;
    color: white;
    text-align: center;
}

.success-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.success-message h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.success-message p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
    line-height: 1.6;
}

/* AI Solutions Section */
#ai-solutions-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex: 1;
    overflow-y: auto;
}

#ai-solutions-section h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
}

#ai-output {
    line-height: 1.6;
    color: #555;
}

.ai-placeholder {
    text-align: center;
    padding: 3rem 2rem;
    color: #7f8c8d;
}

.ai-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #bdc3c7;
}

.ai-placeholder h3 {
    margin-bottom: 1rem;
    color: #7f8c8d;
}

/* AI Solutions Styling */
.ai-solutions {
    margin-top: 1rem;
}

.solution-grid {
    display: grid;
    gap: 1rem;
}

.solution-card {
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    transition: transform 0.3s ease;
}

.solution-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.solution-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

.solution-icon {
    font-size: 1.5rem;
}

.solution-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.2rem;
}

.solution-description {
    color: #7f8c8d;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.solution-details {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.solution-details ul {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.solution-details li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.solution-impact {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.85rem;
}

.impact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.impact-positive {
    color: #28a745;
}

.impact-negative {
    color: #dc3545;
}

.solution-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.btn-outline {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #3498db;
    color: #3498db;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
}

/* Wind Turbine Layer */
.wind-turbine-layer {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
}

.wind-turbine-layer h4 {
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.turbine-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-excellent { background-color: #28a745; }
.legend-good { background-color: #ffc107; }
.legend-fair { background-color: #fd7e14; }
.legend-poor { background-color: #dc3545; }

/* Solution Layer */
.solution-layer {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
}

.solution-layer h4 {
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.solution-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }
    
    .left-panel {
        order: 2;
    }
    
    .right-panel {
        order: 1;
    }
    
    #map {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .button-group {
        grid-template-columns: 1fr;
    }
    
    .layer-grid {
        grid-template-columns: 1fr;
    }
    
    .data-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .urgency-options {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .solution-impact {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .layer-actions {
        flex-direction: column;
    }
}