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

:root {
    --bg: linear-gradient(135deg, #74ebd5, #9face6);
    --card: rgba(255,255,255,0.25);
    --text: white;
    --btn: #111;
}

body.dark {
    --bg: linear-gradient(135deg, #141e30, #243b55);
    --card: rgba(0,0,0,0.35);
    --text: #f1f1f1;
    --btn: #222;
}

body {
    height: 100vh;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.5s;
}

.app {
    width: 90%;
    max-width: 420px;
    text-align: center;
    color: var(--text);
}

.topBar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title {
    font-size: 2.2rem;
}

.themeBtn {
    font-size: 1.4rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
}

.weatherForm {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.cityInput {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    border: none;
    outline: none;
}

button {
    padding: 10px;
    border-radius: 12px;
    border: none;
    background: var(--btn);
    color: white;
    cursor: pointer;
    margin-top: 8px;
    transition: 0.3s;
}

button:hover {
    transform: scale(1.05);
}

.card {
    display: none;
    margin-top: 20px;
    padding: 25px;
    border-radius: 20px;
    background: var(--card);
    backdrop-filter: blur(15px);
}

.weatherEmoji {
    font-size: 4rem;
}

.tempDisplay {
    font-size: 2.5rem;
    font-weight: bold;
}

.errorDisplay {
    color: #ffcccc;
    font-weight: bold;
}
