html { overflow-y: scroll; }
/* =====================================================
   EXAMPREP INDIA
   MAIN WEBSITE + TYPING TEST INTERFACE
   ===================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f6f8;
    color: #222;
    line-height: 1.6;
}


/* =====================================================
   MAIN WEBSITE HEADER
   ===================================================== */

header {
    background: #dce8ef;
    color: #1f3442;
    text-align: center;
    padding: 28px 20px;
    border-bottom: 1px solid #c3d2dc;
}

header h1 {
    font-size: 34px;
    margin-bottom: 4px;
    font-weight: 700;
}

header p {
    font-size: 16px;
    color: #52636e;
}


/* =====================================================
   MAIN CONTENT
   ===================================================== */

main {
    width: 92%;
    max-width: 1100px;
    margin: 40px auto;
    padding: 10px;
}

.section-title {
    text-align: center;
    margin-bottom: 32px;
}

.section-title h2 {
    font-size: 28px;
    color: #263d4b;
    margin-bottom: 7px;
}

.section-title p {
    color: #687780;
    font-size: 16px;
}


/* =====================================================
   CARDS
   ===================================================== */

.cards {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(280px, 1fr)
    );

    gap: 24px;
}

.card {
    background: #ffffff;
    border: 1px solid #d5dfe5;
    border-radius: 10px;

    padding: 28px;

    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.06);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.09);
}

.card h3 {
    color: #294b60;
    font-size: 21px;
    margin-bottom: 13px;
}

.card p {
    color: #5d6b73;
    margin-bottom: 15px;
    font-size: 15px;
}

.card p strong {
    color: #344b59;
}


/* =====================================================
   BUTTONS
   ===================================================== */

.button {
    display: inline-block;

    background: #315b73;
    color: #ffffff;

    padding: 10px 20px;

    border-radius: 5px;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    border: 1px solid #315b73;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.button:hover {
    background: #25495e;
    border-color: #25495e;
}


/* =====================================================
   FOOTER
   ===================================================== */

footer {
    margin-top: 60px;

    background: #293942;
    color: #dce4e8;

    text-align: center;

    padding: 20px;

    font-size: 14px;
}


/* =====================================================
   RRB NTPC EXAM PAGE
   ===================================================== */

