:root{
  --bg:#f4f7f9;
  --paper:#ffffff;
  --ink:#0f172a;
  --brand:#1b676a;
  --bd:#e6eef3;
  --shadow-1: 0 12px 30px rgba(15,23,42,.08);
  --shadow-2: 0 8px 18px rgba(0,0,0,.06);
  --r-lg: 18px;
  --green:#28c76f;
  --yellow:#ffd166;
  --bar:#22c55e;
  --bar2:#f59e0b;
}

*{ box-sizing:border-box }
html,body{ height:100% }
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}

.app{
  min-height:100vh;
  padding: 18px clamp(14px,4vw,34px) 120px;
}

.top{
  display:flex; align-items:center; gap:12px;
}
.group-1{ width: 40px; height: 40px; object-fit:contain }
.brand h2{ margin:0; font-size:24px; font-weight:800; color:var(--brand) }

.title{
  text-align:center;
  color: var(--brand);
  font-weight: 800;
  font-size: 20px;
  margin: 12px 0 16px;
}

.canvas{
  margin: 0 auto;
  width: min(1120px, 100%);
  background: var(--paper);
  border: 1px solid var(--bd);
  border-radius: 14px;
  box-shadow: var(--shadow-1);
  padding: 18px;
}

.charts{
  display:grid;
  gap: 18px;
}
.top-charts{
  display:grid;
  gap:18px;
}
@media(min-width:820px){
  .top-charts{ grid-template-columns:1fr 1fr }
}

