:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #f72585;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

.dark-mode {
    --primary-color: #4cc9f0;
    --secondary-color: #4895ef;
    --accent-color: #f72585;
    --text-color: #e9ecef;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Top Bar */
.top-bar{
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

#darkmode-toggle {
    display: none;
}

.theme-toggle label {
    cursor: pointer;
    position: relative;
    display: block;
    width: 60px;
    height: 30px;
    background-color: var(--secondary-color);
    border-radius: 30px;
    padding: 4px;
    transition: var(--transition);
}

.theme-toggle label i {
    position: absolute;
    color: #fff;
    font-size: 14px;
}

.theme-toggle label .fa-sun {
    left: 10px;
    top: 8px;
}

.theme-toggle label .fa-moon {
    right: 10px;
    top: 8px;
}

.theme-toggle label:after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: white;
    top: 4px;
    left: 4px;
    transition: var(--transition);
}

#darkmode-toggle:checked + label:after {
    transform: translateX(30px);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
}

.top-bar h1 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background-color: var(--card-bg);
    border-radius: 50px;
    padding: 5px;
    box-shadow: var(--shadow);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 50px;
    background-color: transparent;
    color: var(--text-color);
}

.search-box button {
    border: none;
    outline: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    margin-left: 5px;
    transition: var(--transition);
}

.search-box button:hover {
    background-color: var(--secondary-color);
}

/* Advertisement Banner */
.ads-banner-lg, .ads-banner-sm{
    margin-bottom: 25px;
    text-align: center;
}
.ads-banner-lg img{
    width: 90%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 15px;
    cursor: pointer;
}

.ads-banner-sm img{
    width: 60%;
    max-width: 100%;
    object-fit: contain;
    border-radius: 15px;
    cursor: pointer;
}

/* Alert Banner */
.alert-banner {
    background-color: rgba(255, 173, 51, 0.2);
    border-left: 4px solid #ffad33;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

.alert-banner.active {
    display: block;
    animation: slideDown 0.5s ease;
}

/* Current Weather */
.current-weather {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.location {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.location h2 {
    font-size: 24px;
    color: var(--primary-color);
}

.location p {
    font-size: 14px;
    opacity: 0.7;
}

.weather-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.temperature {
    text-align: center;
    margin-right: 20px;
}

.temp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.temp-icon img {
    width: 80px;
    height: 80px;
    margin-right: 10px;
}

.temp-icon h3 {
    font-size: 48px;
    font-weight: 500;
}

.weather-description {
    text-transform: capitalize;
    opacity: 0.8;
}

.details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    flex: 1;
}

.detail {
    display: flex;
    align-items: center;
}

.detail i {
    font-size: 24px;
    color: var(--primary-color);
    margin-right: 15px;
}

/* Forecast */
.forecast {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 30px;
}

.forecast-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.forecast-toggle button {
    border: none;
    background-color: transparent;
    padding: 10px 20px;
    margin: 0 10px;
    cursor: pointer;
    position: relative;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.forecast-toggle button:after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: var(--transition);
}

.forecast-toggle button.active:after,
.forecast-toggle button:hover:after {
    width: 80%;
}

.forecast-toggle button.active {
    color: var(--primary-color);
}

.forecast-container {
    display: flex;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.forecast-container::-webkit-scrollbar {
    height: 6px;
}

.forecast-container::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
}

.forecast-item {
    min-width: 120px;
    padding: 15px;
    text-align: center;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.forecast-item:last-child {
    border-right: none;
}

.forecast-item p {
    margin-bottom: 10px;
}

.forecast-item .time {
    font-weight: 500;
}

.forecast-item img {
    width: 50px;
    height: 50px;
    margin: 10px 0;
}

.forecast-item .temp {
    font-weight: 600;
    color: var(--primary-color);
}

/* Daily Forecast */
.daily-forecast {
    display: none;
}

.daily-forecast.active {
    display: flex;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 20px;
    padding: 20px 0;
    opacity: 0.7;
    font-size: 14px;
}

footer i {
    color: var(--accent-color);
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Notification */
.notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--card-bg);
    box-shadow: var(--shadow);
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    max-width: 400px;
    z-index: 1000;
    transition: bottom 0.5s ease;
}

.notification.active {
    bottom: 20px;
}

.notification-content {
    display: flex;
    align-items: center;
}

.notification-icon {
    color: var(--accent-color);
    font-size: 20px;
    margin-right: 15px;
}

.notification-message {
    max-width: 300px;
}

#notification-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 16px;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}

#notification-close:hover {
    opacity: 1;
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .weather-info {
        flex-direction: column;
    }
    
    .temperature {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .location {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-box {
        flex-wrap: wrap;
    }
    
    .search-box input {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .forecast-toggle button {
        padding: 8px 12px;
        margin: 0 5px;
        font-size: 14px;
    }
}