.exam-page {
    margin: 0;
    padding: 0;

    background: #ffffff;

    color: #222;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}

.exam-screen {
    width: 94%;
    max-width: 1450px;

    min-height: 100vh;

    margin: 0 auto;

    padding:
        18px
        25px
        35px;

    position: relative;
}


/* =====================================================
   EXAM HEADER
   ===================================================== */

.exam-header {
    position: relative;

    min-height: 125px;

    padding:
        10px
        0
        15px;

    border-bottom:
        1px solid #c8d0d5;
}


/* =====================================================
   EXAM TITLE
   ===================================================== */

.exam-title {
    text-align: center;

    padding-top: 8px;
}

.exam-title h1 {
    margin: 0;

    font-size: 25px;

    font-weight: 600;

    letter-spacing: 0.3px;

    color: #222;
}

.exam-title p {
    margin-top: 7px;

    font-size: 15px;

    color: #4f5c63;
}


/* =====================================================
   CANDIDATE INFORMATION
   ===================================================== */

.candidate-panel {
    position: absolute;

    top: 10px;
    right: 0;

    display: flex;

    align-items: flex-start;

    gap: 14px;
}

.candidate-details {
    text-align: right;

    padding-top: 3px;

    font-size: 13px;

    line-height: 1.9;
}

.candidate-details div {
    white-space: nowrap;
}

.candidate-details strong {
    font-weight: 600;
}

.candidate-details span {
    margin-left: 4px;
}


/* =====================================================
   PASSPORT PHOTO BOX
   ===================================================== */

.candidate-photo {
    margin: 0;
    padding: 0;
}

.demo-photo {
    width: 65px;
    height: 85px;

    border:
        1px solid #555;

    background: #f5f6f7;

    display: flex;

    align-items: center;
    justify-content: center;

    color: #888;

    font-size: 10px;

    box-sizing: border-box;
}

.candidate-photo small {
    display: none;
}


/* =====================================================
   TIMER
   ===================================================== */

.exam-timer {
    width: 100%;

    margin-top: 18px;

    margin-bottom: 5px;

    text-align: right;
}

.exam-timer span {
    display: block;

    font-size: 11px;

    font-weight: 600;

    color: #555;

    letter-spacing: 0.8px;
}

.exam-timer strong {
    display: block;

    margin-top: 2px;

    font-size: 27px;

    font-weight: 600;

    color: #111;
}


/* =====================================================
   PASSAGE
   ===================================================== */

.passage-container {
    margin-top: 0;

    width: 100%;

    height: 330px;

    background: #ffffff;

    border:
        1px solid #bfc8ce;

    padding:
        25px
        30px;

    overflow-y: auto;

    overflow-x: hidden;
}

.typing-passage {
    font-size: 18px;

    line-height: 1.75;

    letter-spacing: 0.1px;

    white-space: pre-wrap;

    word-wrap: break-word;

    user-select: none;

    -webkit-user-select: none;
}


/* =====================================================
   PASSAGE SCROLLBAR
   ===================================================== */

.passage-container::-webkit-scrollbar {
    width: 12px;
}

.passage-container::-webkit-scrollbar-track {
    background: #edf1f3;
}

.passage-container::-webkit-scrollbar-thumb {
    background: #aebbc3;

    border-radius: 5px;

    border:
        2px solid #edf1f3;
}

.passage-container::-webkit-scrollbar-thumb:hover {
    background: #8f9da6;
}


/* =====================================================
   TYPING AREA
   ===================================================== */

.typing-container {
    margin-top: 18px;

    width: 100%;

    background: #ffffff;

    border:
        1px solid #555;

    box-sizing: border-box;
}

.controlled-typing-area {
    height: 190px;

    padding:
        22px
        25px;

    font-size: 19px;

    line-height: 1.75;

    white-space: pre-wrap;

    word-wrap: break-word;

    overflow-y: auto;

    overflow-x: hidden;

    outline: none;

    cursor: text;

    user-select: none;

    -webkit-user-select: none;
}


/* =====================================================
   TYPING AREA SCROLLBAR
   ===================================================== */

.controlled-typing-area::-webkit-scrollbar {
    width: 12px;
}

.controlled-typing-area::-webkit-scrollbar-track {
    background: #edf1f3;
}

.controlled-typing-area::-webkit-scrollbar-thumb {
    background: #aebbc3;

    border-radius: 5px;

    border:
        2px solid #edf1f3;
}

.controlled-typing-area::-webkit-scrollbar-thumb:hover {
    background: #8f9da6;
}


/* =====================================================
   PLACEHOLDER
   ===================================================== */

.typing-container::before {
    content: "";
}


/* =====================================================
   TYPING CURSOR
   ===================================================== */

.typing-cursor {
    display: inline-block;

    /* Clearly visible editing caret */
    width: 2px;
    min-width: 2px;
    height: 1.2em;

    background: #111;

    vertical-align: -0.12em;

    margin-left: 0;
    margin-right: 0;

    animation: cursorBlink 0.9s steps(1, end) infinite;
}

@keyframes cursorBlink {

    0%,
    65% {
        opacity: 1;
    }

    66%,
    100% {
        opacity: 0;
    }
}


/* =====================================================
   SUBMIT BUTTON
   ===================================================== */

.submit-container {
    display: flex;

    justify-content: flex-end;

    margin-top: 16px;
}

#submitBtn {
    padding:
        11px
        24px;

    font-size: 15px;

    font-weight: 600;

    border:
        1px solid #315b73;

    background: #315b73;

    color: #ffffff;

    cursor: pointer;

    border-radius: 4px;
}

#submitBtn:hover {
    background: #25495e;

    border-color: #25495e;
}


/* =====================================================
   RESULT BOX
   ===================================================== */

#resultBox {
    margin-top: 35px;
}

#resultWpm,
#resultAccuracy,
#resultErrors,
#qualification {
    font-weight: 600;
}


/* =====================================================
   RESULT CALCULATION
   ===================================================== */

.result-calculation {
    margin-top: 18px;

    padding: 22px;

    border:
        1px solid #b8c4cc;

    background: #f8fafb;

    font-size: 15px;

    line-height: 1.6;

    text-align: left;
}

.result-calculation h2 {
    margin-bottom: 20px;

    font-size: 22px;

    color: #294b60;

    text-align: center;
}

.result-calculation h3 {
    margin:
        18px
        0
        12px;

    font-size: 18px;

    color: #294b60;
}

.result-calculation p {
    margin:
        8px
        0;
}

.result-calculation hr {
    border: 0;

    border-top:
        1px solid #cbd4d9;

    margin:
        18px
        0;
}


/* =====================================================
   ERROR DETAILS
   ===================================================== */

.error-details {
    margin-top: 10px;
}

