/* Base font */
html, body, .quiz-shell, .quiz-shell * {
    font-family: Arial, Helvetica, sans-serif !important;
}

h1 {
    text-align: center;
}
/* MAIN WRAPPER */
.quiz-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 0;
    gap: 2rem;
    text-align: center;
}

/* FORM SETTINGS (deduped & corrected) */
.quiz-settings {
    background: #f8dfea;
    border: 2px solid #e4b9c9;
    border-radius: 14px;
    padding: 1.5rem;
    max-width: 700px;
    width: 100%;
    margin: 0 auto 2rem auto;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Form labels */
.quiz-settings label {
    font-weight: 700;
    margin-bottom: 0.4rem;
    display: block;
    text-align: center;
}

/* Selects + Inputs */
.quiz-settings select,
.quiz-settings input[type="number"] {
    background-color: #e89cb5;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 0.8rem;
    width: 80%;
    max-width: 400px;
    margin: 0.5rem auto 1rem auto;
    font-size: 1rem;
    display: block;
    cursor: pointer;
    transition: 0.15s ease;
}

.quiz-settings select:hover {
    background-color: #d37997;
}

.quiz-settings select:focus {
    outline: none;
    box-shadow: 0 0 6px rgba(216, 120, 150, 0.6);
}

/* Buttons */
.quiz-settings button,
#submit-quiz,
.quiz-home {
    background-color: #e89cb5;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 0.9rem 1.2rem;
    width: 100%;
    max-width: 300px;
    cursor: pointer;
    transition: 0.2s ease;
    margin: 1rem auto 0 auto;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.quiz-home-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.quiz-settings button:hover,
#submit-quiz:hover,
.quiz-home:hover {
    background-color: #d37997;
}

.quiz-settings button:active,
#submit-quiz:active,
.quiz-home:active {
    transform: scale(0.96);
    background-color: #b85d7e;
}

/* Question cards */
.question {
    
   width: 100%;
    max-width: 700px;
    margin: 0 auto;

    background: #f8dfea;
    border-radius: 14px;
    padding: 1.4rem;
    border: 2px solid #e4b9c9;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    text-align: center;
}

.question h3 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.question label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: center;
    margin: 0.4rem 0;
    background-color: #e89cb5;
    color: white;
    padding: 0.55rem 0.9rem;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s ease;
}

.question label:hover {
    background-color: #d37997;
}

.question input[type="radio"]:checked + span,
.question label:has(input[type="radio"]:checked) {
    background-color: #d37997;
    box-shadow: 0 0 14px rgba(216, 120, 150, 0.6);
    transform: scale(1.03);
}

.quiz-result {
    background: #f8dfea;
    border: 2px solid #e4b9c9;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

#submit-quiz {
  display: block;
  margin: 1rem auto 0 auto;
}

/* Hint */
.hint {
    font-size: 0.85rem;
    color: #333;
    margin-top: 0.4rem;
}

/* Result page */
.result-shell {
    max-width: 600px;
    margin: 3rem auto;
    text-align: center;
}


    .result-card {
        background: #f8dfea;
        border: 2px solid #e4b9c9;
        border-radius: 16px;
        padding: 2rem;
        box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    }

    .result-buttons a {
        display: inline-block;
        margin: 0.6rem;
        padding: 0.75rem 1.4rem;
        background: #e89cb5;
        color: #fff;
        border-radius: 12px;
        text-decoration: none;
        transition: 0.15s ease;
    }

    .result-buttons a:hover {
        background: #d37997;
    }
/* ================= MOBILE STYLES ================= */
@media (max-width: 600px) {

/* Increase base font size */
    html {
        font-size: 18px;
    }

    body {
        font-size: 1rem;
    }

  /* Overall layout */
  .quiz-layout {
    padding: 0.5rem;
    gap: 1rem;
  }

  /* Settings box */
  .quiz-settings {
    padding: 1rem;
  }

  /* Make inputs full width */
  .quiz-settings select,
  .quiz-settings input[type="number"] {
    width: 100%;
    max-width: 100%;
    font-size: 1.1rem;
  }

  /* Buttons full width */
  #submit-quiz,
  .quiz-settings button {
    width: 100%;
    max-width: 100%;
    font-size: 1.1rem;
    padding: 1rem;
  }

  /* Question cards tighter */
  .question {
    padding: 1rem;
  }

  /* Question text */
  .question h3 {
    font-size: 1.1rem;
  }

  /* Answer layout */
  .question label {
    flex-direction: row;
    justify-content: flex-start;   /* align left for readability */
    text-align: left;
    padding: 0.8rem;
    font-size: 1rem;
  }

  /* Make radio buttons easier to tap */
  .question input[type="radio"] {
    transform: scale(1.3);
    margin-right: 0.6rem;
  }

  /* Result boxes */
  .result-card,
  .quiz-result {
    padding: 1.2rem;
  }



.question label {
  border: 2px solid transparent;
}

.question input[type="radio"]:checked + span,
.question label:has(input[type="radio"]:checked) {
  border-color: #d37997;
}
}

