body{
  margin:0;
  font-family:Arial, sans-serif;
  background:linear-gradient(135deg,#0066ff,#00c6ff);
  display:flex;
  justify-content:center;
  align-items:center;
  height:100vh;
}

.container{
  background:white;
  padding:20px;
  border-radius:15px;
  width:90%;
  max-width:350px;
  text-align:center;
}

h1{
  color: black;
    width:92%;
  padding:12px;
  margin-top:10px;
  border: black;
  border-radius:8px;
  background: lightgrey;
  color: black;
  font-weight:bold;
  text-align: center;
}

input, select{
  width:100%;
  padding:12px;
  margin:8px 0;
  border-radius:8px;
  border:1px solid #ddd;
}

button{
  width:100%;
  padding:12px;
  margin-top:10px;
  border:none;
  border-radius:8px;
  background:#0066ff;
  color:white;
  font-weight:bold;
}

.loginBtn{
  background:#00c6ff;
}

#status{
  margin-top:10px;
  font-size:14px;
  color:green;
}




.answers button.correct {
  background-color: #4CAF50; /* vert */
  color: white;
}

.answers button.wrong {
  background-color: #f44336; /* wouj */
  color: white;
}

.answers button.disabled {
  pointer-events: none;
  opacity: 0.6;
}



.answerBtn.correct{
  background:#2ecc71 !important;
  animation:pop 0.3s ease;
}

.answerBtn.wrong{
  background:#e74c3c !important;
  animation:shake 0.3s;
}

@keyframes pop{
  0%{transform:scale(1)}
  50%{transform:scale(1.1)}
  100%{transform:scale(1)}
}

@keyframes shake{
  0%,100%{transform:translateX(0)}
  25%{transform:translateX(-5px)}
  75%{transform:translateX(5px)}
}

/* ================= SUBJECT BUTTON ================= */

.subjectBtn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 10px;
  margin: 10px 0;
  
  background: linear-gradient(135deg, #1e2a38, #243447);
  border: none;
  border-radius: 14px;
  
  color: white;
  font-size: 16px;
  font-weight: 600;
  
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  
  transition: all 0.25s ease;
}

/* Hover effect */
.subjectBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.3);
}

/* Click effect */
.subjectBtn:active {
  transform: scale(0.97);
}

/* ================= LEFT SIDE (LOGO + NAME) ================= */

.subjectLeft {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Logo circle */
.subjectLogo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffffff22;
  
  display: flex;
  align-items: center;
  justify-content: center;
  
  font-size: 22px;
  overflow: hidden;
}

/* If using image logo */
.subjectLogo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Subject name */
.subjectName {
  font-size: 17px;
  font-weight: 600;
}

/* ================= RIGHT SIDE (PERCENT + ARROW) ================= */

.subjectRight {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Progress percentage */
.subjectPercent {
  background: #ffffff22;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 13px;
}

/* Arrow */
.subjectArrow {
  font-size: 18px;
  opacity: 0.8;
  transition: transform 0.3s;
}

.subjectBtn:hover .subjectArrow {
  transform: translateX(4px);
}

.examQuestion{
background:#1e2a38;
padding:12px;
border-radius:10px;
margin-bottom:12px;
}

.submitExamBtn{
background:#2ecc71;
color:white;
padding:12px;
border:none;
border-radius:8px;
width:100%;
font-weight:bold;
}

.resultBar{
height:8px;
background:linear-gradient(90deg,#2ecc71,#27ae60);
border-radius:6px;
margin:10px 0;
}

.correctionItem{
background:#243447;
padding:10px;
border-radius:8px;
margin:8px 0;
font-size:14px;
}


/* ================= GLOBAL ================= */
body {
  font-family: Arial, sans-serif;
  background: #f4f6f9;
  margin: 0;
  padding: 0;
  color: #333;
}

.container {
  max-width: 900px;
  margin: auto;
  padding: 20px;
}

/* ================= SUBJECT BUTTON ================= */
.subjectBtn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1e2a38;
  color: #fff;
  border: none;
  border-radius: 10px;
  margin: 10px 0;
  padding: 15px 20px;
  cursor: pointer;
  font-size: 18px;
  transition: 0.3s;
}


.subjectBtn:hover {
  background: #2980b9;
}

.subjectBtn .subjectLeft {
  display: flex;
  align-items: center;
  gap: 15px;
}

.subjectLogo {
  font-size: 30px;
  width: 40px;
  text-align: center;
}

.subjectName {
  font-weight: bold;
}

.subjectRight {
  display: flex;
  align-items: center;
  gap: 10px;
}

.subjectPercent {
  background: #2ecc71;
  padding: 5px 10px;
  border-radius: 20px;
  font-weight: bold;
  color: #fff;
}

.subjectBtn .subjectRight::after {
  content: "🔜";
  font-size: 20px;
}

/* ================= QUIZ AREA ================= */
#quizArea h2, #quizArea h4 {
  margin: 10px 0;
}

