* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width:100%;
  align-items: center;
  justify-content: center;
  color: #333;
}
body.unscroll{
  overflow: hidden;
}
.home{
  display: flex;
  flex-direction: column;     
  justify-content: space-between;
  min-height: 100vh;
  width: 100%;
}
.home .header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 50px; 
  background: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05); 
}
.home .header .logo{
  width: 96px;
  height: 54px;
}
.home .header nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}
.home .header nav a {
  text-decoration: none;
  color: #333;
  font-weight: 600;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

/* --- Desktop Hovers --- */
@media (hover: hover) {
  .home .header nav a:hover {
    color: #0056b3;
  }
}

.page-section {
  width: 100%;
  padding: 80px 20px;
  text-align: center;
  background-color: #f8f9fa;
}
.page-section:nth-of-type(even) {
  background-color: #fff;
}

.page-section h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #0056b3;
}

.page-section p {
  font-size: 1.1rem;
  color: #555;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.6;
}

footer {
  width: 100%;
  background-color: #222;
  color: #fff;
  text-align: center;
  padding: 25px 0;
  margin-top: auto;
}
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 60px 20px;
  flex: 1;
}

.main-intro {
  text-align: center;
  margin-bottom: 50px;
}

.main-intro h1 {
  font-size: 2.5rem;
  color: #003370;
  margin-bottom: 10px;
}

.main-intro p {
  color: #666;
  font-size: 1.1rem;
}

.stream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  width: 100%;
}

.stream-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Desktop Hovers --- */
@media (hover: hover) {
  .stream-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 86, 179, 0.1);
    border-color: #0056b3;
  }
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.stream-card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #333;
}

.stream-card p {
  color: #777;
  font-size: 0.95rem;
  margin-bottom: 25px;
}
.subject-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn-subject {
  background-color: #f0f7ff;
  color: #0056b3;
  border: 2px solid #0056b3;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

/* --- Desktop Hovers --- */
@media (hover: hover) {
  .btn-subject:hover {
    background-color: #0056b3;
    color: #fff;
  }
}

.locked {
  background-color: #f9f9f9;
  opacity: 0.8;
  cursor: not-allowed;
}

.coming-soon-badge {
  background: #eee;
  color: #888;
  padding: 6px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}


.stream-toggle {
  width: 100%;
  padding: 15px 20px;
  background: #fff;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  transition: background 0.3s;
}

/* --- Desktop Hovers --- */
@media (hover: hover) {
  .stream-toggle:hover {
    background: #f0f7ff;
  }
}

.stream-content {
  display: none;
  flex-direction: column;
  padding: 10px;
  background: #fafafa;
  border-top: 1px solid #eee;
}
.stream-container.active .stream-content {
  display: flex;
}

.stream-container.active .stream-toggle span {
  transform: rotate(180deg);
}

.btn-subject {
  width: calc(100% - 20px);
  margin: 5px 10px !important;
  text-align: center;
}
.confirm {
  display: none;
}
.quiz-wrapper {
  width: 100%;
  max-width: 900px;
  background-color: #fff;
  padding: 20px;
  border: 1px solid #dee2e6;
  position: relative;
  display: none;
}
.home-btn {
  width: 3em;
  height: 3em;
  border: none;
  background: none;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  border-radius: 50%;
}

.X,
.Y {
  position: absolute;
  width: 1.5em;
  height: 2px;
  background-color: #000;
  transition: background-color 0.2s;
}

.X {
  transform: rotate(45deg);
}

.Y {
  transform: rotate(-45deg);
}

/* --- Desktop Hovers --- */
@media (hover: hover) {
  .home-btn:hover {
    background-color: #0056b3;
  }
  .home-btn:hover .X,
  .home-btn:hover .Y {
    background-color: #fff;
  }
  .home-btn:hover > .close {
    animation: close 0.2s forwards 0.5s;
  }
}

.home-btn:active {
  transform: scale(0.95);
}

.close {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 4em;
  height: 1.7em;
  font-size: 12px;
  background-color: #333;
  color: #fff;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
}

@keyframes close {
  100% {
    opacity: 1;
  }
}
.startConfrmOverlay{
  z-index: 1001;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  display: none;
}
.exam-extras {
  
  width: 100%;
  max-height: 400px;
  background: #fdfdfd;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.exam-extras .instruction {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  border-left: 4px solid #d9534f;
  padding-left: 10px;
}
.exam-extras .paragraph {
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
  font-style: italic;
  background: #ffffff;
  padding: 15px;
  border-radius: 4px;
}
.exam-extras .diagram {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  background: #fff;
}

.exam-extras .diagram img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.startExamConfirm{
  display: flex;
  flex-direction: column;
  gap: 30px;
  background: #fff;
  text-align: center;
  z-index: 1002;
  position:fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 25px;
}
.startExamConfirm .c{
  font-weight: 550;
  font-size: 1.4rem;
  text-transform: uppercase;
}
#numOfQs{
  color:#0056b3;
}
.startExamBtn{
  display: block;
}
.question-card {
  background-color: #e7f3ff;
  border-radius: 4px;
  padding: 25px;
  margin-bottom: 40px;
}
.question-text {
  font-size: 1.05rem;
  margin-bottom: 20px;
  line-height: 1.4;
}
.options-list {
  padding: 0;
}
.option-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  cursor: pointer;
}
.option-item input[type="radio"] {
  margin-right: 12px;
  cursor: pointer;
}

.option-label {
  font-size: 0.95rem;
}
.clear-choice {
  display: none;
  margin-top: 15px;
  font-size: 0.85rem;
  color: #0056b3;
  text-decoration: none;
}

/* --- Desktop Hovers --- */
@media (hover: hover) {
  .clear-choice:hover {
    text-decoration: underline;
  }
}

.clear-choice:active {
  transform: scale(0.97);
}
.nav-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eee;
  padding-top: 20px;
}
.left-btns {
  display: flex;
  align-items: center;
  gap: 25px;
  width: 100%;
}
.btn {
  cursor: pointer;
  background-color: #0056b3;
  border: none;
  color: #fff;
  padding: 9px 36px;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 10px;
  text-align: center;
}
.btn:active {
  transform: scale(0.97);
}
.btn-prev {
  background-color: #f1f1f1;
  color: #555;
  border: 1px solid #ccc;
}

/* --- Desktop Hovers --- */
@media (hover: hover) {
  .btn-prev:hover {
    background-color: #e2e2e2;
  }
  .btn-next:hover {
    background-color: #004494;
  }
}

.btn-prev:active {
  background-color: #d4d4d4;
}
.btn-next {
  background-color: #0056b3;
}

.btn-next:active {
  background-color: #003370;
}
.btn-submit {
  display: none;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.endScreen {
  display: none; /* show it later with JS */
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100%;
  max-width: 400px;
  padding: 30px;

  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);

  text-align: center;
}

.endScreen h2 {
  margin-bottom: 10px;
  font-size: 24px;
}

.endScreen p {
  font-size: 18px;
  margin-bottom: 20px;
}
#scoreSpan {
  font-weight: bold;
}
.restart-btn-container {
  width: 100%;
  display: flex;
  justify-content: center;
}
.btn-restart {
  background: #0056b3;
}

/* --- Desktop Hovers --- */
@media (hover: hover) {
  .btn-restart:hover {
    background-color: #004494;
  }
}

.btn-restart:active {
  background-color: #003370;
}

@media screen and (max-width: 768px) {
  .home .header{
    justify-content: center;
  }
  .home .header nav {
    display: none;
  }
}
