* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
    direction: rtl;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 30px 0;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    color: #aaa;
    font-size: 1.1rem;
}

.header-info {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.header-info button {
    background: #4a90d9;
    border: none;
    color: #fff;
    padding: 10px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: 0.3s;
}

.header-info button:hover {
    background: #357abd;
    transform: scale(1.05);
}

.summary {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.summary-card {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 20px 40px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.summary-card .value {
    font-size: 3rem;
    font-weight: 900;
}

.summary-card .label {
    color: #aaa;
    margin-top: 5px;
}

.legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.leg {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.leg.good { background: #00e400; color: #000; }
.leg.moderate { background: #ffff00; color: #000; }
.leg.sensitive { background: #ff7e00; color: #000; }
.leg.unhealthy { background: #ff0000; color: #fff; }
.leg.very-unhealthy { background: #8f3f97; color: #fff; }
.leg.hazardous { background: #7e0023; color: #fff; }

.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: #aaa;
}

.stations {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.station-card {
    background: rgba(255,255,255,0.08);
    border-radius: 15px;
    padding: 20px;
    transition: 0.3s;
    border-right: 5px solid;
}

.station-card:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.12);
}

.station-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.station-name {
    font-size: 1.2rem;
    font-weight: 700;
}

.station-area {
    color: #aaa;
    font-size: 0.9rem;
}

.station-aqi {
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    margin: 15px 0;
}

.station-status {
    text-align: center;
    padding: 8px;
    border-radius: 10px;
    font-weight: 500;
}

.station-details {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.detail {
    text-align: center;
}

.detail-value {
    font-weight: 700;
    font-size: 1.1rem;
}

.detail-label {
    font-size: 0.8rem;
    color: #aaa;
}

footer {
    text-align: center;
    padding: 30px;
    color: #666;
}

@media (max-width: 600px) {
    header h1 { font-size: 1.8rem; }
    .summary-card { padding: 15px 25px; }
    .summary-card .value { font-size: 2rem; }
    .stations { grid-template-columns: 1fr; }
}
