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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 3rem;
    color: white;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

.search-section {
    margin-bottom: 2rem;
    position: relative;
}

.search-container {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 0.5rem;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#cityInput {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-radius: 20px;
    outline: none;
}

#searchBtn {
    background: #667eea;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

#searchBtn:hover {
    background: #5a6fd8;
}

.unit-toggle {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    min-width: 60px;
    transition: all 0.3s;
}

.unit-toggle:hover {
    background: #e9ecef;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    margin-top: 0.5rem;
    z-index: 100;
}

.suggestion-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

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

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

.weather-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.current-weather {
    margin-bottom: 3rem;
}

.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

#cityName {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.weather-icon {
    width: 80px;
    height: 80px;
}

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

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

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.label {
    color: #666;
    font-weight: 500;
}

.value {
    font-weight: 600;
    color: #333;
}

.weather-description {
    font-size: 1.2rem;
    text-align: center;
    color: #666;
    font-style: italic;
    text-transform: capitalize;
}

.forecast-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.forecast-item {
    text-align: center;
    padding: 1.5rem 1rem;
    background: #f8f9fa;
    border-radius: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.forecast-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.forecast-date {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.9rem;
}

.forecast-icon {
    width: 50px;
    height: 50px;
    margin: 0.5rem 0;
}

.forecast-temp {
    font-size: 1.3rem;
    font-weight: 600;
    color: #667eea;
    margin: 0.5rem 0;
}

.forecast-desc {
    font-size: 0.9rem;
    color: #666;
    text-transform: capitalize;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: white;
}

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

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

.error-message {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.error-message p {
    color: #dc3545;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.retry-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.retry-btn:hover {
    background: #c82333;
}

.hidden {
    display: none !important;
}

footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    margin-top: 2rem;
}

footer a {
    color: white;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .search-container {
        flex-direction: column;
    }

    .weather-header {
        flex-direction: column;
        text-align: center;
    }

    .weather-details {
        grid-template-columns: 1fr;
    }

    .forecast-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .temperature {
        font-size: 3rem;
    }
}