/* =========================================
   STUDYAGORA - UPPCS PRELIMS BOOSTER
   COMPLETE UNIFIED STYLESHEET
========================================= */

/* --- RESET & VARIABLES --- */
* {
    box-sizing: border-box;
}

:root {
    --bg: #000000;
    --card-bg: #0d0d0d;
    --card-border: #242424;
    --accent-pink: #ff44ee;
    --accent-purple: #9d00ff;
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.active-nav {
    color: var(--accent-pink) !important;
}

/* =========================================
   INDEX PAGE: HERO SECTION
========================================= */

.uppcs-hero {
    width: 100%;
    padding: 50px 20px 30px;
    background: radial-gradient(circle at 50% 0%, rgba(178, 0, 255, 0.15), transparent 40%), #000000;
    text-align: center;
    border-bottom: 1px solid #1a1a1a;
}

.uppcs-hero-inner {
    max-width: 850px;
    margin: 0 auto;
}

.exam-label {
    display: inline-block;
    color: var(--accent-pink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.uppcs-hero h1 {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    margin: 0 0 14px;
    color: #fff;
}

.uppcs-hero p {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 24px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 24px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat strong {
    font-size: 28px;
    color: var(--accent-pink);
    font-weight: 800;
}

.stat span {
    font-size: 13px;
    color: #777;
}

.hero-start-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 30px;
    background: linear-gradient(90deg, var(--accent-purple), #ff00cc);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.hero-start-btn:hover {
    transform: translateY(-2px);
}

/* =========================================
   INDEX PAGE: PRACTICE SETS GRID
========================================= */

.practice-section {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
    padding: 50px 20px;
}

.section-heading {
    text-align: center;
    margin-bottom: 35px;
}

.section-heading span {
    color: var(--accent-pink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.section-heading h2 {
    font-size: clamp(22px, 3vw, 30px);
    margin: 8px 0 10px;
}

.section-heading p {
    color: var(--text-muted);
    font-size: 15px;
    margin: 0 auto;
    max-width: 650px;
}

.sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.set-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.set-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-pink);
    background: #141414;
}

.set-number {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #181818;
    border: 1px solid #282828;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 10px;
    font-weight: 700;
    color: #888;
}

.set-number strong {
    font-size: 18px;
    color: var(--accent-pink);
    font-weight: 800;
}

.set-info {
    flex: 1;
    margin: 0 16px;
}

.set-info h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
}

.set-info p {
    margin: 0;
    font-size: 13px;
    color: #888;
}

.set-arrow {
    color: var(--accent-pink);
    font-size: 16px;
    transition: transform 0.2s ease;
}

.set-card:hover .set-arrow {
    transform: translateX(4px);
}

.empty-sets {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.empty-sets i {
    font-size: 36px;
    color: var(--accent-purple);
    margin-bottom: 12px;
}

/* =========================================
   INDEX PAGE: SEO & FAQ SECTIONS
========================================= */

.about-booster, .uppcs-faq {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
    padding: 40px 20px;
    border-top: 1px solid #1a1a1a;
}

.about-content h2, .uppcs-faq h2 {
    font-size: 22px;
    margin-top: 24px;
}

.about-content p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 15px;
}

.about-content a {
    color: var(--accent-pink);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.faq-list details {
    background: #0d0d0d;
    border: 1px solid #222;
    border-radius: 12px;
    padding: 16px;
}

.faq-list summary {
    font-weight: 700;
    cursor: pointer;
    outline: none;
}

.faq-list p {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* =========================================
   SET.PHP: QUIZ ENGINE STYLES
========================================= */

.quiz-page {
    width: 100%;
    min-height: 100vh;
    padding-top: 10px;
    background: radial-gradient(circle at 50% 0%, rgba(178, 0, 255, 0.12), transparent 35%), #000000;
}

.quiz-header {
    width: 100%;
    border-bottom: 1px solid #1d1d1d;
    background: rgba(8, 8, 8, 0.95);
}

.quiz-header-inner {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 28px 20px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    color: #aaa;
    font-size: 14px;
    text-decoration: none;
}

.back-link:hover { color: var(--accent-pink); }

.progress-wrapper { width: 100%; margin-top: 28px; }
.progress-text { margin-bottom: 10px; color: #aaa; font-size: 14px; text-align: right; }
.progress-text span { color: var(--accent-pink); font-weight: 800; }
.progress-bar { width: 100%; height: 6px; border-radius: 20px; background: #1b1b1b; overflow: hidden; }
.progress-fill { width: 0%; height: 100%; background: linear-gradient(90deg, var(--accent-purple), #ff00cc, var(--accent-pink)); transition: width 0.35s ease; }

.quiz-section { width: 100%; padding: 40px 20px 60px; }
.quiz-container { width: 100%; max-width: 900px; margin: 0 auto; }

#quizCard, .question-card {
    width: 100%;
    padding: 32px 28px;
    background: #0d0d0d;
    border: 1px solid #242424;
    border-radius: 20px;
}

.question-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.question-tag { color: var(--accent-pink); font-size: 12px; font-weight: 800; letter-spacing: 1.5px; }
.question-total { padding: 6px 12px; border-radius: 20px; background: #171717; color: #999; font-size: 12px; }
#questionNumber { color: var(--accent-pink); font-weight: 800; }

#questionText { margin: 0 0 28px; font-size: 1.15rem; font-weight: 600; line-height: 1.75; white-space: pre-line; }

.options-container { display: flex; flex-direction: column; gap: 12px; width: 100%; }

.option-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    border: 1px solid #292929;
    border-radius: 14px;
    background: #111;
    color: #ddd;
    font-size: 15px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.option-btn:hover:not(:disabled) {
    border-color: #8e00b5;
    background: #151015;
    transform: translateX(3px);
}

.option-letter {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #222;
    color: #bbb;
    font-size: 13px;
    font-weight: 800;
}

.option-btn.correct { border-color: #16a34a; background: rgba(22, 163, 74, 0.12); color: #fff; }
.option-btn.correct .option-letter { background: #16a34a; color: #fff; }
.option-btn.wrong { border-color: #dc2626; background: rgba(220, 38, 38, 0.12); color: #fff; }
.option-btn.wrong .option-letter { background: #dc2626; color: #fff; }

.explanation-box {
    display: none;
    margin-top: 24px;
    padding: 20px;
    border: 1px solid rgba(178, 0, 255, 0.35);
    border-radius: 16px;
    background: rgba(178, 0, 255, 0.07);
}

.explanation-box.show { display: block; }
.explanation-title { color: var(--accent-pink); font-weight: 800; margin-bottom: 8px; }

.next-btn, .retry-btn, .sets-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.next-btn, .retry-btn { background: linear-gradient(90deg, var(--accent-purple), #ff00cc); color: #fff; }
.sets-btn { background: #171717; border: 1px solid #333; color: #ddd; }

#resultCard { display: none; text-align: center; padding: 40px 20px; background: #0d0d0d; border-radius: 20px; border: 1px solid #242424; }
.score-display strong { font-size: 50px; color: var(--accent-pink); }

/* =========================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
========================================= */

@media (max-width: 768px) {
    .sets-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 20px; }
    .set-card { padding: 16px; }
}
/* =========================================
   QUESTION TEXT & STATEMENT FORMATTING
========================================= */

#questionText {
    display: block;
    width: 100%;
    margin: 0 0 28px;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.8;
    white-space: pre-wrap; /* Keeps line breaks from database text */
    overflow-wrap: anywhere;
}

/* =========================================
   OPTION BUTTON VERTICAL CENTERING
========================================= */

.option-btn {
    width: 100%;
    min-height: 54px; /* Reduced unnecessary height bloat */
    display: flex;
    align-items: center; /* Ensures option text and letter circle stay vertically centered */
    gap: 15px;
    padding: 14px 18px;
    margin: 0;
    border: 1px solid #292929;
    border-radius: 14px;
    background: #111111;
    color: #dddddd;
    font-size: 15px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.option-letter {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #222222;
    color: #bbbbbb;
    font-size: 13px;
    font-weight: 800;
}

.option-text {
    flex: 1;
    color: inherit;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
/* =========================================
   FIXED SET NAVIGATION BUTTONS
========================================= */

.set-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.set-navigation a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.previous-set-link,
.next-set-link {
    background: #18181f;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.all-sets-link {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    border: none;
}

.set-navigation a:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.set-navigation span {
    display: none; /* Cleans up empty placeholder spans */
}

/* Responsive Stack for Mobile */
@media (max-width: 768px) {
    .set-navigation {
        flex-direction: column;
        align-items: stretch;
    }
    .set-navigation a {
        width: 100%;
    }
}