/* ==========================================
   GOOGLE FONT
========================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ==========================================
   RESET
========================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins',sans-serif;
}

html{
    scroll-behavior:smooth;
}

body{

    min-height:100vh;

    display:flex;

    justify-content:center;

    align-items:center;

    padding:30px;

    background:
    linear-gradient(rgba(0,0,0,.55),rgba(0,0,0,.55)),
    linear-gradient(135deg,#141e30,#243b55);

    color:#fff;

}

/* ==========================================
   CONTAINER
========================================== */

.container{

    width:100%;

    max-width:850px;

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

    backdrop-filter:blur(18px);

    border-radius:25px;

    padding:35px;

    box-shadow:

    0 10px 40px rgba(0,0,0,.45);

    border:1px solid rgba(255,255,255,.08);

    animation:fadeIn .8s ease;

}

/* ==========================================
   ANIMATION
========================================== */

@keyframes fadeIn{

from{

opacity:0;

transform:translateY(40px);

}

to{

opacity:1;

transform:translateY(0);

}

}

@keyframes pulse{

0%{

transform:scale(1);

}

50%{

transform:scale(1.04);

}

100%{

transform:scale(1);

}

}

/* ==========================================
   SECTIONS
========================================== */

#quizSection,
#finalSection{

display:none;

}

/* ==========================================
   TITLES
========================================== */

h1{

text-align:center;

font-size:38px;

margin-bottom:12px;

font-weight:700;

color:#00ffd5;

}

.subtitle{

text-align:center;

margin-bottom:30px;

font-size:18px;

opacity:.85;

}

h2{

margin-bottom:15px;

font-size:28px;

}

h3{

margin-bottom:10px;

}

/* ==========================================
   INPUT GROUP
========================================== */

.input-group{

margin-bottom:20px;

}

.input-group label{

display:block;

margin-bottom:8px;

font-size:16px;

font-weight:600;

}

.input-group i{

color:#00ffd5;

margin-right:8px;

}

/* ==========================================
   INPUTS
========================================== */

input,
select{

width:100%;

padding:14px;

font-size:16px;

border:none;

outline:none;

border-radius:12px;

background:white;

margin-bottom:15px;

transition:.3s;

}

input:focus,
select:focus{

box-shadow:

0 0 12px #00ffd5;

}

/* ==========================================
   BUTTONS
========================================== */

button{

width:100%;

padding:15px;

border:none;

border-radius:12px;

font-size:17px;

font-weight:600;

cursor:pointer;

background:#00c9a7;

color:white;

transition:.3s;

margin-top:10px;

}

button:hover{

transform:translateY(-3px);

background:#00b894;

box-shadow:

0 10px 25px rgba(0,201,167,.35);

}

button:active{

transform:scale(.97);

}

/* ==========================================
   BUTTON GROUP
========================================== */

.button-group{

display:grid;

grid-template-columns:repeat(3,1fr);

gap:15px;

margin-top:25px;

}

/* ==========================================
   QUIZ INFO
========================================== */

.quiz-info{

display:flex;

justify-content:space-between;

align-items:center;

margin:20px 0;

font-size:18px;

font-weight:600;

flex-wrap:wrap;

gap:10px;

}

/* ==========================================
   QUESTION
========================================== */

#question{

font-size:34px;

text-align:center;

margin:25px 0;

animation:pulse 1s infinite;

}

/* ==========================================
   ANSWER
========================================== */

#answer{

text-align:center;

font-size:20px;

}

/* ==========================================
   TIMER
========================================== */

#timer{

color:#ff7675;

font-weight:bold;

}

/* ==========================================
   SCORE
========================================== */

#score{

color:#00ffd5;

font-weight:bold;

}

/* ==========================================
   RESULT
========================================== */

#result{

font-size:22px;

font-weight:bold;

text-align:center;

margin-top:15px;

}

#motivation{

margin-top:10px;

text-align:center;

font-size:18px;

color:#ffe66d;

font-weight:600;

}

#streak{

text-align:center;

font-size:22px;

margin-top:10px;

color:#ff9f43;

font-weight:bold;

}

/* ==========================================
   PROGRESS BAR
========================================== */

.progress-container{

width:100%;

height:18px;

background:#2d3436;

border-radius:30px;

overflow:hidden;

margin:25px 0;

}

.progress-bar{

width:0%;

height:100%;

background:linear-gradient(
90deg,
#00ffd5,
#00b894
);

transition:.4s;

}

/* ==========================================
   FINAL SECTION
========================================== */