.error-item {
    background: #ffffff;

    border:
        1px solid #d7dfe4;

    border-left:
        4px solid #6b8798;

    padding:
        10px
        14px;

    margin-bottom: 10px;
}

.error-item p {
    margin: 4px 0;
}

.error-item strong {
    color: #293e4b;
}


/* =====================================================
   RESULT BUTTONS
   ===================================================== */

#testAgainBtn,
#chooseTestBtn {
    padding:
        10px
        20px;

    margin:
        10px
        5px;

    font-size: 14px;

    font-weight: 600;

    border:
        1px solid #315b73;

    background: #315b73;

    color: #ffffff;

    cursor: pointer;

    border-radius: 4px;
}

#testAgainBtn:hover,
#chooseTestBtn:hover {
    background: #25495e;

    border-color: #25495e;
}


/* =====================================================
   OLD TYPING ELEMENTS
   Kept for compatibility
   ===================================================== */

#typingInput {
    width: 100%;

    min-height: 220px;

    padding: 18px;

    font-size: 18px;

    line-height: 1.7;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    border:
        2px solid #cbd5e1;

    border-radius: 6px;

    resize: vertical;

    outline: none;
}

#typingInput:focus {
    border-color: #315b73;

    box-shadow:
        0 0 0 3px
        rgba(49, 91, 115, 0.12);
}


/* =====================================================
   MOBILE / SMALL SCREEN SAFETY
   ===================================================== */

@media (max-width: 800px) {

    .exam-screen {
        width: 96%;

        padding:
            12px
            12px
            25px;
    }

    .candidate-panel {
        position: relative;

        top: auto;
        right: auto;

        justify-content: flex-end;

        margin-top: 15px;
    }

    .exam-header {
        min-height: 190px;
    }

    .exam-title {
        padding-top: 5px;
    }

    .exam-title h1 {
        font-size: 21px;
    }

    .exam-timer {
        margin-top: 15px;
    }

    .passage-container {
        height: 300px;

        padding:
            20px;
    }

    .typing-passage {
        font-size: 17px;
    }

    .controlled-typing-area {
        height: 180px;

        font-size: 17px;

        padding:
            18px;
        }

    .result-calculation {
        padding: 16px;
    }
}


/* =====================================================
   SMALL DEVICE WEBSITE CARDS
   ===================================================== */

@media (max-width: 600px) {

    header h1 {
        font-size: 28px;
    }

    main {
        width: 94%;

        margin:
            25px
            auto;
    }

    .section-title h2 {
        font-size: 24px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 22px;
    }
}


/* =====================================================
   STEP 59 - PROFESSIONAL EXAM INTERFACE POLISH
   ===================================================== */

/* -----------------------------------------------------
   EXAM SCREEN
   ----------------------------------------------------- */

.exam-page {
    background: #eef2f5;
}

.exam-screen {
    width: 96%;
    max-width: 1500px;
    margin: 18px auto;
    padding: 0 28px 40px;
    background: #ffffff;
    border: 1px solid #c7d0d6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}


/* -----------------------------------------------------
   EXAM HEADER
   ----------------------------------------------------- */

.exam-header {
    min-height: 125px;
    padding: 16px 0 14px;
    border-bottom: 2px solid #c2ccd2;
}

.exam-title h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #1f3442;
}

.exam-title p {
    margin-top: 5px;
    font-size: 15px;
    font-weight: 600;
    color: #52636e;
}


/* -----------------------------------------------------
   CANDIDATE INFORMATION
   ----------------------------------------------------- */

.candidate-panel {
    top: 14px;
    right: 0;
    gap: 14px;
}

.candidate-details {
    font-size: 13px;
    line-height: 1.8;
    color: #293942;
}

.candidate-details strong {
    color: #1f3442;
}

.candidate-details span {
    color: #333;
}


/* -----------------------------------------------------
   PHOTO BOX
   ----------------------------------------------------- */

.demo-photo {
    width: 70px;
    height: 88px;
    border: 1px solid #6c777d;
    background: #f4f6f7;
}


/* -----------------------------------------------------
   TIMER
   ----------------------------------------------------- */

.exam-timer {
    margin-top: 14px;
    margin-bottom: 7px;
    padding: 5px 4px 4px;
    border-bottom: 1px solid #d7dfe3;
}

.exam-timer span {
    font-size: 12px;
    font-weight: 700;
    color: #4b5961;
    letter-spacing: 1px;
}

.exam-timer strong {
    margin-top: 1px;
    font-size: 29px;
    font-weight: 700;
    color: #17252d;
}


