/* =====================================================
   AirAlert SmartCity
   style.css
   Part 1/4
=====================================================*/

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

:root{

--primary:#00c853;
--secondary:#00e5ff;
--dark:#0b1220;
--dark2:#121c2f;
--white:#ffffff;
--glass:rgba(255,255,255,.15);
--border:rgba(255,255,255,.18);
--shadow:0 10px 30px rgba(0,0,0,.18);

}

body{

font-family:'Poppins',sans-serif;

background:#eef3f8;

color:#222;

overflow-x:hidden;

transition:.4s;

}

body.dark{

background:#09111f;

color:#fff;

}

a{

text-decoration:none;

color:inherit;

}

img{

max-width:100%;

display:block;

}

section{

padding:90px 8%;

}

/*================ Loader ================*/

#loader{

position:fixed;

top:0;

left:0;

width:100%;

height:100%;

background:#071321;

display:flex;

justify-content:center;

align-items:center;

flex-direction:column;

z-index:99999;

transition:.6s;

}

.spinner{

width:90px;

height:90px;

border-radius:50%;

border:8px solid rgba(255,255,255,.2);

border-top:8px solid #00ff95;

animation:spin 1s linear infinite;

margin-bottom:20px;

}

@keyframes spin{

100%{

transform:rotate(360deg);

}

}

#loader h2{

color:white;

font-weight:600;

}

/*================ Notification ================*/

#notification{

position:fixed;

top:20px;

right:-350px;

background:#00c853;

padding:18px 28px;

border-radius:10px;

color:white;

box-shadow:var(--shadow);

transition:.6s;

z-index:999;

font-weight:600;

}

#notification.show{

right:20px;

}

/*================ Header ================*/

header{

position:fixed;

top:0;

left:0;

width:100%;

padding:18px 8%;

display:flex;

justify-content:space-between;

align-items:center;

background:rgba(255,255,255,.75);

backdrop-filter:blur(18px);

z-index:1000;

transition:.4s;

}

body.dark header{

background:rgba(8,15,28,.75);

}

.logo{

font-size:24px;

font-weight:700;

color:var(--primary);

}

nav{

display:flex;

gap:35px;

}

nav a{

font-weight:500;

position:relative;

transition:.3s;

}

nav a:hover{

color:var(--primary);

}

nav a::after{

content:"";

position:absolute;

left:0;

bottom:-8px;

width:0;

height:3px;

background:var(--primary);

transition:.3s;

}

nav a:hover::after{

width:100%;

}

.menu{

display:flex;

gap:20px;

font-size:22px;

cursor:pointer;

}

#menuBtn{

display:none;

}

/*================ Hero ================*/

.hero{

height:100vh;

display:flex;

justify-content:center;

align-items:center;

text-align:center;

background:linear-gradient(rgba(0,0,0,.55),rgba(0,0,0,.55)),
url("https://images.unsplash.com/photo-1494526585095-c41746248156?auto=format&fit=crop&w=1600&q=80");

background-size:cover;

background-position:center;

color:white;

}

.hero-content{

max-width:850px;

animation:fadeUp 1.2s;

}

.hero h1{

font-size:58px;

margin-bottom:20px;

line-height:1.2;

}

.hero p{

font-size:20px;

opacity:.9;

margin-bottom:35px;

}

.hero button{

padding:15px 40px;

border:none;

border-radius:50px;

background:var(--primary);

color:white;

font-size:18px;

cursor:pointer;

transition:.35s;

}

.hero button:hover{

transform:translateY(-6px);

box-shadow:0 10px 25px rgba(0,200,83,.45);

}

@keyframes fadeUp{

from{

opacity:0;

transform:translateY(40px);

}

to{

opacity:1;

transform:translateY(0);

}

}
/*====================================================
  Statistics Section
====================================================*/

.stats{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
gap:30px;
padding:80px 8%;
}

.card{
background:rgba(255,255,255,.75);
backdrop-filter:blur(15px);
border:1px solid rgba(255,255,255,.3);
border-radius:20px;
padding:40px;
text-align:center;
box-shadow:var(--shadow);
transition:.35s;
}

body.dark .card{
background:rgba(255,255,255,.08);
}

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

.card h2{
font-size:48px;
color:var(--primary);
margin-bottom:10px;
}

.card p{
font-size:18px;
font-weight:500;
}

/*====================================================
Dashboard
====================================================*/

.dashboard h2{
text-align:center;
font-size:40px;
margin-bottom:50px;
}

.dashboard-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
gap:30px;
}

.glass{
background:rgba(255,255,255,.18);
backdrop-filter:blur(18px);
border:1px solid rgba(255,255,255,.25);
border-radius:20px;
padding:35px;
text-align:center;
transition:.35s;
box-shadow:var(--shadow);
}

