

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
      background-color: #0f172a;
        min-height: 100vh;
  display: flex;
  flex-direction: column;
}


section {
  flex: 1;
    display: flex;
    flex-direction: column
}
.logo{
    width: 180px;
}
.logo-link {
        position: fixed;
    top: 0px;
    left: 0px;
    z-index: 999;
}
.disappear {
    display: none;
}
h1 {
    font-family: georgia;
}
p {
    font-family: Arial, Helvetica, sans-serif
}
.welcome-screen {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    row-gap: 20px;
   
    flex: 1;
    padding: 80px 20px 40px;

}
.welcome-screen:not(.disappear) {
    display: flex;
}
.welcome-text{
    font-size: 40px;
    text-align: center;
    color:  #2563eb;
    word-spacing: 5px;
    white-space: nowrap;

}
.category-text {
        font-size: 30px;
    text-align: center;
    color:  #2563eb;
    word-spacing: 5px;
    white-space: nowrap;

}

.welcome-p {
    font-size: 23px;
    color: #5b21b6;
    pointer-events: none;
}
.disabled{
    opacity: 50%;
    cursor: not-allowed;
    pointer-events: none;
}
.start {
    border-radius: 5px;
    margin-top: 30px;
   padding: 12px 25px;
    border-radius: 8px;
    font-size: 20px;
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.start:hover {
    background-color: #3b82f6;
    transform: translateY(-2px); /* little lift on hover */
}

.category-screen {
    margin-top: 10vh;
}
.card-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding-top: 30px;
    max-width: 90%;
    margin: 10px auto 0px;
    column-gap: 15px;
    row-gap: 10px;
    max-height: 50vh;
    overflow-y:scroll;
    scrollbar-width: none;

}
.card {
    background-color: #1e293b;
    border-radius: 10px;
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    cursor: pointer;
    
}
.card h2{
    color: #facc15;
}
.card p{
    color: #cbd5e1;
}
.card:hover {
    background-color: #374151;

}
.card.active {
    background-color: #1e3a8a;
    border: 2px solid #2563eb;
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
}

.card.active h2 {
    color: #60a5fa;
}

.card.active p {
    color: #e2e8f0;
}
.button-div{
    display: flex;
    max-width: 70%;
    margin: 30px auto 10px;
    justify-content: space-between;
    padding: 0px 10px 10px;

}
.button-div button{
    padding: 12px 28px;
    border-radius: 8px;
    border: none;
    font-size: 17px;
    font-weight: 600;
    transition: all 0.3s ease;
}
.button-div button:not(.disabled) {
    cursor: pointer;
}
.button-div2 button.active {
    background-color: #2563eb;
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 0 16px rgba(37, 99, 235, 0.5);
    transform: translateY(-3px);
}
.button-div button:first-of-type {
    background-color: transparent;
    color: #cbd5e1;
    border: 2px solid #475569;
}
.button-div button:first-of-type:hover{
    background-color: #1e293b;
    border-color: #64748b;
    transform: translateY(-2px);
}
.button-div button:nth-of-type(2) {
    background-color: #2563eb;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.button-div button:nth-of-type(2):hover {
    background-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
}

 .button-div2{
    display: flex;
    width: 90%;
    justify-content: space-around;
    margin: 40px auto;
}

