:root {
    --primary: #2B5876;
    --secondary: #4E4376;
    --text: #fff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--text);
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

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

.suggestions-container {
    position: relative;
    flex: 1;
}

input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
}

button {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

button:hover {
    transform: translateY(-2px);
}

.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.location-btn {
    background: #2196F3;
    color: white;
}

.weather-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.current-weather {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.temp {
    font-size: 3em;
    font-weight: bold;
    margin: 10px 0;
}

.weather-icon {
    font-size: 2.5em;
    margin: 10px 0;
}

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

.forecast-day {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 15px;
    text-align: center;
}

.chart-container {
    position: relative;
    width: 100%; /* full width of parent */
    height: 300px; /* explicit height so Chart.js will render */
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

.error {
    background: #ff4444;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
}

.suggestions-list {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: -5px;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
}

.suggestion-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.suggestion-item:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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