* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f0f4f8;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: linear-gradient(135deg, #1e90ff, #00bfff);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-wrap: wrap;
}

.logo {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 700;
    letter-spacing: 1.5px;
    flex-shrink: 0;
}

.search-container {
    display: flex;
    max-width: clamp(200px, 25vw, 300px);
    flex: 1;
    margin: 0 20px;
}

#city-input {
    padding: 12px;
    border: none;
    border-radius: 10px 0 0 10px;
    flex-grow: 1;
    font-size: 16px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

button {
    padding: 12px 20px;
    background: #ffffff;
    color: #1e90ff;
    border: none;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s, transform 0.3s;
}

button:hover {
    background: #e6f7ff;
    transform: scale(1.05);
}

.menu-toggle {
    font-size: 32px;
    cursor: pointer;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

.menu {
    display: none;
    position: absolute;
    top: 70px;
    right: 30px;
    background: rgba(255, 255, 255, 0.98);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    min-width: 220px;
}

.menu.open {
    display: block;
    animation: menuOpen 0.3s;
}

@keyframes menuOpen {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.menu ul {
    list-style: none;
}

.menu li {
    margin: 15px 0;
}

.menu a {
    color: #1e90ff;
    font-size: 18px;
    font-weight: 600;
    transition: color 0.3s, padding-left 0.3s;
    display: block;
}

.menu a:hover {
    color: #00bfff;
    padding-left: 10px;
}

.menu-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(30, 144, 255, 0.6), rgba(0, 191, 255, 0.6)) url('https://images.pexels.com/photos/281260/pexels-photo-281260.jpeg?auto=compress&cs=tinysrgb&w=800') no-repeat center/cover;
    opacity: 0.5;
    z-index: -1;
    border-radius: 20px;
    filter: blur(3px);
}

body.blur .container:not(#menu) {
    filter: blur(5px);
    transition: filter 0.3s;
}

#map {
    height: 600px;
    width: 100%;
}

#info-section {
    padding: 2vw;
    margin: 2vw 0;
    border-radius: 20px;
    background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url('https://images.pexels.com/photos/531756/pexels-photo-531756.jpeg?auto=compress&cs=tinysrgb&w=800') no-repeat center/cover;
    background-size: cover;
    display: none;
    flex-direction: row;
    align-items: flex-start;
    text-align: center;
    position: relative;
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    color: #1e90ff;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-button:hover {
    background: #e6f7ff;
    transform: scale(1.1);
}

#city-title {
    font-size: calc(1.5rem + 1vw);
    color: #1e90ff;
    margin-bottom: 1.5vw;
    font-weight: 700;
    width: 100%;
}

.weather-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5vw;
    max-width: 90vw;
    margin: 0 auto;
}

#city-image {
    flex: 1;
    width: 100%;
    max-width: 30vw;
    max-height: 35vw;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.weather-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 1.5vw;
}

.current-weather {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1vw;
}

.weather-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 1vw;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 100px;
}

.weather-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.weather-item p {
    font-size: calc(0.8rem + 0.5vw);
    margin: 0.5vw 0;
}

.weather-icon {
    width: 8vw;
    max-width: 80px;
}

.weather-item i {
    margin-bottom: 0.5vw;
    animation: pulse 1.5s infinite;
}

.forecast {
    margin-top: 1.5vw;
}

.forecast h3 {
    font-size: calc(1.2rem + 0.8vw);
    color: #1e90ff;
    margin-bottom: 1.5vw;
    font-weight: 700;
}

.forecast-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1vw;
}

.forecast-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 1vw;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 100px;
    transform: rotate(${Math.random() * 4 - 2}deg);
}

.forecast-item:hover {
    transform: translateY(-5px) rotate(0deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.weather-sticker {
    width: 10vw;
    max-width: 100px;
    margin-bottom: 0.5vw;
    animation: bounce 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

#description {
    padding: 50px 30px;
    text-align: center;
    background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.9)), url('https://images.pexels.com/photos/125510/pexels-photo-125510.jpeg?auto=compress&cs=tinysrgb&w=800') no-repeat center/cover;
    background-size: cover;
}

#description h2 {
    font-size: 36px;
    margin-bottom: 25px;
    color: #1e90ff;
    font-weight: 700;
}

#description h3 {
    font-size: 24px;
    margin: 20px 0;
    color: #1e90ff;
}

#description p {
    font-size: 18px;
    max-width: 900px;
    margin: 0 auto 20px;
}

#description ul {
    list-style: none;
    max-width: 800px;
    margin: 0 auto 30px;
}

#description li {
    margin: 12px 0;
    font-size: 17px;
    position: relative;
    padding-left: 30px;
}