.button-div2 button{
    width: 90px;
    height: 55px;
    border-radius: 10px;
    border: 2px solid #334155;
    background-color: #1e293b;
    color: #e2e8f0;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}
.button-div2 button {
    border: 2px solid #1e4d6b;
    background-color: #0f2d4a ;
    color:#7dd3fc;

}

.button-div2 button:hover {
    background-color: #0ea5e9;
    border-color: #38bdf8;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
}
/* For when I add javascript */

.settings1, .settings2 {
    margin: auto;
    background-color: #0a1f2e;
    border: 1px solid  #1e4d6b;
    padding: 36px 36px 44px; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    max-width: 650px;
    width: 90%;
    border-radius: 14px;
}
.settings1:not(.disappear),
.settings2:not(.disappear) {
    display: flex;
    flex-direction: column;
}
.settings-text {
        font-size: 25px;
    text-align: center;
    color:  #2563eb;
    word-spacing: 5px;
    white-space: nowrap;
}
.button-div3 {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 0px 20px;
  margin-top: 60px;
}
.button-div3 button, .last-return{
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
}
.button-div3 button:first-of-type, .last-return{
    background: transparent;
    border: 1px solid #1e4d6b;
    color: #7dd3fc;
    transition: all 0.3s ease;
}
.button-div3 button:first-of-type:hover, .last-return:hover {
    background-color: #0f2d4a;
}
.button-div3 button:nth-of-type(2){
    background: #0ea5e9;
    border: none;
    color: white;

    transition: all 0.3s ease;
}
.button-div3 button:nth-of-type(2):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}
.start-quiz {
background: linear-gradient(135deg, #2563eb, #0ea5e9);
color: white;
padding: 14px 45px;
border-radius: 50px;
border: none;
font-size: 18px;
font-size: 700;
box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
transition: all 0.3s ease ;
}
.start-quiz:hover {
     transform: translateY(-3px);
}
.final-btn-div{
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding: 0px 30px;
}


footer {
  margin-top: 60px;
  border-top: 1px solid #1e293b;
  background: linear-gradient(to bottom, transparent, #080f1c);
  padding: 28px 40px;

}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;

}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.results-highscore {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    color: #facc15;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.footer-logo-text {
  font-family: georgia;
  font-size: 18px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.5px;
}

.footer-logo-accent {
  color: #2563eb;
}

.footer-tagline {
  font-size: 12px;
  color: #475569;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0.3px;
}

.footer-divider {
  width: 1px;
  height: 32px;
  background-color: #1e293b;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #475569;
}

.footer-version {
  background-color: #1e293b;
  color: #facc15;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.footer-dot {
  color: #334155;
  font-weight: 900;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-icon {
  color: #475569;
  font-size: 20px;
  text-decoration: none;
  transition: color 0.25s ease, transform 0.25s ease;
}

.footer-icon:hover {
  color: #e2e8f0;
  transform: translateY(-2px);
}


/* ---- QUIZ SCREEN ---- */
.quiz-screen {
    margin-top: 8vh;
    padding: 0px 40px 40px;
    max-width: 1000px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    flex-direction: column;
    gap: 24px;
}

.quiz-screen:not(.disappear) {
    display: flex;
}

/* TOP BAR */
.quiz-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 10px;
}

.quiz-category {
    font-family: georgia;
    font-size: 18px;
    color: #facc15;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.quiz-progress {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    color: #64748b;
}

/* TIMER */
.quiz-timer {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-svg {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-track {
    fill: none;
    stroke: #1e293b;
    stroke-width: 8;
}

.timer-fill {
    fill: none;
    stroke: #2563eb;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 264;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.5s ease;
}

.timer-fill.urgent {
    stroke: #ef4444;
}

.timer-number {
    font-family: georgia;
    font-size: 22px;
    font-weight: 700;
    color: #e2e8f0;
    position: relative;
    z-index: 1;
}

/* PROGRESS BAR */
.progress-bar-track {
    width: 100%;
    height: 6px;
    background-color: #1e293b;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(to right, #2563eb, #0ea5e9);
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* QUESTION CARD */
.question-card {
    background-color: #0a1f2e;
    border: 1px solid #1e4d6b;
    border-radius: 16px;
    padding: 36px 40px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.question-label {
    font-size: 13px;
    color: #2563eb;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.question-text {
    font-family: georgia;
    font-size: 22px;
    color: #e2e8f0;
    line-height: 1.6;
}

/* ANSWER BUTTONS */
.answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.answer-btn {
    background-color: #1e293b;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 20px 24px;
    color: #cbd5e1;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.answer-btn:hover {
    background-color: #1e3a5f;
    border-color: #2563eb;
    color: #e2e8f0;
    transform: translateY(-2px);
}

.answer-btn.active {
    background-color: #1e3a8a;
    border-color: #2563eb;
    color: white;
    box-shadow: 0 0 16px rgba(37, 99, 235, 0.4);
    transform: translateY(-3px);
}

/* BOTTOM BAR */
.quiz-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4px;
}

.skip-btn {
    background: transparent;
    border: 1px solid #1e4d6b;
    color: #64748b;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skip-btn:hover {
    background-color: #0f2d4a;
    color: #7dd3fc;
    transform: translateY(-2px);
}

.score-display {
    font-family: georgia;
    font-size: 16px;
    color: #facc15;
    font-weight: 700;
}

.next-question-btn {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    border: none;
    color: white;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.question {
    display: contents;
}
.next-question-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}
.submit-btn {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    border: none;
    color: white;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}


/* RESULTS SCREEN */
.results-screen {
    margin-top: 8vh;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    display: none;
    min-height: 70vh;
}

.results-screen:not(.disappear) {
    display: flex;
}

.results-card {
    background-color: #0a1f2e;
    border: 1px solid #1e4d6b;
    border-radius: 20px;
    padding: 50px 60px;
    max-width: 700px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: fadeSlideUp 0.6s ease forwards;
}

.results-title {
    font-family: georgia;
    font-size: 28px;
    color: #e2e8f0;
    text-align: center;
}

.results-score {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    color: #94a3b8;
    text-align: center;
}

.score-fraction {
    color: #facc15;
    font-weight: 700;
    font-size: 22px;
}

.results-percentage {
    font-family: georgia;
    font-size: 52px;
    font-weight: 700;
    color: #2563eb;
    line-height: 1;
}

.results-feedback {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    color: #7dd3fc;
    margin-bottom: 10px;
}

/* BUTTONS */
.results-buttons {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.retake-btn, .review-btn {
    padding: 12px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;


    opacity: 0;
    transform: translateY(20px);
}


.retake-btn:hover {
    background-color: #0f2d4a;
    transform: translateY(-2px);
}


.review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

/* ANIMATIONS */
.retake-btn {
    background: transparent;
    border: 2px solid #1e4d6b;
    color: #7dd3fc;
    animation: flyInLeft 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.7s forwards;
}

.review-btn {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    animation: flyInRight 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1s forwards;
}

/* ===================== HAMBURGER ===================== */
.hamburger-btn {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 999;
    background: #1e293b;
    border: 1px solid #1e4d6b;
    color: #7dd3fc;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.hamburger-btn:hover {
    background: #0f2d4a;
    color: #e2e8f0;
    transform: translateY(-2px);
}

/* ===================== SIDEBAR ===================== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: #0a1f2e;
    border-left: 1px solid #1e4d6b;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    padding: 0;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
}
.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px;
    border-bottom: 1px solid #1e4d6b;
}
.sidebar-logo {
    font-family: georgia;
    font-size: 20px;
    font-weight: 700;
    color: #e2e8f0;
}
.sidebar-logo-accent { color: #2563eb; }

.sidebar-close {
    background: transparent;
    border: 1px solid #1e4d6b;
    color: #64748b;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.sidebar-close:hover {
    background: #1e293b;
    color: #e2e8f0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
    gap: 6px;
}
.sidebar-link {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 16px;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}
.sidebar-link:hover {
    background: #1e293b;
    color: #e2e8f0;
}
.sidebar-link.active-link {
    background: #1e3a8a;
    color: #60a5fa;
    border: 1px solid #2563eb;
}

/* ===================== LEADERBOARD SCREEN ===================== */
.leaderboard-screen {
    flex: 1;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 100px 20px 60px;
}
.leaderboard-screen:not(.disappear) { display: flex; }

.leaderboard-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.leaderboard-title {
    font-family: georgia;
    font-size: 32px;
    color: #facc15;
    display: flex;
    align-items: center;
    gap: 12px;
}
.leaderboard-subtitle {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 10px;
}

.leaderboard-table-wrapper {
    background: #0a1f2e;
    border: 1px solid #1e4d6b;
    border-radius: 16px;
    overflow-y: auto;          
    overflow-x: hidden;
    max-height: 55vh;          
    scrollbar-width: none;     
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, Helvetica, sans-serif;
}
.leaderboard-table thead {
    background: #0f2d4a;
    border-bottom: 1px solid #1e4d6b;
}
.leaderboard-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #7dd3fc;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.leaderboard-table td {
    padding: 14px 20px;
    font-size: 15px;
    color: #cbd5e1;
    border-bottom: 1px solid #1e293b;
}
.leaderboard-table tr:last-child td { border-bottom: none; }
.leaderboard-table tbody tr {
    transition: all 0.2s ease;
}
.leaderboard-table tbody tr:hover {
    background: #1e293b;
}
.leaderboard-table .score-cell {
    color: #facc15;
    font-weight: 700;
}
.leaderboard-table .pct-cell {
    font-weight: 700;
}
.pct-high { color: #22c55e; }
.pct-mid  { color: #0ea5e9; }
.pct-low  { color: #ef4444; }

.leaderboard-empty {
    padding: 40px 20px;
    text-align: center;
    color: #475569;
    font-size: 15px;
    display: none;
}
.leaderboard-empty.visible { display: block; }

@keyframes flyInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes flyInRight {
    from {
        opacity: 0;
        transform: translateX(60px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}
@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg) translateX(0);
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) rotate(270deg) translateX(30px);
    }
    100% {
        transform: translateY(105vh) rotate(540deg) translateX(-20px);
        opacity: 0;
    }
}
.answer-btn.correct {
    background-color: #166534;
    border-color: #22c55e;
    color: white;
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.4);
}

.answer-btn.wrong {
    background-color: #7f1d1d;
    border-color: #ef4444;
    color: white;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.4);
}

.new-quiz-btn {
    padding: 12px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
    color: white;
    box-shadow: 0 4px 14px rgba(91, 33, 182, 0.35);


    opacity: 0;
    transform: translateY(20px);
    animation: flyInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.85s forwards;
}

.new-quiz-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 33, 182, 0.5);
}

@keyframes flyInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* RESPONSIVE */
/* ===================== RESPONSIVE ===================== */

@media (max-width: 768px) {

    /* LOGO */
    .logo { width: 130px; }

    /* WELCOME */
    .welcome-screen {
        margin-top: 120px;
        padding: 0 20px;
    }
    .welcome-text {
        font-size: 26px;
        white-space: normal;
        word-spacing: 2px;
    }
    .welcome-p { font-size: 16px; text-align: center; }
    .start { font-size: 16px; padding: 10px 20px; }

    /* CATEGORY */
    .category-screen { margin-top: 7vh; }
    .category-text { font-size: 24px; white-space: normal; }
    .card-container {
        grid-template-columns: 1fr 1fr;
        max-height: 52vh;
        overflow-y: scroll;
        padding-top: 15px;
    }
    .card { padding: 20px 15px; }
    .card h2 { font-size: 15px; }
    .card p { font-size: 13px; }
    .button-div { max-width: 90%; }
    .button-div button { padding: 10px 22px; font-size: 15px; }

    /* SETTINGS */
    .settings1, .settings2 {
   
        padding: 24px 20px 32px;
        max-width: 90%;
    }
    .settings-text { font-size: 20px; white-space: normal; word-spacing: 2px; }
    .button-div2 { width: 100%; margin: 28px auto; }
    .button-div2 button { width: 75px; height: 48px; font-size: 17px; }
    .button-div3 { margin-top: 32px; padding: 0 10px; }
    .button-div3 button, .last-return { padding: 8px 18px; font-size: 13px; }
    .final-btn-div { margin-top: 32px; padding: 0 10px; }
    .start-quiz { padding: 10px 30px; font-size: 15px; }

    /* QUIZ */
    .quiz-screen { margin-top: 5vh; padding: 0 20px 30px; gap: 18px; }
    .quiz-topbar { padding: 8px 5px; }
    .quiz-category { font-size: 15px; }
    .quiz-progress { font-size: 13px; }
    .quiz-timer { width: 65px; height: 65px; }
    .timer-number { font-size: 18px; }
    .question-card { padding: 22px 20px; }
    .question-text { font-size: 18px; }
    .question-label { font-size: 12px; }
    .answer-btn { padding: 15px 16px; font-size: 14px; }
    .quiz-bottom { padding: 8px 0; }
    .skip-btn { padding: 8px 16px; font-size: 13px; }
    .submit-btn { padding: 8px 16px; font-size: 13px; }
    .next-question-btn { padding: 8px 16px; font-size: 13px; }

    /* RESULTS */
    .results-screen { margin-top: 5vh; padding: 20px; }
    .results-card { padding: 40px 35px; }
    .results-title { font-size: 24px; }
    .results-percentage { font-size: 46px; }
    .results-score { font-size: 16px; }
    .results-feedback { font-size: 16px; }
    .retake-btn, .review-btn, .new-quiz-btn { padding: 10px 24px; font-size: 14px; }

    /* FOOTER */
    .footer-logo-text { font-size: 16px; }
    .footer-tagline { font-size: 11px; }
    .footer-meta { font-size: 11px; }
    .footer-version { font-size: 10px; }
    .footer-icon { font-size: 18px; }



/* LEADERBOARD */
.leaderboard-screen { 
 flex: 1;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 100px 20px 60px;
    justify-content: flex-start;  

}
.leaderboard-title { font-size: 26px; }
.leaderboard-container { gap: 12px; }
.leaderboard-table th { padding: 12px 14px; font-size: 12px; }
.leaderboard-table td { padding: 12px 14px; font-size: 14px; }

/* SIDEBAR */
.sidebar { width: 260px; }
.hamburger-btn {
    width: 38px;
    height: 38px;
    font-size: 15px;
    top: 12px;
    right: 14px;
}
.category-text { padding-right: 50px; }
.quiz-topbar { padding-right: 55px; }
.quiz-progress { max-width: 80px; text-align: right; }
}

@media (max-width: 480px) {

    /* LOGO */
    .logo { width: 100px; }
/* inside @media (max-width: 480px) */
.category-text { padding-right: 45px; }
.quiz-topbar { padding-right: 45px; }
    /* WELCOME */
    .welcome-screen { margin-top: 100px; }
    .welcome-text { font-size: 22px; }
    .welcome-p { font-size: 14px; }
    .start { font-size: 15px; }

    /* CATEGORY */
    .category-screen { margin-top: 6vh; }
    .card-container {
        grid-template-columns: 1fr;
        max-height: 55vh;
    }
    .card h2 { font-size: 14px; }
    .button-div button { padding: 8px 16px; font-size: 13px; }

    /* SETTINGS */
    .settings1, .settings2 {
      
        padding: 20px 16px 28px;
    }
    .settings-text { font-size: 18px; }
    .button-div2 button { width: 68px; height: 44px; font-size: 16px; }
    .button-div3 { margin-top: 28px; }
    .final-btn-div { margin-top: 28px; }

    /* QUIZ */
    .quiz-screen { margin-top: 4vh; padding: 0 12px 20px; gap: 14px; }
    .quiz-category { font-size: 13px; }
    .quiz-progress { font-size: 11px; }
    .quiz-timer { width: 55px; height: 55px; }
    .timer-number { font-size: 16px; }
    .question-card { padding: 18px 16px; gap: 10px; }
    .question-text { font-size: 16px; }
    .answers-grid { grid-template-columns: 1fr; gap: 10px; }
    .answer-btn { padding: 14px 16px; font-size: 14px; }
    .skip-btn, .submit-btn, .next-question-btn { padding: 7px 12px; font-size: 12px; }

    /* RESULTS */
    .results-screen { margin-top: 4vh; }
    .results-card { padding: 36px 24px; }
    .results-title { font-size: 22px; }
    .results-percentage { font-size: 42px; }
    .results-buttons { flex-direction: column; width: 100%; }
    .retake-btn, .review-btn, .new-quiz-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* FOOTER */
    .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
    .footer-divider { width: 60px; height: 1px; }
    .footer-logo-text { font-size: 15px; }
    .footer-meta { font-size: 11px; flex-wrap: wrap; justify-content: center; }

   

/* LEADERBOARD */
.leaderboard-screen { padding: 70px 12px 30px; }
.leaderboard-title { font-size: 22px; gap: 8px; }
.leaderboard-subtitle { font-size: 13px; }
.leaderboard-table-wrapper {
 background: #0a1f2e;
    border: 1px solid #1e4d6b;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    max-height: 55vh;          
    overflow-y: auto;          
    scrollbar-width: none;   

     }
/* hide Questions column on small screens */
.leaderboard-table th:nth-child(2),
.leaderboard-table td:nth-child(2) {
    display: none;
}

.leaderboard-table th { padding: 10px 8px; font-size: 10px; letter-spacing: 0.2px; }
.leaderboard-table td { padding: 10px 8px; font-size: 12px; }
/* SIDEBAR */
.sidebar { width: 100%; }
.hamburger-btn {
    width: 34px;
    height: 34px;
    font-size: 13px;
    top: 10px;
    right: 10px;
}
}

@media (max-width: 351px) {

    /* WELCOME */
    .welcome-screen { margin-top: 80px; }
    .start { width: 80%; justify-content: center; }

    /* SETTINGS */
    .settings1, .settings2 {
 
        padding: 16px 12px 22px;
    }
    .settings-text { font-size: 15px; word-spacing: 1px; }
    .button-div2 { justify-content: space-between; padding: 0 5px; }
    .button-div2 button { width: 55px; height: 38px; font-size: 13px; border-radius: 8px; }
    .button-div3 { margin-top: 22px; padding: 0 5px; }
    .button-div3 button, .last-return { padding: 6px 12px; font-size: 12px; }
    .final-btn-div { padding: 0 5px; margin-top: 22px; }
    .start-quiz { padding: 8px 22px; font-size: 14px; }
    .last-return { padding: 8px 14px; font-size: 12px; }

    /* QUIZ */
    .quiz-screen { margin-top: 3vh; padding: 0 10px 16px; gap: 10px; }
    .quiz-timer { width: 42px; height: 42px; }
    .timer-number { font-size: 13px; }
    .question-card { padding: 14px 12px; }
    .question-text { font-size: 15px; }
    .answer-btn { padding: 12px 14px; font-size: 13px; }
    .quiz-bottom { flex-direction: column; align-items: center; gap: 8px; }
    .skip-btn, .submit-btn, .next-question-btn {
        width: 100%;
        max-width: 220px;
        justify-content: center;
    }

    /* RESULTS */
    .results-card { padding: 28px 16px; }
    .results-title { font-size: 20px; }
    .results-percentage { font-size: 38px; }
    .retake-btn, .review-btn, .new-quiz-btn { padding: 10px; }



/* LEADERBOARD */
.leaderboard-title { font-size: 20px; }
.leaderboard-table th:nth-child(2),
.leaderboard-table td:nth-child(2) {
    display: none;
}
.leaderboard-table th { padding: 8px 6px; font-size: 10px; }
.leaderboard-table td { padding: 8px 6px; font-size: 11px; }
.leaderboard-title { font-size: 18px; }
.leaderboard-subtitle { font-size: 12px; }
}

@media (max-width: 290px) {

    /* CATEGORY */
    .category-text { font-size: 20px; white-space: normal; }

    /* SETTINGS */
    .settings1, .settings2 { margin: 60px auto 16px; padding: 14px 10px 20px; }
    .settings-text { font-size: 14px; }
    .button-div2 { flex-direction: column; align-items: center; gap: 10px; margin: 14px auto; }
    .button-div2 button { width: 100%; max-width: 200px; height: 42px; font-size: 15px; }

    /* RESULTS */
    .results-title { font-size: 18px; }
    .results-percentage { font-size: 32px; }
    .score-fraction { font-size: 18px; }
}

@media (max-width: 263px) {

    /* SETTINGS */
    .button-div3 { flex-direction: column; align-items: center; gap: 10px; }
    .button-div3 button { width: 100%; max-width: 200px; text-align: center; }
    .final-btn-div { flex-direction: column; align-items: center; gap: 10px; }
    .start-quiz { width: 100%; max-width: 200px; text-align: center; }
    .last-return { width: 100%; max-width: 200px; text-align: center; }
}