#finalSection{

animation:fadeIn .8s ease;

}

/* ==========================================
   FINISH MESSAGE
========================================== */

#finishMessage{

font-size:36px;

text-align:center;

margin-bottom:20px;

color:#00ffd5;

animation:pulse 1.5s infinite;

}

/* ==========================================
   STATS CARD
========================================== */

.stats-card{

margin-top:25px;

padding:25px;

border-radius:20px;

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

border:1px solid rgba(255,255,255,.08);

box-shadow:0 5px 20px rgba(0,0,0,.25);

}

.stats-card h2{

text-align:center;

margin-bottom:20px;

color:#00ffd5;

}

#stats{

display:grid;

grid-template-columns:repeat(2,1fr);

gap:15px;

}

.stat-box{

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

padding:18px;

border-radius:15px;

text-align:center;

transition:.3s;

}

.stat-box:hover{

transform:translateY(-5px);

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

}

.stat-box h3{

font-size:18px;

margin-bottom:10px;

}

.stat-box p{

font-size:22px;

font-weight:bold;

color:#ffe66d;

}

/* ==========================================
   CHART CARD
========================================== */

.chart-card{

margin-top:30px;

padding:25px;

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

border-radius:20px;

text-align:center;

border:1px solid rgba(255,255,255,.08);

}

.chart-card canvas{

max-width:350px;

margin:auto;

}

/* ==========================================
   ACHIEVEMENT
========================================== */

#achievement{

margin-top:25px;

padding:20px;

border-radius:15px;

text-align:center;

font-size:24px;

font-weight:bold;

background:linear-gradient(
135deg,
#f1c40f,
#f39c12
);

color:#222;

box-shadow:0 5px 20px rgba(241,196,15,.35);

}

/* ==========================================
   HISTORY CARD
========================================== */

.history-card{

margin-top:30px;

padding:25px;

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

border-radius:20px;

border:1px solid rgba(255,255,255,.08);

}

.history-card h2{

text-align:center;

margin-bottom:20px;

color:#00ffd5;

}

/* ==========================================
   RESULT BOX
========================================== */

#resultBox{

max-height:350px;

overflow-y:auto;

padding:15px;

background:rgba(0,0,0,.25);

border-radius:15px;

}

#resultBox p{

margin-bottom:12px;

line-height:1.7;

}

.correct{

color:#2ecc71;

font-weight:bold;

}

.wrong{

color:#ff6b6b;

font-weight:bold;

}

/* ==========================================
   LEADERBOARD CARD
========================================== */

.leaderboard-card{

margin-top:30px;

padding:25px;

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

border-radius:20px;

border:1px solid rgba(255,255,255,.08);

}

.leaderboard-card h2{

text-align:center;

margin-bottom:20px;

color:#ffd32a;

}

/* ==========================================
   TABLE
========================================== */

table{

width:100%;

border-collapse:collapse;

overflow:hidden;

border-radius:15px;

}

thead{

background:#00b894;

}

th{

padding:15px;

font-size:16px;

}

td{

padding:14px;

text-align:center;

border-bottom:1px solid rgba(255,255,255,.08);

}

tbody tr{

transition:.3s;

}

tbody tr:hover{

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

}

/* ==========================================
   RANK COLORS
========================================== */

.rank1{

color:gold;

font-weight:bold;

}

.rank2{

color:silver;

font-weight:bold;

}

.rank3{

color:#cd7f32;

font-weight:bold;

}

/* ==========================================
   CERTIFICATE BUTTON
========================================== */

#downloadBtn{

background:#8e44ad;

}

#downloadBtn:hover{

background:#732d91;

}

/* ==========================================
   SHARE BUTTON
========================================== */

#shareBtn{

background:#3498db;

}

#shareBtn:hover{

background:#2980b9;

}

/* ==========================================
   RESTART BUTTON
========================================== */

#restartBtn{

background:#27ae60;

}

#restartBtn:hover{

background:#1e8449;

}

/* ==========================================
   CUSTOM SCROLLBAR
========================================== */

::-webkit-scrollbar{

width:8px;

}

::-webkit-scrollbar-track{

background:#1e272e;

border-radius:10px;

}

::-webkit-scrollbar-thumb{

background:#00c9a7;

border-radius:10px;

}

::-webkit-scrollbar-thumb:hover{

background:#00ffd5;

}
/* ==========================================
   RESPONSIVE DESIGN
========================================== */

@media screen and (max-width:992px){

.container{

max-width:95%;

padding:25px;

}

.button-group{

grid-template-columns:1fr;

}

#stats{

grid-template-columns:1fr;

}

}

