* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}
.line{
    display: flex;
    justify-content: center;
    align-items: center;
}
:root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
}

body {
    background-color: #0f172a;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    transition: background-color 1s ease;
}

/* Dynamic Background Elements */
.background {
    position: absolute;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out alternate;
    transition: background 1s ease;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* Main Container */
.container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

/* Search Box */
.search-box {
    width: 100%;
    height: 55px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0 20px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.search-box i {
    color: var(--text-secondary);
    font-size: 18px;
}

.search-box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 16px;
    padding: 0 15px;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.search-box button {
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s ease;
}

.search-box button i {
    color: var(--text-primary);
    font-size: 18px;
}

.search-box button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

/* Weather Card */
.weather-card {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.weather-main {
    text-align: center;
    margin-bottom: 30px;
}

.weather-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    animation: hoverIcon 3s infinite ease-in-out alternate;
}

@keyframes hoverIcon {
    from {
        transform: translateY(-5px);
    }
    to {
        transform: translateY(5px);
    }
}

.temperature {
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.temperature span:last-child {
    font-size: 24px;
    vertical-align: top;
    margin-left: 5px;
}

.description {
    font-size: 20px;
    font-weight: 500;
    text-transform: capitalize;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.location {
    font-size: 14px;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* Details Section */
.weather-details {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 20px 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-box i {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.9);
}

.detail-box .text {
    display: flex;
    flex-direction: column;
}

.detail-box .text span {
    font-size: 16px;
    font-weight: 600;
}

.detail-box .text p {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Error & Loading */
.error-msg, .loading {
    text-align: center;
    padding: 20px 0;
    animation: fadeIn 0.4s ease;
}

.error-msg i {
    font-size: 40px;
    color: #ef4444;
    margin-bottom: 10px;
}

.error-msg p {
    font-size: 16px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left-color: #fff;
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
        width: 90%;
    }
    
    .temperature {
        font-size: 54px;
    }
    
    .weather-details {
        flex-direction: column;
        gap: 15px;
    }
}