.card{
  background:#fff;
  border:1px solid var(--bd);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  overflow:hidden;
  padding:14px;
}
.card h3{ margin:0 0 10px; font-size:16px; color:#334155; }

.profile-selector{
  margin: 16px auto;
  text-align: center;
  max-width: 600px;
}

.profile-selector h4{
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 16px;
}

.profile-options{
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.profile-btn{
  padding: 8px 16px;
  border: 2px solid #e6eef3;
  background: #fff;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.profile-btn:hover{
  border-color: var(--brand);
  background: #f8fffe;
}

.profile-btn.active{
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.aqi-display{
  text-align: center;
  margin-bottom: 16px;
}

.aqi-number{
  font-size: 48px;
  font-weight: 800;
  color: #2ecc71;
  line-height: 1;
}

.aqi-category{
  font-size: 14px;
  color: #64748b;
  margin-top: 4px;
}

.weather-info{
  display: grid;
  gap: 8px;
}

.weather-item{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 14px;
}

.alert-card{
  background: #fef3cd;
  border: 1px solid #fde68a;
  border-radius: var(--r-lg);
  padding: 14px;
  margin-top: 16px;
}

.alert-card h3{
  color: #92400e;
  margin: 0 0 8px;
  font-size: 14px;
}

.alert-content p{
  margin: 0;
  color: #92400e;
  font-size: 13px;
}

.data-source-selector{
  margin: 16px auto;
  text-align: center;
  max-width: 600px;
}

.data-source-selector h4{
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 16px;
}

.source-options{
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.source-btn{
  padding: 8px 16px;
  border: 2px solid #e6eef3;
  background: #fff;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.source-btn:hover{
  border-color: var(--brand);
  background: #f8fffe;
}

.source-btn.active{
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.oms-comparison{
  display: grid;
  gap: 12px;
}

.oms-item{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.oms-label{
  font-size: 14px;
  color: #495057;
}

.oms-value{
  font-weight: 600;
  font-size: 14px;
}

.oms-value.tempo{
  color: #3498db;
}

.oms-value.ground{
  color: #e74c3c;
}

.oms-status{
  text-align: center;
  padding: 12px;
  background: #fff3cd;
  border-radius: 8px;
  margin-top: 8px;
}

.status-text{
  color: #856404;
  font-size: 13px;
  font-weight: 500;
}

.pollutant-filters{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.pollutant-filters label{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  cursor: pointer;
}

.ai-predictions{
  display: grid;
  gap: 8px;
}

.prediction-item{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.prediction-label{
  font-size: 13px;
  color: #495057;
}

.prediction-value{
  font-weight: 600;
  font-size: 13px;
}

.prediction-value.good{
  color: #2ecc71;
}

.prediction-value.moderate{
  color: #f39c12;
}

.community-reports{
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.report-item{
  padding: 12px;
  border-left: 4px solid #e6eef3;
  margin-bottom: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.report-item.positive{
  border-left-color: #2ecc71;
}

.report-item.negative{
  border-left-color: #e74c3c;
}

.report-item.warning{
  border-left-color: #f39c12;
}

.report-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.report-location{
  font-weight: 600;
  font-size: 14px;
  color: #2c3e50;
}

.report-time{
  font-size: 12px;
  color: #7f8c8d;
}

.report-text{
  font-size: 14px;
  color: #34495e;
  margin-bottom: 8px;
  font-style: italic;
}

.report-tags{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag{
  background: #3498db;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
}

.add-report-btn{
  width: 100%;
  padding: 12px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.add-report-btn:hover{
  background: #2980b9;
}

.education-content{
  margin-bottom: 16px;
}

.education-item{
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 12px;
}

.education-item h4{
  margin: 0 0 8px;
  color: #2c3e50;
  font-size: 14px;
}

.education-item p{
  margin: 0;
  font-size: 13px;
  color: #34495e;
  line-height: 1.4;
}

.quiz-btn{
  width: 100%;
  padding: 12px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.quiz-btn:hover{
  background: #c0392b;
}

.impact-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.impact-item{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.impact-icon{
  font-size: 24px;
}

.impact-text h4{
  margin: 0 0 4px;
  color: #2c3e50;
  font-size: 14px;
}

.impact-text p{
  margin: 0;
  font-size: 12px;
  color: #34495e;
  line-height: 1.3;
}

.campaigns{
  display: grid;
  gap: 16px;
}

.campaign-item{
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

.campaign-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.campaign-header h4{
  margin: 0;
  color: #2c3e50;
  font-size: 14px;
}

.campaign-status{
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.campaign-status.active{
  background: #d4edda;
  color: #155724;
}

.campaign-status.pending{
  background: #fff3cd;
  color: #856404;
}

.campaign-item p{
  margin: 0 0 12px;
  font-size: 13px;
  color: #34495e;
  line-height: 1.4;
}

.campaign-progress{
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-bar{
  flex: 1;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill{
  height: 100%;
  background: #3498db;
  transition: width 0.3s;
}

.campaign-progress span{
  font-size: 11px;
  color: #6c757d;
  white-space: nowrap;
}

.guides{
  display: grid;
  gap: 12px;
}

.guide-item{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.guide-icon{
  font-size: 20px;
}

.guide-content{
  flex: 1;
}

.guide-content h4{
  margin: 0 0 4px;
  color: #2c3e50;
  font-size: 14px;
}

.guide-content p{
  margin: 0;
  font-size: 12px;
  color: #34495e;
}

.guide-btn{
  padding: 6px 12px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.2s;
}

.guide-btn:hover{
  background: #2980b9;
}

.quiz-modal, .guide-modal{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.quiz-content, .guide-content{
  background: white;
  padding: 24px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.quiz-options{
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.quiz-option{
  padding: 12px;
  border: 2px solid #e6eef3;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.quiz-option:hover{
  border-color: #3498db;
  background: #f8f9fa;
}

.quiz-progress{
  text-align: center;
  font-size: 12px;
  color: #6c757d;
  margin-top: 16px;
}

.close-guide{
  width: 100%;
  padding: 12px;
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 16px;
}

.close-guide:hover{
  background: #5a6268;
}

.rotbar{
  position:fixed;
  bottom:20px;
  left:50%;
  transform:translateX(-50%);
  background: rgba(255,255,255,.95);
  border:1px solid #e6ebf0;
  border-radius:16px;
  padding:12px 22px;
  box-shadow:0 10px 24px rgba(0,0,0,.08);
  backdrop-filter: blur(6px);
  z-index:999;
}
.rot-inner{
  display:flex; gap:22px; justify-content:center;
}
.rb-btn{
  width:64px; height:64px;
  border-radius:999px;
  border:0; background:#e5e7eb;
  display:grid; place-items:center;
  cursor:pointer;
  transition:.2s;
}
.rb-btn:hover{ transform:translateY(-3px); background:#dbeafe }
.rb-btn img{ width:60%; height:60%; object-fit:contain }
.rb-btn.accent{ background:#cfe8ea; box-shadow: inset 0 0 0 4px #9fc9cc }