body.dark .glass{
background:rgba(255,255,255,.08);
}

.glass:hover{
transform:translateY(-12px) scale(1.03);
}

.glass i{
font-size:42px;
margin-bottom:18px;
color:var(--primary);
}

.glass h3{
margin-bottom:10px;
font-size:22px;
}

.glass h1{
font-size:42px;
}

/*====================================================
Prediction
====================================================*/

.prediction{
text-align:center;
}

.prediction h2{
font-size:38px;
margin-bottom:35px;
}

.prediction-box{
max-width:700px;
margin:auto;
padding:40px;
border-radius:20px;
background:rgba(255,255,255,.75);
backdrop-filter:blur(18px);
box-shadow:var(--shadow);
}

body.dark .prediction-box{
background:rgba(255,255,255,.08);
}

.progress{
width:100%;
height:22px;
background:#d8d8d8;
border-radius:40px;
overflow:hidden;
margin-bottom:25px;
}

.fill{
width:0%;
height:100%;
background:linear-gradient(90deg,#00c853,#00e5ff);
animation:progressFill 3s forwards;
}

@keyframes progressFill{

0%{
width:0;
}

100%{
width:88%;
}

}

.prediction p{
font-size:20px;
}

/*====================================================
Citizen Report
====================================================*/

#reports h2{
text-align:center;
font-size:38px;
margin-bottom:35px;
}

.report-box{
max-width:700px;
margin:auto;
display:flex;
flex-direction:column;
gap:20px;
background:rgba(255,255,255,.75);
padding:40px;
border-radius:20px;
backdrop-filter:blur(18px);
box-shadow:var(--shadow);
}

body.dark .report-box{
background:rgba(255,255,255,.08);
}

.report-box input,
.report-box textarea{

padding:18px;

border:none;

outline:none;

border-radius:12px;

font-size:16px;

font-family:Poppins,sans-serif;

}

.report-box textarea{

height:170px;

resize:none;

}

.report-box button{

padding:15px;

border:none;

background:var(--primary);

color:#fff;

font-size:18px;

border-radius:50px;

cursor:pointer;

transition:.35s;

}

.report-box button:hover{

transform:scale(1.03);

box-shadow:0 10px 25px rgba(0,200,83,.4);

}
/*====================================================
Floating Action Button
====================================================*/

#topBtn{
position:fixed;
bottom:30px;
right:30px;
width:55px;
height:55px;
border:none;
border-radius:50%;
background:var(--primary);
color:#fff;
font-size:22px;
cursor:pointer;
display:none;
box-shadow:var(--shadow);
transition:.3s;
z-index:999;
}

#topBtn:hover{
transform:translateY(-6px) scale(1.08);
}

#topBtn.show{
display:block;
animation:fadeIn .4s;
}

/*====================================================
Footer
====================================================*/

footer{
padding:60px 8%;
text-align:center;
background:#081321;
color:#fff;
margin-top:80px;
}

footer h3{
font-size:32px;
margin-bottom:15px;
}

footer p{
opacity:.9;
margin:10px 0;
}

.social{
margin:25px 0;
display:flex;
justify-content:center;
gap:20px;
}

.social i{
width:48px;
height:48px;
border-radius:50%;
display:flex;
align-items:center;
justify-content:center;
background:rgba(255,255,255,.08);
font-size:22px;
cursor:pointer;
transition:.3s;
}

.social i:hover{
background:var(--primary);
transform:translateY(-6px);
}

/*====================================================
Dark Mode
====================================================*/

body.dark .prediction-box,
body.dark .report-box,
body.dark .card,
body.dark .glass{
color:#fff;
}

body.dark input,
body.dark textarea{
background:#162338;
color:#fff;
}

body.dark .progress{
background:#24344d;
}

/*====================================================
Animations
====================================================*/

@keyframes fadeIn{

from{
opacity:0;
transform:translateY(20px);
}

to{
opacity:1;
transform:translateY(0);
}

}

@keyframes float{

0%{
transform:translateY(0px);
}

50%{
transform:translateY(-10px);
}

100%{
transform:translateY(0px);
}

}

.glass:nth-child(1){
animation:float 4s infinite;
}

.glass:nth-child(2){
animation:float 5s infinite;
}

.glass:nth-child(3){
animation:float 6s infinite;
}

.glass:nth-child(4){
animation:float 7s infinite;
}

/*====================================================
Responsive Navigation
====================================================*/

@media(max-width:900px){

#menuBtn{
display:block;
}

nav{
position:absolute;
top:80px;
left:-100%;
width:100%;
background:#fff;
flex-direction:column;
padding:30px;
gap:20px;
transition:.4s;
box-shadow:var(--shadow);
}

body.dark nav{
background:#101b2e;
}