/* -----------------------------------------------------
   PASSAGE AREA
   ----------------------------------------------------- */

.passage-container {
    height: 335px;
    margin-top: 10px;
    padding: 24px 28px;
    background: #ffffff;
    border: 1px solid #aeb9c0;
}

.typing-passage {
    font-size: 18px;
    line-height: 1.75;
    color: #222;
}


/* -----------------------------------------------------
   TYPING AREA
   ----------------------------------------------------- */

.typing-container {
    margin-top: 18px;
    border: 1px solid #8e9aa1;
    background: #ffffff;
}

.controlled-typing-area {
    height: 190px;
    padding: 22px 25px;
    font-size: 19px;
    line-height: 1.75;
    color: #222;
    background: #ffffff;
}

.controlled-typing-area:focus {
    border: none;
    outline: none;
}


/* -----------------------------------------------------
   SUBMIT BUTTON
   ----------------------------------------------------- */

.submit-container {
    margin-top: 14px;
}

#submitBtn {
    min-width: 125px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 3px;
}


/* -----------------------------------------------------
   RESULT SCREEN
   ----------------------------------------------------- */

#resultBox {
    margin-top: 30px;
    padding-bottom: 20px;
}

#resultBox > h1 {
    padding: 15px;
    text-align: center;
    font-size: 25px;
    color: #1f3442;
    background: #e8eef2;
    border: 1px solid #c6d0d6;
}

.result-card {
    max-width: 700px;
    margin: 18px auto;
    padding: 20px 25px;
    background: #ffffff;
    border: 1px solid #c6d0d6;
}

.result-card p {
    margin: 8px 0;
    font-size: 16px;
}

.result-buttons {
    text-align: center;
    margin-top: 20px;
}


/* -----------------------------------------------------
   RESULT CALCULATION
   ----------------------------------------------------- */

.result-calculation {
    max-width: 900px;
    margin: 20px auto 0;
    padding: 24px 28px;
    background: #f8fafb;
    border: 1px solid #b9c5cc;
}

.result-calculation h2 {
    font-size: 22px;
    color: #294b60;
}

.result-calculation h3 {
    font-size: 18px;
    color: #294b60;
}


/* -----------------------------------------------------
   ERROR DETAILS
   ----------------------------------------------------- */

.error-item {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #ffffff;
    border: 1px solid #d2dbe0;
    border-left: 4px solid #6b8798;
}

.error-item p {
    margin: 4px 0;
}


/* -----------------------------------------------------
   RESULT BUTTONS
   ----------------------------------------------------- */

#testAgainBtn,
#chooseTestBtn {
    min-width: 125px;
    padding: 10px 20px;
    border-radius: 3px;
}


/* -----------------------------------------------------
   DESKTOP EXAM LAYOUT
   ----------------------------------------------------- */

@media (min-width: 801px) {

    .exam-screen {
        min-height: calc(100vh - 36px);
    }

    .passage-container,
    .typing-container {
        width: 100%;
    }

}


/* -----------------------------------------------------
   SMALL SCREEN SAFETY
   ----------------------------------------------------- */

@media (max-width: 800px) {

    .exam-screen {
        width: 96%;
        margin: 10px auto;
        padding: 0 15px 25px;
    }

    .exam-title h1 {
        font-size: 21px;
    }

    .candidate-panel {
        margin-top: 15px;
    }

    .passage-container {
        height: 300px;
    }

    .controlled-typing-area {
        height: 180px;
        font-size: 17px;
    }
}
/* =====================================================
   TEST HISTORY PAGE
   ===================================================== */

.history-container {
    width: 92%;
    max-width: 1100px;
    margin: 30px auto 60px;
    background: #ffffff;
    border: 1px solid #d5dde3;
    border-radius: 8px;
    padding: 28px;
    box-sizing: border-box;
}

.history-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 15px;
    background: #ffffff;
}

.history-table th,
.history-table td {
    border: 1px solid #cfd8df;
    padding: 13px 12px;
    text-align: center;
    vertical-align: middle;
}

.history-table th {
    background: #e8f0f5;
    color: #183b56;
    font-weight: 700;
    white-space: nowrap;
}

.history-table td {
    color: #263746;
    background: #ffffff;
}

.history-table tbody tr:nth-child(even) td {
    background: #f7f9fb;
}

.history-table tbody tr:hover td {
    background: #eef5f9;
}

/* Column widths */

.history-table th:nth-child(1),
.history-table td:nth-child(1) {
    width: 25%;
}

