/* Base layout */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding-left: 10px;
  padding-right: 10px;
  height: 100vh;
  position: relative;
  overflow: hidden;

  /* Flexbox layout */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Background image */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("images/light-grey-abstract-background-hd-cool-7-2.jpg"); /* 👈 change to your actual image path */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
}

/* Overlay */
body::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(170, 171, 181, 0.15); /* 👈 dark bluish overlay */
  z-index: -1;
}

/* INDEX PAGE - DARK MODE */
.welcome-box {
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.welcome-box:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.welcome-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #00dbde, #fc00ff);
}

.welcome-box h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
  letter-spacing: -0.9px;
  color: #fff;
  background: linear-gradient(90deg, #fff, #c9d6ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 1;
}

.welcome-box p {
  font-size: 0.95rem;
  margin-bottom: 2rem;
  color: rgba(220, 223, 243, 0.8);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  position: relative;
  z-index: 1;
  letter-spacing: -0.2px;
}

.start-btn {
  padding: 0.9rem 2rem;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #00dbde 0%, #fc00ff 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 4px 15px rgba(0, 219, 222, 0.3);
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(0, 219, 222, 0.4),
    0 6px 20px rgba(252, 0, 255, 0.3);
}

.start-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fc00ff 0%, #00dbde 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.start-btn:hover::before {
  opacity: 1;
}

/* Floating particles background effect */
.welcome-box::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 219, 222, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 80% 70%, rgba(252, 0, 255, 0.1) 0%, transparent 20%);
  pointer-events: none;
}

@media (max-width: 768px) {
  .welcome-box {
    padding: 0.4rem;
    margin: 0 1rem;
    padding-bottom: 2rem;
    padding-top: 2rem;
  }
  
  .welcome-box h1 {
    font-size: 1.8rem;
    line-height: 1.3;
  }
  
  .welcome-box p {
    font-size: 0.89rem;
    line-height: 1.5;
  }
  
  .start-btn {
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
  }

  body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding-left: 15px;
  padding-right: 15px;
  height: 100vh;
  position: relative;
  overflow: hidden;
}
}

/* Powered by Section */
.powered-by-section {
  margin-top: 50px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  display: block;  /* ensures this section stacks below */

}

.powered-by {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.81rem;
  color: #888;
  opacity: 0.9;
  letter-spacing: -0.4px;
  margin-top: -99.4px;
}

.powered-by .logo {
  width: 140px;
  height: 52px;
}

@media (max-width: 768px) {
  .powered-by .logo {
  width: 80px;
  height: 33px;
}
}


/* QUIZ PAGE - DARK MODE */

#quiz-box {
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 90%;
  max-width: 600px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease;
  
}

#quiz-box:hover {
  transform: translateY(-3px);
}

#quiz-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #00dbde, #fc00ff);
}

/* Question text */
#question {
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  letter-spacing: -0.3px;
  color: #e1e3f3;
  font-weight: 600;
  line-height: 1.4;
  position: relative;
  z-index: 1;
  letter-spacing: -0.5;
}

/* Timer */
#timer {
  font-size: 1.2rem;
  color: #ff6b6b;
  font-weight: bold;
  margin-bottom: 1.5rem;
  background-color: rgba(255, 107, 107, 0.1);
  padding: 0.8rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-left: 3px solid #ff6b6b;
  position: relative;
  z-index: 1;
}

/* Option buttons */
.option {
  display: block;
  width: 100%;
  padding: 1rem 1.5rem;
  margin: 0.5rem 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  color: #e0e0ff;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.option::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(to bottom, #00dbde, #fc00ff);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s ease;
}

.option:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(8px);
}

.option:hover::before {
  transform: scaleY(1);
}

/* Next button */
#next {
  margin-top: 1.5rem;
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, #00dbde 0%, #fc00ff 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 4px 15px rgba(0, 219, 222, 0.3);
 
  
}

#next:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(0, 219, 222, 0.4),
    0 6px 20px rgba(252, 0, 255, 0.3);
}

#next:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Result text */
#result {
  margin-top: 1.2rem;
  font-weight: 600;
  font-size: 1.1rem;
  font-family: 'Inter', sans-serif;
  min-height: 1.5rem;
  color: #c9d6ff;
  letter-spacing: -0.3px;
}

/* Correct answer styling */
.correct {
  background: rgba(0, 255, 136, 0.1) !important;
  border-color: #00ff88 !important;
  color: #00ff88 !important;
}

/* Wrong answer styling */
.wrong {
  background: rgba(255, 56, 96, 0.1) !important;
  border-color: #ff3860 !important;
  color: #ff3860 !important;
}

/* Animated icon */
.icon {
  float: right;
  font-size: 1.2rem;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.show {
  opacity: 1;
  transform: scale(1);
}

/* Progress bar */
.progress-container {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin: 1.5rem 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #00dbde, #fc00ff);
  transition: width 0.4s ease;
}

/* Responsive for small devices */
@media (max-width: 480px) {
  #quiz-box {
    padding: 1.5rem;
    padding-bottom: 0.4px;
    
  }

  #question {
    font-size: 1.2rem;
  }

  .option {
    font-size: 0.95rem;
    padding: 0.9rem 1.2rem;
  }

  #next {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
    margin-bottom: 15px;
  
  }
  
  #timer {
    font-size: 1.1rem;
    padding: 0.6rem;
  }

}

