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

:root {
    --bg: #030712;
    --bg-gradient: linear-gradient(
        135deg,
        #020617,
        #071a33,
        #0f172a
    );

    --card: rgba(15, 23, 42, 0.72);
    --card-border: rgba(255,255,255,0.08);

    --text: #ffffff;
    --subtext: #94a3b8;

    --input-bg: rgba(255,255,255,0.08);

    --accent:
    linear-gradient(
        135deg,
        #ff9800,
        #ff5e00
    );

    --shadow:
    rgba(0,0,0,0.35);
}

.light-theme {
    --bg: #eef4ff;

    --bg-gradient: linear-gradient(
        135deg,
        #f8fbff,
        #dbeafe,
        #bfdbfe
    );

    --card: rgba(
        255,
        255,
        255,
        0.78
    );

    --card-border:
    rgba(0,0,0,0.08);

    --text: #111827;

    --subtext: #475569;

    --input-bg:
    rgba(0,0,0,0.06);

    --shadow:
    rgba(0,0,0,0.12);
}

body {
    font-family:
    'Montserrat',
    sans-serif;

    min-height: 100vh;

    background:
    var(--bg-gradient);

    color:
    var(--text);

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 30px;

    transition: 0.4s ease;
}

.app-container {
    width: 100%;
    max-width: 1200px;
    min-height: 580px;

    background:
    var(--card);

    border:
    1px solid
    var(--card-border);

    backdrop-filter:
    blur(22px);

    border-radius: 34px;

    padding: 38px;

    box-shadow:
    0 20px 60px
    var(--shadow);

    transition: 0.3s ease;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 35px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo-icon {
    font-size: 50px;
}

h1 {
    font-size: 56px;
    font-weight: 700;
}

.subtitle {
    color:
    var(--subtext);

    font-size: 16px;

    margin-top: 6px;
}

#theme-toggle {
    width: 72px;
    height: 72px;

    border-radius: 50%;
    border: none;

    background:
    rgba(255,255,255,0.08);

    color:
    var(--text);

    cursor: pointer;

    font-size: 24px;

    transition: 0.3s ease;
}

#theme-toggle:hover {
    transform:
    scale(1.08)
    rotate(12deg);
}

.search-container {
    display: grid;
    grid-template-columns:
    1fr 170px;

    gap: 20px;

    margin-bottom: 35px;
}

#city-input {
    height: 76px;

    border: none;
    outline: none;

    border-radius: 24px;

    background:
    var(--input-bg);

    color:
    var(--text);

    padding: 0 28px;

    font-size: 22px;
}

#city-input::placeholder {
    color:
    var(--subtext);
}

#city-input-btn {
    height: 76px;

    border: none;

    border-radius: 24px;

    cursor: pointer;

    font-size: 22px;
    font-weight: 700;

    color: white;

    background:
    var(--accent);

    transition: 0.3s ease;
}

#city-input-btn:hover {
    transform:
    translateY(-2px);

    box-shadow:
    0 10px 30px
    rgba(
        255,
        115,
        0,
        0.3
    );
}

#weather-info {
    display: none;
    margin-top: 30px;
}

.main-weather-card {
    background:
    rgba(
        255,
        255,
        255,
        0.05
    );

    border:
    1px solid
    rgba(
        255,
        255,
        255,
        0.06
    );

    border-radius: 30px;

    padding: 35px;

    margin-bottom: 24px;
}

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

#city-name {
    font-size: 42px;
    font-weight: 700;
}

#date {
    margin-top: 8px;
    color:
    var(--subtext);
}

#weather-icon {
    width: 130px;
}

#temperature {
    font-size: 84px;
    font-weight: 700;

    margin:
    20px 0 8px;
}

#description {
    font-size: 28px;
    text-transform: capitalize;

    color:
    var(--subtext);
}

.weather-stats {
    display: grid;
    grid-template-columns:
    repeat(3, 1fr);

    gap: 20px;
}

.stat-card {
    background:
    rgba(
        255,
        255,
        255,
        0.05
    );

    border:
    1px solid
    rgba(
        255,
        255,
        255,
        0.06
    );

    border-radius: 28px;

    padding: 28px;

    text-align: center;

    transition: 0.3s ease;
}

.stat-card:hover {
    transform:
    translateY(-5px);
}

.stat-card i {
    font-size: 32px;
    margin-bottom: 12px;
}

.stat-card h4 {
    color:
    var(--subtext);

    margin-bottom: 10px;
}

.stat-card p {
    font-size: 26px;
    font-weight: 700;
}

.recent-searches {
    margin-top: 32px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 16px;
}

.section-title h3 {
    font-size: 28px;
}

#search-history {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.history-btn {
    border: none;

    padding: 14px 22px;

    border-radius: 18px;

    cursor: pointer;

    background:
    rgba(
        255,
        255,
        255,
        0.08
    );

    color:
    var(--text);

    font-size: 16px;

    transition: 0.3s ease;
}

.history-btn:hover {
    transform:
    translateY(-3px);

    background:
    rgba(
        255,
        255,
        255,
        0.14
    );
}

@media (max-width: 768px) {

    .top-bar {
        flex-direction: column;
        gap: 20px;
    }

    .search-container {
        grid-template-columns:
        1fr;
    }

    .weather-header {
        flex-direction: column;
        text-align: center;
    }

    .weather-stats {
        grid-template-columns:
        1fr;
    }

    h1 {
        font-size: 42px;
    }

    #temperature {
        font-size: 60px;
    }

    #city-name {
        font-size: 32px;
    }
}