#description li::before {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    color: #1e90ff;
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 900;
}

.description-image {
    width: 100%;
    max-width: 800px;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    margin: 30px auto;
    display: block;
}

.links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.download-button {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, #1e90ff, #00bfff);
    color: white;
    border-radius: 15px;
    font-weight: 600;
    font-size: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.download-button img {
    height: 30px;
    margin-right: 10px;
}

.download-button:hover {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #00bfff, #1e90ff);
}

.download-button.play-store {
    order: 2;
}

.download-button.app-store {
    order: 1;
}

footer {
    background: linear-gradient(135deg, #1e90ff, #00bfff);
    color: white;
    padding: 60px 30px 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-section h3 {
    font-size: 22px;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
    font-weight: 700;
}

.footer-section p {
    font-size: 15px;
    margin: 10px 0;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin: 10px 0;
}

.footer-section a {
    color: white;
    transition: color 0.3s, padding-left 0.3s;
    display: block;
    font-weight: 500;
}

.footer-section a:hover {
    color: #ffd700;
    padding-left: 5px;
}

.social-icons {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a {
    font-size: 26px;
    color: white;
    transition: transform 0.3s;
}

.social-icons a:hover {
    transform: scale(1.2);
}

.newsletter-form {
    display: flex;
    justify-content: center;
}

.newsletter input {
    padding: 12px;
    border: none;
    border-radius: 10px 0 0 10px;
    width: 60%;
    font-size: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.newsletter button {
    padding: 12px 20px;
    background: #ffd700;
    color: #1e90ff;
    border: none;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: 600;
    width: 40%;
    text-align: center;
}

.newsletter button:hover {
    background: #ffcc00;
}

.extra-section img {
    filter: brightness(0) invert(1);
    height: 50px;
    margin: 10px;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
}

#loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    z-index: 2000;
}

/* Responsive Design */
@media (max-width: 576px) {
    header {
        padding: 10px 15px;
        flex-direction: column;
        align-items: stretch;
    }
    .logo {
        margin-bottom: 10px;
    }
    .search-container {
        margin: 0;
        max-width: 100%;
        order: 2;
    }
    .menu-toggle {
        order: 1;
        align-self: flex-end;
    }
    #info-section {
        flex-direction: column;
        padding: 10px;
        margin: 10px;
        align-items: center;
    }
    .weather-container {
        flex-direction: column;
        gap: 10px;
        padding: 0 5px;
        justify-content: center;
        align-items: center;
    }
    #city-image {
        max-width: 90%;
        max-height: 200px;
        margin: 0 auto;
    }
    #city-title {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    .weather-details {
        gap: 10px;
        width: 100%;
        align-items: center;
    }
    .current-weather, .forecast-grid {
        flex-direction: column;
        gap: 10px;
        justify-content: center;
        align-items: center;
    }
    .weather-item, .forecast-item {
        min-width: 80px;
        padding: 10px;
        max-width: 90%;
    }
    .weather-item p, .forecast-item p {
        font-size: 0.9rem;
    }
    .weather-icon, .weather-sticker {
        width: 50px;
        max-width: 50px;
    }
    .forecast h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    .close-button {
        width: 30px;
        height: 30px;
        font-size: 16px;
        top: 10px;
        right: 10px;
    }
    .download-button {
        padding: 12px 20px;
        font-size: 16px;
    }
    .download-button img {
        height: 30px;
        margin-right: 10px;
    }
}

@media (min-width: 576px) and (max-width: 768px) {
    #info-section {
        flex-direction: row;
        padding: 15px;
    }
    .weather-container {
        flex-direction: row;
        gap: 15px;
        padding: 0 10px;
    }
    #city-image {
        max-width: 40vw;
        max-height: 30vw;
    }
    #city-title {
        font-size: 1.4rem;
    }
    .weather-details {
        gap: 15px;
    }
    .current-weather, .forecast-grid {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    .weather-item, .forecast-item {
        min-width: 90px;
        padding: 12px;
    }
    .weather-item p, .forecast-item p {
        font-size: 0.95rem;
    }
    .weather-icon, .weather-sticker {
        width: 60px;
        max-width: 60px;
    }
    .forecast h3 {
        font-size: 1.2rem;
    }
}

@media (min-width: 1200px) {
    .weather-container {
        max-width: 1200px;
    }
    #city-image {
        max-width: 25vw;
        max-height: 30vw;
    }
    #city-title {
        font-size: 2rem;
    }
    .weather-item p, .forecast-item p {
        font-size: 1rem;
    }
    .forecast h3 {
        font-size: 1.5rem;
    }
}