nav.active{
left:0;
}

.hero h1{
font-size:40px;
}

.hero p{
font-size:17px;
}

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

.menu{
gap:18px;
}

}

/*====================================================
Mobile
====================================================*/

@media(max-width:600px){

section{
padding:70px 20px;
}

header{
padding:18px 20px;
}

.logo{
font-size:20px;
}

.hero h1{
font-size:32px;
}

.hero p{
font-size:16px;
}

.card h2,
.glass h1{
font-size:34px;
}

.dashboard h2,
.prediction h2,
#reports h2{
font-size:30px;
}

.report-box{
padding:25px;
}

footer h3{
font-size:26px;
}

}
/*====================================================
PART 4/4
Extra Effects
====================================================*/

/* Smooth Scrollbar */

::-webkit-scrollbar{
width:10px;
}

::-webkit-scrollbar-track{
background:#d8d8d8;
}

::-webkit-scrollbar-thumb{
background:#00c853;
border-radius:20px;
}

::-webkit-scrollbar-thumb:hover{
background:#00a843;
}

/* Text Selection */

::selection{
background:#00c853;
color:#fff;
}

/* Glass Shine */

.glass{
position:relative;
overflow:hidden;
}

.glass::before{
content:"";
position:absolute;
top:-120%;
left:-60%;
width:70%;
height:300%;
background:rgba(255,255,255,.18);
transform:rotate(25deg);
transition:.7s;
}

.glass:hover::before{
left:130%;
}

/* Card Hover */

.card{
position:relative;
overflow:hidden;
}

.card::after{
content:"";
position:absolute;
left:0;
bottom:0;
height:4px;
width:0;
background:#00c853;
transition:.4s;
}

.card:hover::after{
width:100%;
}

/* Buttons */

button{
font-family:'Poppins',sans-serif;
}

button:active{
transform:scale(.96);
}

/* Inputs */

input:focus,
textarea:focus{

outline:2px solid #00c853;

}

/* Images */

img{

transition:.4s;

}

img:hover{

transform:scale(1.03);

}

/* Fade Utility */

.fade{

opacity:0;

transform:translateY(35px);

transition:1s;

}

.fade.show{

opacity:1;

transform:translateY(0);

}

/* Accessibility */

button,
a,
input,
textarea{

transition:.3s;

}

button:focus,
a:focus{

outline:2px solid #00c853;

outline-offset:4px;

}

/* Hero Background Animation */

.hero{

animation:bgMove 15s linear infinite alternate;

}

@keyframes bgMove{

0%{

background-position:center top;

}

100%{

background-position:center bottom;

}

}

/* Footer Glow */

footer{

position:relative;

overflow:hidden;

}

footer::before{

content:"";

position:absolute;

width:500px;

height:500px;

background:radial-gradient(circle,rgba(0,229,255,.18),transparent 70%);

top:-250px;

left:-150px;

pointer-events:none;

}

/* Utility */

.hidden{

display:none;

}

.center{

text-align:center;

}

.mt-2{

margin-top:20px;

}

.mt-3{

margin-top:30px;

}

.mb-2{

margin-bottom:20px;

}

.mb-3{

margin-bottom:30px;

}
/* Pollution Map */

#pollutionMap{

width:100%;

height:500px;

border-radius:20px;

box-shadow:0 10px 25px rgba(0,0,0,.2);

margin-top:20px;

overflow:hidden;

}
/* ===========================
   AI Assistant
=========================== */

#assistant{

padding:80px 10%;

}

.ai-box{

background:rgba(255,255,255,.12);

backdrop-filter:blur(18px);

border-radius:20px;

padding:30px;

box-shadow:0 15px 40px rgba(0,0,0,.15);

}

.chat-area{

height:320px;

overflow-y:auto;

padding:20px;

background:#f5f7fb;

border-radius:15px;

margin-bottom:20px;

}

.ai-message{

background:#00c853;

color:white;

padding:15px 20px;

border-radius:15px;

display:inline-block;

max-width:80%;

margin-bottom:15px;

line-height:1.6;

}

.user-message{

background:#2563eb;

color:white;

padding:15px 20px;

border-radius:15px;

margin-left:auto;

margin-bottom:15px;

display:block;

width:fit-content;

max-width:80%;

}

.chat-input{

display:flex;

gap:15px;

}

.chat-input input{

flex:1;

padding:16px;

border:none;

border-radius:12px;

font-size:16px;

outline:none;

}

.chat-input button{

padding:15px 30px;

border:none;

border-radius:12px;

background:#00c853;

color:white;

font-size:17px;

cursor:pointer;

transition:.3s;

}

.chat-input button:hover{

transform:translateY(-3px);

box-shadow:0 10px 25px rgba(0,200,83,.4);

}
