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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 50%, #fff3e0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.title {
    text-align: center;
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-group.flex-1 {
    flex: 1;
}

label {
    display: block;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

input, select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    color: #2c3e50;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input::placeholder {
    color: #6c757d;
}

input:focus, select:focus {
    outline: none;
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.1);
}

select option {
    background: white;
    color: #2c3e50;
}

.search-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.search-btn:hover::before {
    left: 100%;
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3, #004085);
}

.search-btn:active {
    transform: translateY(-1px);
}

.weather-result {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 30px;
    border: 2px solid #e9ecef;
    animation: fadeInUp 0.5s ease;
    display: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.weather-header {
    text-align: center;
    margin-bottom: 25px;
}

.location-name {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.weather-icon {
    width: 100px;
    height: 100px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.temperature {
    font-size: 4rem;
    font-weight: 300;
    color: #007bff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.weather-desc {
    text-align: center;
    color: #495057;
    font-size: 1.3rem;
    font-weight: 500;
    text-transform: capitalize;
    margin-bottom: 20px;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.detail-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.detail-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.detail-value {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.loading {
    text-align: center;
    color: #2c3e50;
    font-size: 1.1rem;
    margin-top: 20px;
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* Autocomplete Styles */
.autocomplete-container {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.autocomplete-suggestions.active {
    display: block;
}

.autocomplete-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #2c3e50;
    border-bottom: 1px solid #f8f9fa;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: #f8f9fa;
}

.autocomplete-item.selected {
    background: #e3f2fd;
}

.city-name {
    font-weight: 600;
    color: #007bff;
}

.city-details {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 2px;
}

.loading-suggestions {
    padding: 12px 20px;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .weather-main {
        flex-direction: column;
        gap: 15px;
    }
    
    .weather-icon {
        width: 80px;
        height: 80px;
    }
    
    .temperature {
        font-size: 3rem;
    }
    
    .container {
        padding: 20px;
    }
    
    .title {
        font-size: 2rem;
    }
}