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

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.app {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.app-title {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#city-input {
    flex: 1;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    outline: none;
    backdrop-filter: blur(10px);
    transition: background 0.3s;
}

#city-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#city-input:focus {
    background: rgba(255, 255, 255, 0.25);
}

#search-btn {
    padding: 14px 24px;
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
}

#search-btn:hover {
    background: #c73652;
}

#search-btn:active {
    transform: scale(0.97);
}

.error {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    font-size: 14px;
}

.weather-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 32px 28px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    animation: fadeIn 0.4s ease;
}

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

.location {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
}

#country-name {
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 6px;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.weather-icon {
    font-size: 4rem;
    line-height: 1;
}

.temp-block {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.temperature {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
}

.unit-toggle {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}

.unit-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.weather-desc {
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 28px;
    text-transform: capitalize;
}

.stats {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 24px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-icon {
    font-size: 1.4rem;
}

.stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.loading {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #e94560;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.hidden {
    display: none !important;
}
