:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-color: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --error: #ef4444;
    --success: #22c55e;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(80px);
}

.blob {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    opacity: 0.5;
    animation: move 20s infinite alternate;
}

.blob-1 {
    background: #4f46e5;
    top: -10%;
    left: -10%;
}

.blob-2 {
    background: #7c3aed;
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    background: #0ea5e9;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes move {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(10%, 20%) scale(1.1); }
    66% { transform: translate(-20%, 10%) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-family: inherit;
}

.search-box button {
    background: var(--accent);
    border: none;
    outline: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search-box button:hover {
    background: #0ea5e9;
    transform: scale(1.05);
}

.quick-cities {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.city-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.city-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.weather-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: 2.5rem;
    backdrop-filter: blur(16px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.5s ease-out;
}

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

.weather-main {
    text-align: center;
    margin-bottom: 2.5rem;
}

.location-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.location-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.temp-section {
    margin: 2rem 0;
}

#temperature {
    font-size: 6rem;
    font-weight: 800;
}

.unit {
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-secondary);
    vertical-align: super;
}

#weatherDesc {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 600;
    text-transform: capitalize;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

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

.detail-item .label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.detail-item .value {
    font-weight: 600;
    font-size: 1rem;
}

.loading-container, .error-container {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 1.5rem;
    backdrop-filter: blur(10px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-container p {
    color: var(--error);
}

.hidden {
    display: none;
}

.footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    .weather-card {
        padding: 1.5rem;
    }
    #temperature {
        font-size: 4rem;
    }
}