.answers {
  margin-top: 15px;
}

/* ================= LESSON BUTTONS ================= */
.answerBtn, .levelBtn, .finalBtn, .nextBtn {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}

.answerBtn {
  background: black;
  color: #fff;
}

.answerBtn:hover:not(.disabled) {
  background: black;
}

.levelBtn {
  background: black;
  color: #fff;
}

.finalBtn {
  background: #e67e22;
  color: #fff;
}

.nextBtn {
  background: #e67e22;
  color: #fff;
}

.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ================= EXAM SHEET ================= */
.examQuestion {
  background: #ecf0f1;
  padding: 15px;
  margin: 10px 0;
  border-radius: 10px;
}

.examQuestion strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
}

.examQuestion label {
  display: block;
  margin: 5px 0;
  cursor: pointer;
}

input[type="radio"], input[type="checkbox"] {
  margin-right: 10px;
}

/* ================= MATCH STYLE ================= */
.matchContainer {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.matchPart {
  flex: 1;
}

.matchPart ol {
  padding-left: 20px;
}

.matchPair input {
  width: 60px;
  margin-right: 10px;
  padding: 3px;
}

/* ================= CORRECTION ================= */
#answers div p {
  background: #fff;
  border-left: 5px solid #3498db;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
}

#answers div p span.correct {
  color: #2ecc71;
  font-weight: bold;
}

#answers div p span.wrong {
  color: #e74c3c;
  font-weight: bold;
}

/* ================= SHARE BUTTON ================= */
.nextBtn:hover {
  opacity: 0.9;
}



/* =============================== */
/* GLOBAL STYLE FOR BODY           */
/* =============================== */


/* =============================== */
/* CONTAINER (MAIN FORM)          */
/* =============================== */

#status {
  margin-top: 10px;
  font-weight: bold;
}

/* =============================== */
/* POPUP OVERLAY                   */
/* =============================== */
.popup-overlay {
  position: fixed;
  top: 10%; /* monte popup pi wo sou ekran */
  left: 0;
  width: 100%;
  height: 90%; /* limite wotè pou li pa kouvri bouton anba */
  display: flex;
  align-items: flex-start; /* mete kontni an sou tèt */
  justify-content: center;
  padding-top: 20px; /* ti espas sou tèt */
  z-index: 9999;
}

.popup-content {
  background: white;
  padding: 25px 30px;
  border-radius: 12px;
  text-align: center;
  max-width: 300px;
  width: 90%;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  animation: popupFade 0.3s ease-in-out;
  max-height: 80vh; /* evite depase ekran */
  overflow-y: auto; /* scroll si twò long */
}

.popup-content p {
  margin-bottom: 15px;
  font-size: 16px;
  color: #333;
}

.popup-content input {
  width: 80%;
  padding: 8px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 15px;
}

.popup-content button {
  padding: 8px 20px;
  border-radius: 6px;
  border: none;
  background-color: #2196F3;
  color: white;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s;
}

.popup-content button:hover {
  background-color: #1976D2;
}

/* =============================== */
/* ANIMATION FOR POPUP             */
/* =============================== */
@keyframes popupFade {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
