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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    padding: 20px;
    color: #fff;
}

.container {
    max-width: 500px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 24px;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

header p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Search Section */
.search-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

#cityInput {
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    background: rgba(255,255,255,0.1);
    color: white;
    outline: none;
}

#cityInput::placeholder {
    color: rgba(255,255,255,0.5);
}

button {
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
}

button:active {
    transform: scale(0.98);
}

#searchBtn {
    background: #00b4d8;
    color: white;
}

#useLocationBtn {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Loading & Error */
.loading, .error {
    text-align: center;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.loading {
    background: rgba(0,180,216,0.2);
}

.error {
    background: rgba(255,70,70,0.2);
    color: #ff6b6b;
}

.hidden {
    display: none;
}

/* Air Quality Card */
.air-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.2);
}

.city-name {
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 16px;
}

.aqi-value {
    font-size: 4rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
}

.aqi-label {
    text-align: center;
    font-size: 1.2rem;
    padding: 8px 16px;
    border-radius: 40px;
    display: inline-block;
    width: auto;
    margin: 0 auto 20px;
}

/* AQI Colors */
.aqi-1 { background: #2ecc71; color: #fff; }
.aqi-2 { background: #f1c40f; color: #333; }
.aqi-3 { background: #e67e22; color: #fff; }
.aqi-4 { background: #e74c3c; color: #fff; }
.aqi-5 { background: #8e44ad; color: #fff; }

.pollutants {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.pollutant {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.pollutant span {
    opacity: 0.7;
}

.update-time {
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.5;
    margin-top: 16px;
}

/* History Section */
.history-section {
    background: rgba(255,255,255,0.05);
    border-radius: 24px;
    padding: 20px;
}

.history-section h3 {
    margin-bottom: 16px;
    text-align: center;
}

.clear-btn {
    background: rgba(255,70,70,0.3);
    color: #ff6b6b;
    margin-top: 16px;
    width: 100%;
}

footer {
    text-align: center;
    font-size: 0.7rem;
    opacity: 0.5;
    margin-top: 24px;
}