* {
    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;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

header {
    text-align: center;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

main {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Search Section */
.search-section {
    width: 100%;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

#cityInput {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#cityInput:focus {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: scale(1.02);
}

.search-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Loading Spinner */
.spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
}

.spinner.hidden {
    display: none;
}

.spinner::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Message */
.error-message {
    background-color: #ff6b6b;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: 500;
}

.error-message.hidden {
    display: none;
}

/* Weather Result */
.weather-result {
    width: 100%;
}

.weather-result.hidden {
    display: none;
}

.weather-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
}

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

.weather-header {
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.weather-header h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 5px;
}

.weather-date {
    color: #999;
    font-size: 0.95rem;
}

/* Weather Main Section */
.weather-main {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 2px solid #f0f0f0;
}

.weather-icon-section {
    flex-shrink: 0;
}

.weather-icon {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.1));
}

.weather-info {
    flex: 1;
}

.temperature-section {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 10px;
}

.temperature {
    font-size: 3rem;
    font-weight: 700;
    color: #667eea;
}

.unit {
    font-size: 1rem;
    color: #999;
    margin-top: 10px;
    margin-left: 5px;
}

.weather-condition {
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
}

.weather-description {
    color: #999;
    font-size: 0.95rem;
    text-transform: capitalize;
}

/* Weather Details Grid */
.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.detail-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: #f0f0f0;
    transform: translateY(-5px);
}

.detail-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.detail-value {
    display: block;
    font-size: 1.3rem;
    color: #333;
    font-weight: 600;
}

/* Footer */
footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .weather-main {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .temperature {
        font-size: 2.5rem;
    }
    
    .weather-details {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .weather-card {
        padding: 20px;
    }
}

@media (max-width: 400px) {
    .weather-details {
        grid-template-columns: 1fr;
    }
    
    .weather-icon {
        width: 80px;
        height: 80px;
    }
}