/* Buttons double */
.quiz-footer {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.quiz-footer button,
.quiz-footer a {
  background: linear-gradient(135deg, #00dbde, #2c96c1);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  padding: 0.75rem 1.6rem;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quiz-footer button:hover,
.quiz-footer a:hover {
  background: linear-gradient(135deg, #fc00ff, #00dbde);
  transform: translateY(-2px);
}

@media (max-width: 480px) {
  .quiz-footer {
    flex-wrap: nowrap;        /* Prevent wrapping, force side by side */
    gap: 12px;                /* Slightly smaller gap */
  }

  .quiz-footer button,
  .quiz-footer a {
    padding: 0.5rem 1rem;     /* Smaller padding */
    font-size: 0.85rem;       /* Smaller font size */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15); /* lighter shadow */
  }
.quiz-footer {
  margin-top: 20px;

}

}


/* ===== GLOBAL BOX-SIZING ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ===== TYPED QUIZ PAGE - DARK THEME ===== */
#quiz-box {
  background-color: #1e1e1e;
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 4rem auto;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);

  min-height: 70vh;              /* Ensure it's tall enough on large screens */
  max-height: 90vh;              /* Prevent it from overflowing too far */
  margin-top: -20px;
  margin-bottom: 0px;
 
}


/* 🔹 Question & Timer */
#question {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #eeeeee;
}
#timer {
  font-size: 1rem;
  color: #f0a500;
  margin-bottom: 1rem;
}

/* 🔹 Typing input box */
#answerInput {
  width: 100%;
  padding: 12px 16px;
  font-size: 1.1rem;
  border: 2px solid #444;
  border-radius: 8px;
  background-color: #2b2b2b;
  color: #dfe2f4;
  margin: 0 auto 1rem;
  display: block;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
#answerInput:focus {
  outline: none;
  border-color: #4CAF50;
}

/* 🔹 Buttons as inline-block to wrap */
#submitAnswer,
#next {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 12px 25px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin: 10px 5px;
  font-family: 'Poppins', sans-serif;
  text-align: center;

}

#submitAnswer {
  background-color: #4364be;
  color: white;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  font-weight: 500;
}
#submitAnswer:hover:not(:disabled) {
  background-color: #3b55a5;
}
#submitAnswer:disabled {
  background-color: #555;
  cursor: not-allowed;
  box-shadow: none;
}

#next {
  background-color: #009688;
  color: white;
  border: none;
  font-weight: 600;

}
#next:hover:not(:disabled) {
  background-color: #00796b;
}
#next:disabled {
  background-color: #444;
  cursor: not-allowed;
}

/* 🔹 Feedback & Result */
#feedback {
  font-size: 1.1rem;
  margin-top: 10px;
  font-weight: 500;
  text-align: center;
}
#feedback.correct { color: #4CAF50; }
#feedback.wrong   { color: #e53935; }

#result {
  font-size: 1.2rem;
  margin-top: 20px;
  font-weight: bold;
  color: #90caf9;
  text-align: center;
}

/* 🔹 Footer and Powered By */
.quiz-footer,
.powered-by-section {
  text-align: center;
  margin-top: 2rem;
  color: #bbb;

}
.powered-by img.logo {
  height: 37px;
  width: 106px;
  margin-right: 8px;
  vertical-align: middle;
}

/* ===== MOBILE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  #quiz-box {
    margin: 2rem 1rem;
    padding: 1.5rem;
    margin-top: -0px;
    margin-bottom: 0px;
  }
  #question {
    font-size: 1.1rem;
  }
  #timer {
    font-size: 0.9rem;
  }
  #answerInput {
    font-size: 1rem;
    padding: 10px 12px;
  }
  #submitAnswer,
  #next {
    font-size: 0.95rem;
    padding: 10px 16px;
    margin: 8px 4px;
   
  }
  #result {
    font-size: 1.1rem;
  }

  #quiz-box {
  background-color: #1e1e1e;
  padding: 2rem 1rem;
  max-width: 900px;
  margin: 4rem auto;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);

  min-height: 50vh;              /* Ensure it's tall enough on large screens */
  max-height: 90vh;              /* Prevent it from overflowing too far */
  margin-top: -20px;
  margin-bottom: 0px;
 
}

}

/* SELECT QUIZ TYPE PAGE */
/* === Select Quiz Section Layout === */
.select-quiz-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
 
}

/* === Quiz Box Styling === */

/* === Heading & Paragraph === */
.quiz-box h1 {
  font-size: 28px;
  color: #d2d9f4;
  margin-bottom: 10px;
}

.quiz-box p {
  color: #ccc;
  font-size: 16px;
  margin-bottom: 30px;
  letter-spacing: -0.3px;
  font-family: 'Inter', sans-serif;
}

/* === Button Group === */
.button-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* === Buttons === */
.quiz-button {
  padding: 0.9rem 2rem;
  font-size: 1rem;
  background: linear-gradient(135deg, #00dbde 0%, #fc00ff 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: 0 4px 15px rgba(0, 219, 222, 0.3);
  text-decoration: none; /* <-- This removes underline */
  letter-spacing: -0.2px;
}



.quiz-button:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 6px 20px rgba(0, 219, 222, 0.4),
    0 6px 20px rgba(252, 0, 255, 0.3);
}

/* === Responsive Layout === */
@media (max-width: 480px) {
  .quiz-box {
    padding: 2rem 1.2rem;
  }

  .quiz-button {
    font-size: 16px;
    padding: 12px 18px;
  }

  .quiz-box h1 {
    font-size: 24px;
  }
}
