:root {
    --primary-color: #1a73e8;
    --secondary-color: #4285f4;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-primary);
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-container {
    position: relative;
    width: 400px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 12px 40px;
    border: 1px solid #dfe1e5;
    border-radius: 24px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
    border-color: rgba(223, 225, 229, 0);
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-result-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f1f3f4;
}

.current-weather {
    background: var(--card-background);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

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

.current-temp {
    font-size: 4rem;
    font-weight: 300;
}

.weather-icon {
    font-size: 3rem;
    color: var(--primary-color);
}

.forecast-section {
    margin-bottom: 2rem;
}

.hourly-scroll {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.hourly-item {
    flex: 0 0 auto;
    background: var(--card-background);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    min-width: 100px;
    box-shadow: var(--shadow);
}

.weekly-forecast {
    margin-bottom: 2rem;
}

.weekly-day {
    background: var(--card-background);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.weekly-day:hover {
    transform: translateX(5px);
}

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

.detail-card {
    background: var(--card-background);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.detail-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}


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

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .top-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .search-container {
        width: 100%;
    }

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

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