/* Layout */
.sub-container {
  padding: 16px;
  max-width: 720px;
  margin: auto;
}

/* Hero */
.subject-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  padding: 20px;
  border-radius: 14px;
  margin-bottom: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.05);
}

.subject-hero h1 {
  font-size: 22px;
}

.underline {
  text-decoration: underline;
  font-weight: bold;
}

.exam-container{
  display: grid;
  grid-template-columns: 1fr;
  height: 90vh;
}


.questions{
  font-size: 22px;
  font-family: Arial, Helvetica, sans-serif;
  margin-bottom: 12px;
  padding: 0;
  line-height: 1.5;
}


.option-grid {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  gap: 8px;
}

label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 20px;
  width: 100%;
  padding: 8px;
  background-color: white;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 0px;
}

label input {
  display: none;
}

.custom-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* check icon */
.custom-radio::after {
  content: "✓";
  font-size: 14px;
  color: white;
  display: none;
}

/* selected state */
.option input:checked + .custom-radio {
  background: #22c55e;
  border-color: #22c55e;
}

.option input:checked + .custom-radio::after {
  display: block;
}

/* highlight selected row */
.option input:checked ~ .option-text {
  font-weight: 600;
}

/* highlight selected row */
.option input:checked ~ .option-text, .option input:checked ~ .custom-radio {
  transition: 0.2s;
}

label:hover {
  border: 2px solid rgb(149, 149, 209);
}



.timer-con {
  display: flex;
}
.timer-box{
  background-color: red;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  color: white;
  margin: 0;
}

.ctrl-nav{
  display: flex;
  justify-content: center;
  margin-top: 20px;
  gap: 100px;
}

.ctrl-nav button, .submit button{
  width: 100px;
  color: white;
  font-size: 15px;
  border-radius: 10px;
  border: none;
  padding: 10px 20px;
  background-color: rgb(31, 31, 202);
}

.submit button {
  background-color: green;
}
.submit{
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  align-items: center;
}
.ctrl-nav button:hover, .submit button:hover{
  cursor: pointer;
  opacity: 0.9;
}



@media (max-width: 768px) {

  .subject-hero {
    flex-direction: column;
    gap: 12px;
    justify-content: center;
  }
  
  .subject-hero h1 {
      font-size: 20px;
  }
   
  .hero h1 {
      font-size: 22px;
  }

  .timer-box {
    font-size: 16px;
  }

  .questions {
    font-size: 20px;
  }

  label {
    font-size: 18px;
  }

  .ctrl-nav {
    gap: 70px;
  }
}

@media (min-width: 1024px) {
  .sub-container {
      max-width: 1000px;
  }

}


.fraction {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
}

.fraction .top{
  border-bottom: 1px solid #000;
  padding: 0 4px;
  line-height: 1.0;
}

.fraction .bottom {
  padding: 0 4px;
  line-height: 1.0;
}

.fractionU {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
}

.fractionU .topU{
  display: block;
  border-bottom: 1px solid #000;
  padding: 0 4px;
  line-height: 1.0;
}

.fractionU .bottomU {
  display: block;
  border-top: 1px solid #000;
  padding: 0 4px;
  line-height: 1.0;
  margin-top: -1.55em;
}

label .top{
  display: block;
  border-bottom: 1px solid #000;
  padding: 0 4px;
}

label .bottom{
  display: block;
  padding: 0 4px;
}

.option-text {
    display: inline-block;
    line-height: 1.2;
}

sub, sup {
    font-size: 65%;
    }
    
.option-text sub {
    font-size: 65%;
    vertical-align: sub;
}
.option-text sup {
    font-size: 65%;
    vertical-align: super;
}
