:root {
    --primary-color: #0077b6;
    --secondary-color: #00b4d8;
    --dark-color: #023e8a;
    --light-color: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
}

.logo i {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    color: #333;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

nav a.active,
nav a:hover {
    background: var(--primary-color);
    color: white;
}

.container {
    flex: 1;
    max-width: 480px;
    margin: 40px auto;
    padding: 20px;
}

.weather-input {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.weather-input:hover {
    transform: translateY(-5px);
}

.weather-input input {
    width: 100%;
    height: 46px;
    padding: 0 15px;
    margin: 10px 0;
    border: 2px solid #e3e3e3;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.weather-input input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.weather-input h3 {
    color: #1a1a1a;
    font-size: 1.3rem;
}

.weather-input h3 i {
    margin-right: 8px;
    color: var(--primary-color);
}

.search-btn {
    width: 100%;
    padding: 12px 0;
    background: var(--primary-color);
    color: var(--light-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--dark-color);
    transform: scale(1.02);
}

.weather-data {
    margin-top: 20px;
    display: none;
    opacity: 0;
    transform: scale(0.9);
    animation: fadeIn 0.5s ease forwards;
}

.weather-data.active {
    display: block;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.current-weather {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.weather-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.weather-icon img {
    width: 100%;
    animation: float 3s ease-in-out infinite;
}

.weather-icon i {
    font-size: 5rem;
    color: var(--primary-color);
    animation: float 3s ease-in-out infinite;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.temperature {
    font-size: 64px;
    font-weight: 700;
    text-align: center;
    margin: 15px 0;
    color: var(--dark-color);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
}

.description {
    text-align: center;
    font-size: 24px;
    margin-bottom: 25px;
    color: var(--primary-color);
    text-transform: capitalize;
}

.weather-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.4rem;
    color: var(--primary-color);
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    padding-bottom: 10px;
}

.detail-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    min-width: 120px;
}

.detail-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.detail-item i {
    font-size: 1.8rem;
    background: var(--primary-color);
    color: var(--light-color);
    padding: 12px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-item div {
    text-align: center;
    width: 100%;
}

.detail-item p:first-child {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
}

.detail-item p:last-child {
    font-size: 0.9rem;
    color: #666;
    margin-top: 2px;
}

.site-footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    margin-top: auto;
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 1.5rem;
}

.social-links {
    margin: 1rem 0;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0 10px;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

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

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav {
        gap: 10px;
    }
    
    nav a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .weather-details {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        overflow-x: auto;
        padding: 15px 5px;
        margin-top: 20px;
    }

    .detail-item {
        min-width: 100px;
        padding: 12px 8px;
    }
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .header-content,
    .footer-content {
        max-width: 95%;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 15px;
    }
    
    nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    nav a {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .container {
        max-width: 95%;
        margin: 20px auto;
        padding: 15px;
    }

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

    .temperature {
        font-size: 40px;
    }

    .description {
        font-size: 18px;
    }

    .weather-input {
        padding: 20px;
    }

    .detail-item {
        padding: 12px;
    }

    .detail-item i {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.2rem;
    }

    .logo i {
        font-size: 1.5rem;
    }

    .weather-input h3 {
        font-size: 1.1rem;
    }

    .weather-input input {
        height: 40px;
        font-size: 14px;
    }

    .search-btn {
        padding: 10px 0;
        font-size: 14px;
    }

    .weather-icon {
        width: 90px;
        height: 90px;
    }

    .weather-icon i {
        font-size: 3.5rem;
    }

    .temperature {
        font-size: 48px;
    }

    .description {
        font-size: 20px;
    }

    .detail-item p:first-child {
        font-size: 1.1rem;
    }

    .detail-item p:last-child {
        font-size: 0.8rem;
    }

    .social-links a {
        font-size: 1.2rem;
        margin: 0 8px;
    }

    .weather-details {
        grid-template-columns: repeat(2, 1fr);
        padding: 10px 0;
    }

    .detail-item i {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
        padding: 8px;
    }

    .copyright {
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .header-content {
        padding: 0.8rem 10px;
    }

    nav a {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .container {
        padding: 10px;
    }

    .weather-input {
        padding: 15px;
    }

    .detail-item {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .detail-item div {
        text-align: center;
    }

    .weather-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .detail-item {
        min-width: auto;
        padding: 10px;
    }
}

/* Add support for larger screens */
@media (min-width: 1400px) {
    .container {
        max-width: 580px;
    }

    .weather-icon {
        width: 100px;
        height: 100px;
    }

    .temperature {
        font-size: 56px;
    }

    .description {
        font-size: 24px;
    }
}

/* Add dark mode support */
@media (prefers-color-scheme: dark) {
    .site-header,
    .site-footer {
        background: rgba(0, 0, 0, 0.8);
    }

    .weather-input,
    .current-weather {
        background: rgba(0, 0, 0, 0.7);
    }

    .weather-input h3,
    .temperature,
    .detail-item p:first-child {
        color: var(--light-color);
    }

    .description,
    .detail-item p:last-child {
        color: rgba(255, 255, 255, 0.8);
    }

    nav a {
        color: var(--light-color);
    }

    .weather-input input {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: var(--light-color);
    }

    .weather-input input::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }

    .detail-item {
        background: rgba(0, 0, 0, 0.4);
    }
}

/* Add landscape mode optimization */
@media (max-height: 600px) and (orientation: landscape) {
    .site-header {
        position: relative;
    }

    .container {
        margin: 10px auto;
    }

    .weather-details {
        grid-template-columns: repeat(6, 1fr);
        margin-top: 15px;
    }
}

/* Update responsive footer styles */
@media (max-height: 800px) {
    .container {
        margin: 20px auto;
    }

    .site-footer {
        padding: 1rem 0;
    }

    .footer-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .footer-logo, .social-links, .copyright {
        margin: 0;
    }
}

@media (max-height: 600px) {
    .container {
        margin: 10px auto;
    }
}

/* Add animated background elements */
.bg-animations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-cloud {
    position: absolute;
    opacity: 0.6;
    animation: floatCloud 20s linear infinite;
}

.floating-cloud:nth-child(1) {
    top: 15%;
    left: -100px;
    font-size: 4rem;
    animation-delay: 0s;
}

.floating-cloud:nth-child(2) {
    top: 45%;
    left: -100px;
    font-size: 3rem;
    animation-delay: 5s;
}

.floating-cloud:nth-child(3) {
    top: 75%;
    left: -100px;
    font-size: 3.5rem;
    animation-delay: 10s;
}

.rain-drop {
    position: absolute;
    pointer-events: none;
    animation: rainDrop 1s linear infinite;
    opacity: 0.4;
    color: var(--light-color);
}

.sun-ray {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    animation: rotateSun 20s linear infinite;
}

@keyframes floatCloud {
    from {
        transform: translateX(-100px);
    }
    to {
        transform: translateX(calc(100vw + 100px));
    }
}

@keyframes rainDrop {
    0% {
        transform: translateY(-10px);
        opacity: 0;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

@keyframes rotateSun {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Add dark mode adjustments for animations */
@media (prefers-color-scheme: dark) {
    .floating-cloud {
        opacity: 0.3;
    }
    
    .sun-ray {
        opacity: 0.1;
    }
}