@media screen and (max-width:768px){

body{

padding:15px;

}

.container{

padding:20px;

border-radius:18px;

}

h1{

font-size:30px;

}

.subtitle{

font-size:16px;

}

h2{

font-size:24px;

}

#question{

font-size:28px;

}

.quiz-info{

flex-direction:column;

gap:12px;

font-size:16px;

}

.progress-container{

height:14px;

}

table{

font-size:14px;

}

th,
td{

padding:10px;

}

.chart-card canvas{

max-width:260px;

}

button{

font-size:16px;

padding:14px;

}

}

@media screen and (max-width:480px){

.container{

padding:15px;

}

h1{

font-size:26px;

}

#question{

font-size:22px;

}

input,
select{

font-size:15px;

padding:12px;

}

button{

font-size:15px;

padding:12px;

}

.stat-box h3{

font-size:16px;

}

.stat-box p{

font-size:18px;

}

#achievement{

font-size:18px;

}

}

/* ==========================================
   DARK MODE
========================================== */

body.dark{

background:
linear-gradient(
135deg,
#000428,
#004e92
);

}

body.dark .container{

background:rgba(15,15,25,.85);

}

body.dark input,
body.dark select{

background:#1f2937;

color:white;

}

body.dark table{

background:#111827;

}

/* ==========================================
   LIGHT MODE
========================================== */

body.light{

background:#f4f7fb;

color:#222;

}

body.light .container{

background:white;

color:#222;

}

body.light input,
body.light select{

background:#f2f2f2;

color:#222;

}

body.light .stats-card,
body.light .leaderboard-card,
body.light .history-card,
body.light .chart-card{

background:#fafafa;

}

body.light table{

color:#222;

}

body.light thead{

color:white;

}

/* ==========================================
   THEME TOGGLE BUTTON
========================================== */

.theme-toggle{

position:fixed;

top:20px;

right:20px;

width:55px;

height:55px;

border-radius:50%;

display:flex;

justify-content:center;

align-items:center;

font-size:22px;

background:#00c9a7;

color:white;

cursor:pointer;

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

transition:.3s;

z-index:1000;

}

.theme-toggle:hover{

transform:rotate(180deg);

}

/* ==========================================
   FLOATING CARD EFFECT
========================================== */

.stats-card,
.chart-card,
.history-card,
.leaderboard-card{

transition:.35s;

}

.stats-card:hover,
.chart-card:hover,
.history-card:hover,
.leaderboard-card:hover{

transform:translateY(-8px);

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

}

/* ==========================================
   BUTTON ANIMATION
========================================== */

button{

overflow:hidden;

position:relative;

}

button::after{

content:"";

position:absolute;

width:0;

height:0;

left:50%;

top:50%;

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

border-radius:100%;

transform:translate(-50%,-50%);

transition:.5s;

}

button:active::after{

width:300px;

height:300px;

}

/* ==========================================
   INPUT HOVER
========================================== */

input:hover,
select:hover{

transform:translateY(-2px);

}

/* ==========================================
   TABLE ANIMATION
========================================== */

tbody tr{

animation:fadeIn .5s ease;

}

/* ==========================================
   BADGES
========================================== */

.badge{

display:inline-block;

padding:8px 18px;

border-radius:30px;

font-size:14px;

font-weight:600;

margin:5px;

color:white;

}

.beginner{

background:#27ae60;

}

.intermediate{

background:#2980b9;

}

.expert{

background:#8e44ad;

}

.champion{

background:#f39c12;

color:#222;

}

/* ==========================================
   HIGHSCORE
========================================== */

#highScore{

font-size:22px;

font-weight:bold;

color:#f1c40f;

text-align:center;

margin-top:20px;

}

/* ==========================================
   FOOTER
========================================== */

.footer{

margin-top:30px;

text-align:center;

font-size:14px;

opacity:.8;

}

/* ==========================================
   FADE CLASSES
========================================== */

.fade-in{

animation:fadeIn .6s ease;

}

.hidden{

display:none;

}

/* ==========================================
   CONFETTI CANVAS
========================================== */

canvas{

max-width:100%;

}

/* ==========================================
   SELECTION COLOR
========================================== */

::selection{

background:#00ffd5;

color:#111;

}
#clearLeaderboardBtn{
    background:#e74c3c;
}

#clearLeaderboardBtn:hover{
    background:#c0392b;
}

/* ==========================================
   END OF FILE
========================================== */