
:root {
    --primary-color: #4facfe;
    --secondary-color: #00f2fe;
    --tertiary-color: var(--secondary-color);
    --text-color: white;
    --font-family: 'Montserrat', sans-serif;
        --glass-bg: rgba(255, 255, 255, 0.12);
        --glass-border: rgba(255, 255, 255, 0.3);
        --glass-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
html, body {
    overflow-x: hidden;
    width: 100%;
}
body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 60%, var(--tertiary-color) 100%);
    color: var(--text-color);
    letter-spacing: 0.5px;
    line-height: 1.5;
    padding: 16px 0 32px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.theme-night {
    filter: saturate(0.9) brightness(0.9);
}
body.theme-night .glass {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
}
body.theme-day .glass {
    background: var(--glass-bg);
    border-color: var(--glass-border);
}
body.theme-day {
    color: #2b2b2b;
}
body.theme-day .loading-card,
body.theme-day .loading-spinner,
body.theme-day .weather-info h2,
body.theme-day .weather-info p,
body.theme-day .current-meta,
body.theme-day .current-details li,
body.theme-day .grid-item p,
body.theme-day .grid-item p span,
body.theme-day footer,
body.theme-day footer a {
    color: rgba(20, 20, 20, 0.85);
}
body.theme-day #city-form input[type="text"],
body.theme-day #city-form input[type="text"]::placeholder,
body.theme-day #city-form button {
    color: rgba(20, 20, 20, 0.85);
}

.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(10px);
}
.loading {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.2s ease;
}
.loading.hidden {
    opacity: 0;
    pointer-events: none;
}
.loading-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.04em;
}
.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
main {
    flex: 1;
    overflow-x: hidden;
}

.logo {
    display:flex;
    align-items: flex-end;
    position: relative;
    font-family: var(--font-family);
	font-size: 46px;
	font-weight: 700;
	color: rgba(0, 0, 0, 0.6);
	margin: 40px;
    height: 120px;
}

.logo img {
	width: 120px; 
    height: 120px;
    position: absolute; 
    left: 0;
    bottom: 0;            
    z-index: 0;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.6));
    transition: filter 0.3s ease;
}

.logo:hover img {
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.9));
}

.logo span { 
    position: relative;
    z-index: 1;         
    margin-left: 39px;
    margin-bottom: 0;
    line-height: 0.8;
}
.forecast-text {
    display: inline-block;
    margin-left: 45px;    
    font-size: 34px;
    margin-top: -5px;
}

.header-search {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

#city-form {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 20px auto 40px;
    width: 100%;
    gap: 15px;
}

.search-combo {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

#city-form input[type="text"] {
    font-weight: 200;
    font-size: 16px;
    color: rgb(255, 255, 255);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    max-width: 400px;
    background: rgba(26, 26, 131, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    outline: none;
    transition: all 0.3s ease;
} 

#city-form input[type="text"]:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
    width: 60%;
}
    #city-form input[type="text"]::placeholder {
        color: rgba(255, 255, 255, 0.85);
    }

#city-form button {
    background: rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    font-weight: 500; 
    letter-spacing: 0.18em;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 10px 30px;
    flex-shrink: 0;
    white-space: nowrap;
}

#city-form button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.city-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    margin: 0;
    padding: 6px 0;
    list-style: none;
    z-index: 50;
    border-radius: 16px;
    background: rgba(20, 30, 48, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    max-height: 240px;
    overflow-y: auto;
}

.city-suggestions.hidden {
    display: none;
}

.city-suggestions li {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    transition: background 0.15s ease;
}

.city-suggestions li:hover,
.city-suggestions li[aria-selected="true"] {
    background: rgba(255, 255, 255, 0.12);
}

.city-suggestions .suggestion-meta {
    display: block;
    font-size: 11px;
    font-weight: 300;
    opacity: 0.65;
    margin-top: 2px;
}

.toast-region {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    max-width: min(420px, calc(100vw - 32px));
}

.toast {
    pointer-events: auto;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: toast-in 0.28s ease;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.toast--error {
    background: rgba(90, 24, 40, 0.95);
    color: #fff;
}

.toast--info {
    background: rgba(30, 40, 60, 0.95);
    color: rgba(255, 255, 255, 0.95);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.theme-day .city-suggestions {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(0, 0, 0, 0.08);
}

body.theme-day .city-suggestions li {
    color: rgba(20, 20, 20, 0.88);
}

body.theme-day .city-suggestions li:hover,
body.theme-day .city-suggestions li[aria-selected="true"] {
    background: rgba(79, 172, 254, 0.15);
}

.weather-info {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 36px;
    margin: 32px 0 0 25px;
    width: 90%;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.info-content {
    flex: 1;
}
.lottie-container {
    position: absolute;
    right: 120px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}
.weather-info:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}
.weather-info h2 {
    font-size: 46px;
    color: rgba(255, 255, 255, 0.9);
    margin: 16px 0 12px;
    letter-spacing: 0.02em;
}
.current-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.08em;
    margin: 2px 0 10px;
}
.current-meta::before {
    content: "🕒";
    font-size: 12px;
    opacity: 0.7;
}
.weather-info h2 span {
        font-size: 46px;
        color: rgba(0, 0, 0, 0.6);
}
.weather-info p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: -10px;
}
.weather-info span {
    font-size: 18px;
    color: rgba(0, 0, 0, 0.7);
}
.feels-value {
    font-size: 18px;
    color: rgba(0, 0, 0, 0.4);
}
.current-details {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    letter-spacing: 1px;
}
.current-details li {
    margin: 10px 0;
    color: rgba(255, 255, 255, 0.7);
    display: block;
}
.grid {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 20px 10px 25px 10px;
    margin: 20px 60px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}
.grid.glass {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}
.grid::-webkit-scrollbar {
    height: 5px;
}
.grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 0 40px;
}
.grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s;
}
.grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}
.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 130px;
    flex-shrink: 0;
    border-radius: 15px;
    padding: 16px 10px;
    gap: 6px;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.day-weather-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.grid-item p {
    display: flex;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    gap: 9px;
    
}

.grid-item p span {
    font-size: 18px;
    color:rgba(0, 0, 0, 0.6);
    gap: 2px;
}
.grid-item:hover {
    transform: translateY(-4px);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
    cursor: pointer;
}

.grid-item--today {
    outline: 2px solid rgba(255, 255, 255, 0.65);
    outline-offset: 2px;
    box-shadow: 0 0 0 1px rgba(0, 242, 254, 0.35), var(--glass-shadow);
}

.grid-item--today .today-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(0, 242, 254, 0.95);
    margin-bottom: 2px;
}

body.theme-day .grid-item--today {
    outline-color: rgba(33, 147, 176, 0.55);
}

body.theme-day .grid-item--today .today-badge {
    color: rgba(33, 147, 176, 0.95);
}
footer {
    text-align: center;
    margin: 20px 0 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);

}
footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
footer a:hover {
    color: rgba(255, 255, 255, 1);
}