.history-table th:nth-child(2),
.history-table td:nth-child(2) {
    width: 18%;
}

.history-table th:nth-child(3),
.history-table td:nth-child(3) {
    width: 13%;
}

.history-table th:nth-child(4),
.history-table td:nth-child(4) {
    width: 13%;
}

.history-table th:nth-child(5),
.history-table td:nth-child(5) {
    width: 15%;
}

.history-table th:nth-child(6),
.history-table td:nth-child(6) {
    width: 16%;
}

.history-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.no-history {
    text-align: center;
    color: #647482;
    font-size: 16px;
    padding: 30px 10px;
}

/* History page on smaller screens */

@media (max-width: 700px) {

    .history-container {
        width: 96%;
        padding: 15px;
    }

    .history-table {
        min-width: 700px;
    }

    .history-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
}
/* =====================================================
   HISTORY PERFORMANCE SUMMARY
   ===================================================== */

.history-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.summary-card {
    background: #f5f9fc;
    border: 1px solid #cfdbe3;
    border-radius: 7px;
    padding: 18px 12px;
    text-align: center;
}

.summary-card h3 {
    margin: 0 0 8px;
    color: #315d78;
    font-size: 14px;
    font-weight: 600;
}

.summary-card p {
    margin: 0;
    color: #183b56;
    font-size: 24px;
    font-weight: 700;
}

/* Smaller screens */

@media (max-width: 700px) {

    .history-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* =====================================================
   HISTORY TABLE - 7 COLUMN LAYOUT
   ===================================================== */

.history-table {
    width: 100%;
    table-layout: fixed;
}

.history-table th,
.history-table td {
    padding: 12px 8px;
    white-space: normal;
    overflow-wrap: break-word;
}

/* Date */
.history-table th:nth-child(1),
.history-table td:nth-child(1) {
    width: 19%;
}

/* Exam */
.history-table th:nth-child(2),
.history-table td:nth-child(2) {
    width: 12%;
}

/* Words Typed */
.history-table th:nth-child(3),
.history-table td:nth-child(3) {
    width: 11%;
}

/* WPM */
.history-table th:nth-child(4),
.history-table td:nth-child(4) {
    width: 10%;
}

/* Mistakes */
.history-table th:nth-child(5),
.history-table td:nth-child(5) {
    width: 11%;
}

/* Accuracy */
.history-table th:nth-child(6),
.history-table td:nth-child(6) {
    width: 12%;
}

/* Status */
.history-table th:nth-child(7),
.history-table td:nth-child(7) {
    width: 25%;
}
/* =====================================================
   TEST HISTORY RESULT BUTTON
   ===================================================== */

#historyBtn {
    display: inline-block;
    padding: 10px 20px;
    margin-left: 8px;
    border: none;
    border-radius: 4px;
    background: #315d78;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

#historyBtn:hover {
    background: #264b63;
}

#historyBtn:active {
    transform: translateY(1px);
}
/* =====================================================
   RESULT SUMMARY - PROFESSIONAL LAYOUT
   ===================================================== */

#resultBox {
    margin-top: 28px;
}

#resultBox > p {
    margin: 8px 0;
}

/* Main result summary box */

.result-summary {
    width: 70%;
    max-width: 700px;
    margin: 18px auto 22px;
    border: 1px solid #cbd8e0;
    border-radius: 7px;
    background: #f8fafc;
    overflow: hidden;
}

.result-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 20px;
    border-bottom: 1px solid #d9e2e8;
}

.result-summary-row:last-child {
    border-bottom: none;
}

.result-summary-label {
    color: #315d78;
    font-weight: 600;
}

.result-summary-value {
    color: #183b56;
    font-weight: 700;
}

/* Result status */

.result-status {
    text-align: center;
    margin: 15px auto 20px;
    padding: 12px 18px;
    width: 70%;
    max-width: 700px;
    box-sizing: border-box;
    border-radius: 6px;
    background: #e8f0f5;
    color: #183b56;
    font-weight: 700;
}

/* Result buttons */

.result-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0 30px;
}

.result-buttons button {
    margin: 0;
}
/* =====================================================
   FINAL CANDIDATE PANEL POSITION & PHOTO ADJUSTMENT
   ===================================================== */

.candidate-panel {
    top: 4px !important;
    align-items: center !important;
}

.candidate-photo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

.demo-photo {
    width: 65px !important;
    height: 78px !important;
    display: block !important;
    object-fit: contain !important;
    object-position: center center !important;
    box-sizing: border-box !important;
}