*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:Arial,Helvetica,sans-serif;
}
body{
background:linear-gradient(135deg,#FF9933,#ffffff,#138808);
min-height:100vh;
display:flex;
justify-content:center;
align-items:center;
padding:20px;
}
.container{
width:100%;
max-width:700px;
background:#fff;
border-radius:20px;
box-shadow:0 15px 40px rgba(0,0,0,.25);
padding:30px;
animation:fade .5s;
}
header{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:25px;
}
header h1{
font-size:32px;
color:#0d47a1;
}
#themeBtn{
border:none;
background:#0d47a1;
color:#fff;
padding:10px 18px;
border-radius:10px;
cursor:pointer;
font-weight:bold;
}
#startScreen{
text-align:center;
}
#startScreen h2{
margin-bottom:25px;
color:#444;
}
select{
width:100%;
padding:15px;
margin:12px 0;
border-radius:12px;
border:2px solid #ddd;
font-size:16px;
}
button{
cursor:pointer;
transition:.3s;
}
#startBtn,
#nextBtn{
width:100%;
padding:15px;
margin-top:20px;
font-size:18px;
border:none;
border-radius:12px;
background:#ff6f00;
color:white;
font-weight:bold;
}
#startBtn:hover,
#nextBtn:hover{
background:#e65100;
transform:scale(1.02);
}
.hide{
display:none;
}
.topBar{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:20px;
font-weight:bold;
}
#timer{
background:#e53935;
color:#fff;
padding:10px 18px;
border-radius:50px;
}
.progress{
height:12px;
background:#ddd;
border-radius:20px;
overflow:hidden;
margin-bottom:25px;
}
#progressBar{
height:100%;
width:0%;
background:#4caf50;
transition:.4s;
}
#question{
font-size:24px;
margin-bottom:20px;
color:#222;
}
#options button{
display:block;
width:100%;
padding:15px;
margin:12px 0;
border:none;
border-radius:12px;
background:#f3f3f3;
text-align:left;
font-size:17px;
}
#options button:hover{
background:#2196f3;
color:white;
}
.correct{
background:#2e7d32 !important;
color:white;
}
.wrong{
background:#d32f2f !important;
color:white;
}
#resultBox{
text-align:center;
}
#score{
font-size:60px;
color:#0d47a1;
margin:20px 0;
}
.dark{
background:#121212;
}
.dark .container{
background:#1f1f1f;
color:white;
}
.dark #question{
color:white;
}
.dark select{
background:#333;
color:white;
border-color:#444;
}
.dark #options button{
background:#333;
color:white;
}
@keyframes fade{
from{
opacity:0;
transform:translateY(20px);
}
to{
opacity:1;
transform:translateY(0);
}
}
@media(max-width:600px){
.container{
padding:20px;
}
header h1{
font-size:24px;
}
#question{
font-size:20px;
}
}