:root {
    --primary-color: #4565c2;
    --primary-hover: #2a4a9e;
    --text-color: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --bg-transparent: rgba(11, 47, 80, 0.3);
    --card-bg: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Ancizar Serif", "Segoe UI", sans-serif;
    font-weight: 300;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    color: var(--text-color);
    background-color: #0a1a2e;
}

#background-video {
    position: fixed;
    top: 0;
    left: 0;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.7;
}

#weather-container {
    background: var(--bg-transparent);
    width: 100%;
    max-width: 450px;
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
    transition: var(--transition);
}

#weather-container header {
    margin-bottom: 20px;
}

#weather-container h1 {
    font-size: 2rem;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Previous styles remain the same, add these new styles */

.search-wrapper {
    position: relative;
    flex: 1;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: rgba(11, 47, 80, 0.95);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
}

.autocomplete-item:hover {
    background: rgba(69, 101, 194, 0.3);
}

.autocomplete-item .city-name {
    font-weight: 400;
}

.autocomplete-item .country-name {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.autocomplete-dropdown::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#city {
    flex: 1;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
}

#city:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(69, 101, 194, 0.3);
}

#search-button {
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

#search-button:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.loader {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #fff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.current-weather {
    margin: 20px 0;
}

#weather-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    display: none;
}

#temp-div p {
    font-size: 3.5rem;
    margin: 10px 0;
    font-weight: 500;
}

#weather-info {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

#weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 25px 0;
}

.detail-card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.detail-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.detail-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.detail-value {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 500;
}

.detail-subtext {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    margin-top: 3px;
}

.forecast-section {
    margin-top: 30px;
}

#hourly-heading {
    text-align: left;
    margin-bottom: 15px;
    font-weight: 400;
}

#hourly-forecast {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.hourly-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg);
    padding: 10px;
    border-radius: 8px;
    min-width: 70px;
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
}

.hourly-item img {
    width: 40px;
    height: 40px;
    margin: 5px 0;
}

footer {
    margin-top: 30px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

footer a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Scrollbar styles */
#weather-container::-webkit-scrollbar {
    width: 6px;
}

#weather-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
}

#hourly-forecast::-webkit-scrollbar {
    height: 6px;
}

#hourly-forecast::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
}

/* Responsive styles */
@media (max-width: 480px) {
    #weather-container {
        padding: 15px;
        max-height: 95vh;
    }

    #weather-details {
        grid-template-columns: repeat(2, 1fr);
    }

    #temp-div p {
        font-size: 2.8rem;
    }

    .search-container {
        flex-direction: column;
    }

    #search-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-height: 700px) {
    #weather-icon {
        width: 80px;
        height: 80px;
    }
    
    #temp-div p {
        font-size: 2.5rem;
    }
}