/* =====================================================================
   Top Plus Academy — Student Assessment
   Dark theme, teal/blue accents — matches the client-approved reference
   design (growth.jeevanuthaman.com) with a timer + section tab added.
   ===================================================================== */

:root {
    --bg:            #0a0b0d;
    --card:          #16181c;
    --card-border:   #262a2f;
    --input-bg:      #101215;
    --text:          #f2f4f6;
    --text-muted:    #9aa3ab;
    --text-faint:    #63696f;

    --teal:          #00b4b8;
    --blue:          #2e86de;
    --gradient:      linear-gradient(135deg, #00b4b8 0%, #2e86de 100%);

    --success:       #2ecc71;
    --warning:       #e6a723;
    --danger:        #e6543a;

    --radius:        16px;
    --radius-sm:     10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.page {
    max-width: 760px;
    margin: 0 auto;
    padding: 18px 18px 60px;
}

/* ---------- Header pill --------------------------------------------- */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    padding: 10px 22px;
    margin: 10px auto 28px;
    max-width: 760px;
}

.site-header .brand { display: flex; align-items: center; gap: 10px; }
.site-header img { width: 34px; height: 34px; border-radius: 8px; }
.site-header .brand-name { font-weight: 700; font-size: 14.5px; line-height: 1.25; }
.site-header .brand-sub { font-size: 10.5px; letter-spacing: .05em; color: var(--text-faint); }

.timer-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}
.timer-pill.warning { color: var(--warning); border-color: rgba(230,167,35,.5); background: rgba(230,167,35,.08); }

/* ---------- Cards ------------------------------------------------------ */

.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 30px 28px;
}

/* ---------- Course selection ------------------------------------------- */

.hero h1 { font-size: 26px; margin: 0 0 8px; }
.hero p { color: var(--text-muted); font-size: 14.5px; margin: 0 0 26px; max-width: 60ch; }

.course-pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.course-pick {
    display: block;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 20px 18px;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: border-color .15s ease, transform .1s ease;
}
.course-pick:hover { border-color: var(--teal); text-decoration: none; }
.course-pick:active { transform: scale(.98); }

/* ---------- Form (personal info) ---------------------------------------- */

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

input[type="text"], input[type="number"], input[type="tel"], select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text);
    font-size: 14.5px;
    margin-bottom: 18px;
    font-family: inherit;
}
input:focus, select:focus { outline: none; border-color: var(--teal); }

.field-row { display: flex; gap: 14px; }
.field-row > div { flex: 1; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
}
.btn-primary { background: var(--gradient); color: #fff; }
.btn-primary:hover { opacity: .93; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-outline { background: transparent; border-color: var(--card-border); color: var(--text); }
.btn-outline:hover { border-color: var(--teal); }
.btn-block { width: 100%; }

.error-box {
    background: rgba(230,84,58,.1);
    border: 1px solid rgba(230,84,58,.35);
    color: #ff9483;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 18px;
}

/* ---------- Test screen -------------------------------------------------- */

.test-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12.5px;
    color: var(--text-faint);
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.section-tab {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(0,180,184,.12);
    color: var(--teal);
    font-weight: 700;
    font-size: 11.5px;
    letter-spacing: .03em;
    margin-bottom: 14px;
}

.progress-track {
    height: 5px;
    background: var(--card-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 22px;
}
.progress-fill {
    height: 100%;
    background: var(--gradient);
    width: 0%;
    transition: width .25s ease;
}

.question-text {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 18px;
}

.question-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.question-images img {
    max-width: 100%;
    max-height: 260px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
}

.options-list { margin-bottom: 24px; }

.option-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background: var(--input-bg);
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 15px;
    transition: border-color .12s ease, background .12s ease;
}
.option-card:hover { border-color: rgba(0,180,184,.5); }
.option-card.selected {
    background: rgba(46,134,222,.14);
    border-color: var(--blue);
}
/* Real <input type="radio"> (in assets/js/test.js), styled to match the
   look of the old fake circle exactly, but keyboard/screen-reader usable:
   Tab reaches it, Space/Enter and arrow keys select it natively. */
.option-radio-input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px; height: 20px;
    margin: 0;
    border-radius: 50%;
    border: 2px solid var(--text-faint);
    flex-shrink: 0;
    position: relative;
    accent-color: var(--blue); /* fallback tint on browsers that ignore the appearance reset above */
}
.option-card.selected .option-radio-input { border-color: var(--blue); }
.option-card.selected .option-radio-input::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--blue);
}
/* Visible focus ring when tabbing between options with a keyboard */
.option-card:focus-within {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.nav-buttons {
    display: flex;
    gap: 12px;
}
.nav-buttons .btn { flex: 1; }

/* ---------- Thank you screen ---------------------------------------------- */

.thankyou-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 22px;
    font-size: 30px;
}

/* ---------- Small screens ---------------------------------------------- */

@media (max-width: 480px) {
    .card { padding: 22px 18px; }
    .question-text { font-size: 18px; }
    .field-row { flex-direction: column; gap: 0; }
    .site-header { border-radius: 20px; padding: 10px 16px; }
}
