body {
    font-family: 'Inter', sans-serif;
    /* Add padding to respect the safe areas */
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
    user-select: none;
  -webkit-user-select: none; /* Chrome, Safari */
  -moz-user-select: none;    /* Firefox */
  -ms-user-select: none;     /* IE/Edge */
}
html, body {
    min-height: 100vh;
    min-height: -webkit-fill-available; /* Crucial for older iOS Safari versions */
    width: 100%;
}

html {
    height: -webkit-fill-available; /* Another Safari fix */
}
.card {
    background-color: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: none;
}

.btn-primary {
    background-color: #4f46e5;
    color: white;
}

.btn-primary:hover {
    background-color: #4338ca;
}

.btn-secondary {
    background-color: #e5e7eb;
    color: #1f2937;
}

.btn-secondary:hover {
    background-color: #d1d5db;
}

.option-btn {
    width: 100%;
    text-align: left;
    background-color: #f9fafb;
    color: #1f2937;
    border: 1px solid #d1d5db;
}

.option-btn:hover {
    background-color: #f3f4f6;
}

.option-btn.correct {
    background-color: #dcfce7;
    border-color: #22c55e;
    color: #166534;
}

.option-btn.incorrect {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.hidden {
    display: none;
}

#start-quiz-btn{
    margin-top: 2.5vh;
}

/* --- Mobile Font Size Adjustments --- */

/* This rule applies only to screens 768px wide or smaller */
@media (max-width: 768px) {

    /* Target the first span (the chapter name) inside the button */
    .chapter-btn > span:first-child {
        font-size: 0.875rem; /* Equivalent to Tailwind's text-sm (14px) */
    }

    /* Target the second span (the question count) */
    .chapter-btn > span.text-sm {
        font-size: 0.75rem; /* Equivalent to Tailwind's text-xs (12px) */
    }

}

/* Prevent the question count from wrapping on small screens */
.chapter-btn .text-sm {
    white-space: nowrap; /* This is the key property */
    flex-shrink: 0;      /* Prevents this item from shrinking */
    margin-left: 1rem;   /* Adds a nice gap between the items */
}
