/* ==========================================================================
   Assamese Government Standard Typing Practice Test - Stylesheet
   Path: typing-practice-test/css/typing-test.css
   ========================================================================== */

* {
    box-sizing: border-box;
}

.tp-test-wrapper {
    padding: 24px 20px 60px;
    background: #f4f6fa;
    min-height: calc(100vh - 140px);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.tp-test-main-card {
    width: 100%;
    background: #ffffff;
    border-radius: 11px;
    padding: 10px 9px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05), 0 2px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2e8f0;
}

/* === Controls Row === */
.tp-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 14px;
}

h1.tp-topic-title, .tp-topic-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #4f46e5;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

/* === Minimal More Tests Dropdown Pill === */
.tp-left-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tp-more-tests-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tp-more-tests-pill .pill-icon {
    position: absolute;
    left: 10px;
    color: #4f46e5;
    font-size: 0.82rem;
    pointer-events: none;
    z-index: 1;
}

.tp-select-tests {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 26px 6px 28px;
    font-size: 0.84rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    outline: none;
    transition: all 0.15s ease-in-out;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%20%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 11px;
    max-width: 170px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.tp-select-tests:hover {
    background-color: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.tp-select-tests:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Left: Font Size Slider Pill */
.tp-font-slider-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 6px 14px;
    height: 38px;
}

.tp-font-slider-pill i {
    color: #64748b;
    font-size: 13px;
}

.tp-font-slider-pill .fs-val {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    min-width: 30px;
    text-align: center;
}

#fontSizeSlider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: #cbd5e1;
    outline: none;
    cursor: pointer;
}

#fontSizeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4f46e5;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 4px rgba(79, 70, 229, 0.4);
}

/* Right Buttons Group */
.tp-right-btns {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tp-btn {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease-in-out;
    font-family: 'Inter', sans-serif;
    box-shadow: none;
}

.tp-btn-fullscreen {
    background: #635bff;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.25);
}

.tp-btn-fullscreen:hover {
    background: #5248eb;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(99, 91, 255, 0.35);
}

.tp-btn-reset {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.tp-btn-reset i {
    color: #ef4444;
}

.tp-btn-reset:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.tp-btn-keyboard {
    background: #ffffff;
    color: #64748b;
    border: 1.5px solid #cbd5e1;
}

.tp-btn-keyboard:hover {
    background: #f8fafc;
    color: #334155;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.tp-timer-pill {
    background: #eef2ff;
    color: #4f46e5;
    border: 1.5px solid #c7d2fe;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-variant-numeric: tabular-nums;
}

/* === Passage Box === */
.tp-passage-box {
    background: #e9e9e9;
    border: 1.5px solid #e0e7ff;
    border-radius: 9px;
    padding: 14px 17px;
    margin-bottom: 24px;
    max-height: 220px;
    overflow-y: auto;
    scroll-behavior: smooth;
    position: relative;
}

.tp-passage-box::-webkit-scrollbar { width: 6px; }
.tp-passage-box::-webkit-scrollbar-track { background: transparent; }
.tp-passage-box::-webkit-scrollbar-thumb { background: #c7d2fe; border-radius: 3px; }
.tp-passage-box::-webkit-scrollbar-thumb:hover { background: #635bff; }

.tp-passage-header {
    font-size: 0.92rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Noto Sans Bengali', 'Inter', sans-serif;
}

.tp-passage-content {
    font-family: 'Noto Sans Bengali', 'Vrinda', 'Inter', sans-serif;
    font-size: 19px;
    line-height: 2.2;
    color: #334155;
    user-select: none;
}

.test-word {
    display: inline;
    padding: 2px 3px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.test-word.tw-current {
    color: #1d4ed8;
    border-bottom: 2.5px solid #2563eb;
    font-weight: 700;
    background: rgba(37, 99, 235, 0.06);
}

.test-word.tw-correct {
    color: #15803d;
    background: #dcfce7;
}

.test-word.tw-wrong {
    color: #b91c1c;
    background: #fee2e2;
    text-decoration: underline;
    text-decoration-color: #ef4444;
}

/* === Textarea Input === */
.tp-input-container {
    margin-bottom: 24px;
}

#textInput {
    width: 100%;
    height: 180px;
    padding: 22px 24px;
    border: 1.5px solid #cbd5e1;
    border-radius: 16px;
    font-size: 19px;
    font-family: 'Noto Sans Bengali', 'Vrinda', 'Segoe UI', sans-serif;
    resize: vertical;
    background: #ffffff;
    transition: all 0.25s ease;
    color: #0f172a;
    line-height: 1.85;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

#textInput:focus {
    outline: none;
    border-color: #635bff;
    box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.15);
}

/* === Submit Button Row === */
.tp-submit-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.tp-btn-submit {
    background: #4f46e5;
    color: #ffffff;
    border: none;
    padding: 9px 24px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.18s ease-in-out;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    font-family: 'Inter', sans-serif;
}

.tp-btn-submit:hover {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.tp-btn-submit:active {
    transform: translateY(0);
}

.tp-btn-submit:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.tp-input-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 10px;
    font-weight: 500;
}

/* === On-Screen InScript Keyboard Visibility === */
.keyboard.kb-hidden,
.tp-keyboard.kb-hidden {
    display: none !important;
}

/* === Government Results Modal === */
.tp-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(5px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tp-modal-backdrop.show {
    display: flex;
}

.tp-result-card {
    background: #ffffff;
    border-radius: 24px;
    max-width: 620px;
    width: 100%;
    padding: 38px 36px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    position: relative;
    animation: modalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.tp-verdict-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 22px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.tp-verdict-pass {
    background: #dcfce7;
    color: #15803d;
    border: 1.5px solid #86efac;
}

.tp-verdict-fail {
    background: #fee2e2;
    color: #b91c1c;
    border: 1.5px solid #fca5a5;
}

.tp-result-hero-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tp-hero-stat .val {
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1;
}

.tp-hero-stat .lbl {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    margin-top: 6px;
}

.tp-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 26px;
}

.tp-grid-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 10px;
}

.tp-grid-item .val {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
}

.tp-grid-item .lbl {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
    margin-top: 2px;
}

.tp-formula-note {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.8rem;
    color: #1e40af;
    margin-bottom: 24px;
    text-align: left;
    line-height: 1.5;
}

.tp-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

@media (max-width: 768px) {
    .tp-test-main-card { padding: 24px 18px; border-radius: 16px; }
    .key { min-width: 42px; height: 44px; font-size: 15px; }
    .space-key { min-width: 180px; }
    .tp-result-grid { grid-template-columns: repeat(2, 1fr); }
}

/* === Full Screen Mode Layout Styles === */
body.fs-active {
    overflow: hidden !important;
}

.tp-test-wrapper.fs-mode {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    background: #f4f6fa !important;
    padding: 20px 24px !important;
    overflow-y: auto !important;
    width: 100vw !important;
    height: 100vh !important;
}

.tp-test-wrapper.fs-mode .tp-test-main-card {
    max-width: 1280px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 28px 36px !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1) !important;
}

/* === Test Setting Button & Popup Modal Styles === */
.tp-btn-settings {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    box-shadow: none;
}

.tp-btn-settings i {
    color: #4f46e5;
}

.tp-btn-settings:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

.tp-setting-card {
    background: #ffffff;
    border-radius: 24px;
    max-width: 680px;
    width: 92%;
    padding: 32px 34px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    position: relative;
    animation: modalPop 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tp-setting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.tp-setting-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* === Read Me Button & Info Alert Styles === */
.tp-readme-btn {
    background: #eef2ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
    transition: all 0.15s ease-in-out;
    font-family: 'Inter', sans-serif;
}

.tp-readme-btn i {
    font-family: "Font Awesome 6 Free", "FontAwesome" !important;
    font-weight: 900 !important;
    font-style: normal;
    font-size: 0.85rem;
    display: inline-block;
    line-height: 1;
}

.tp-readme-btn.attention-anim {
    animation: readmeAttention 1.2s ease-in-out infinite;
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

@keyframes readmeAttention {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }
    30% {
        transform: scale(1.08);
        box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.2);
    }
    60% {
        transform: scale(0.96);
        box-shadow: 0 0 0 8px rgba(79, 70, 229, 0.05);
    }
}

.tp-readme-btn:hover {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

.tp-readme-alert {
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 14px;
    padding: 16px 18px;
    margin: 12px 0 16px;
}

.tp-readme-alert-header {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-family: 'Noto Sans Bengali', 'Inter', sans-serif;
}

.tp-readme-close-btn {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: #0284c7;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.tp-readme-close-btn:hover {
    background: #bae6fd;
    color: #0369a1;
}

.tp-readme-alert-body {
    font-size: 0.85rem;
    line-height: 1.65;
    color: #1e293b;
    font-family: 'Noto Sans Bengali', 'Vrinda', 'Segoe UI', sans-serif;
}

.tp-readme-alert-body p {
    margin: 0 0 8px;
}

.tp-readme-alert-body p:last-child {
    margin-bottom: 0;
}

.tp-setting-title i {
    color: #4f46e5;
}

.tp-setting-close-btn {
    background: #f1f5f9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.4rem;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.tp-setting-close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

.tp-setting-body {
    padding: 8px 0 16px;
}

.tp-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f8fafc;
}

.tp-setting-item:last-child {
    border-bottom: none;
}

.tp-setting-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tp-setting-info .icon-box {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.tp-setting-info .text-group {
    display: flex;
    flex-direction: column;
}

.tp-setting-info .label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.tp-setting-info .sublabel {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 2px;
}

.tp-setting-action {
    flex-shrink: 0;
}

.tp-setting-footer {
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

/* === Toggle Switch Control in Test Setting Modal === */
.tp-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.tp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.tp-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cbd5e1;
    transition: 0.22s ease;
    border-radius: 34px;
}

.tp-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: 0.22s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.tp-switch input:checked + .tp-slider {
    background-color: #4f46e5;
}

.tp-switch input:checked + .tp-slider::before {
    transform: translateX(22px);
}

/* === Backspace Options Radio Group Styles === */
.tp-setting-item-block {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
}

.tp-backspace-group {
    display: flex;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
}

.tp-radio-btn {
    flex: 1 1 0;
    min-width: 130px;
    cursor: pointer;
    user-select: none;
}

.tp-radio-btn input[type="radio"] {
    display: none;
}

.tp-radio-btn .btn-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 10px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    text-align: center;
    transition: all 0.18s ease;
    white-space: nowrap;
}

.tp-radio-btn input[type="radio"]:checked + .btn-box {
    background: #eef2ff;
    border-color: #4f46e5;
    color: #4f46e5;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.tp-radio-btn:hover .btn-box {
    border-color: #cbd5e1;
    color: #0f172a;
}

/* === Minimal Inline Exam Results Section === */
.tp-result-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
    animation: fadeInResult 0.3s ease-out;
}

@keyframes fadeInResult {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.tp-result-card-inline {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px 26px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
}

.tp-result-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.tp-result-main-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tp-result-main-title i {
    color: #4f46e5;
}

.tp-result-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0;
}

/* === Single Table Result Format Styles === */
.tp-table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.02);
}

.tp-single-result-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
    color: #1e293b;
}

.tp-single-result-table th,
.tp-single-result-table td {
    padding: 11px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.tp-single-result-table thead tr {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.tp-single-result-table th.tp-th-cat {
    font-size: 0.82rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid #e2e8f0;
    padding: 13px 16px;
}

.tp-single-result-table th.tp-th-cat i {
    color: #4f46e5;
    margin-right: 6px;
}

.tp-single-result-table tbody tr:hover {
    background-color: #f8fafc;
}

.tp-single-result-table tr:last-child td {
    border-bottom: none;
}

.tp-single-result-table .tp-hero-row {
    background-color: #f0f4ff;
    border-top: 1.5px solid #c7d2fe;
    border-bottom: 1.5px solid #c7d2fe;
}

.tp-single-result-table .tp-hero-row td {
    padding: 13px 16px;
}

.tp-single-result-table .tp-danger-row {
    background-color: #fff5f5;
}

.tp-lbl-cell {
    color: #64748b;
    font-weight: 500;
    width: 32%;
}

.tp-val-cell {
    font-weight: 700;
    color: #0f172a;
    width: 18%;
    font-variant-numeric: tabular-nums;
}

/* === Easy Step-by-Step Calculation Breakdown Styles === */
.tp-calc-breakdown-container {
    margin: 24px 0;
    padding-top: 18px;
    border-top: 1px dashed #e2e8f0;
}

.tp-easy-calc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.tp-easy-step-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
    transition: all 0.15s ease-in-out;
}

.tp-easy-step-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.step-num-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #c7d2fe;
}

.step-content {
    flex: 1;
}

.step-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.step-desc {
    font-size: 0.81rem;
    color: #475569;
    line-height: 1.55;
    margin-bottom: 10px;
}

.step-result-pill {
    display: inline-block;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

@media (max-width: 768px) {
    .tp-easy-calc-grid {
        grid-template-columns: 1fr;
    }
}

.tp-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tp-card-header i {
    color: #4f46e5;
    font-size: 0.95rem;
}

.val-green { color: #16a34a !important; }
.val-indigo { color: #4f46e5 !important; }
.val-blue { color: #2563eb !important; }
.val-red { color: #dc2626 !important; }

/* === Text Comparison Breakdown Styles === */
.tp-comparison-container {
    margin: 20px 0 24px;
    padding-top: 18px;
    border-top: 1px dashed #e2e8f0;
}

.tp-comparison-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
}

.tp-comp-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tp-comp-title i {
    color: #4f46e5;
}

.tp-comp-text {
    font-family: 'Noto Sans Bengali', 'Vrinda', 'Segoe UI', sans-serif;
    font-size: 18px;
    line-height: 2.15;
    color: #0f172a;
    word-break: break-word;
}

.comp-word {
    display: inline;
    padding: 2px 5px;
    border-radius: 5px;
    margin-right: 2px;
    font-weight: 500;
}

.comp-word.comp-correct {
    color: #15803d;
    background: #dcfce7;
}

.comp-word.comp-wrong {
    color: #b91c1c;
    background: #fee2e2;
    text-decoration: underline;
    text-decoration-color: #ef4444;
}

.comp-word.comp-omitted {
    color: #c2410c;
    background: #ffedd5;
    text-decoration: line-through;
}

.comp-word.comp-extra {
    color: #6d28d9;
    background: #f3e8ff;
}

/* === Minimal Error Analysis Breakdown Styles === */
.tp-minimal-mistakes-wrap {
    margin: 20px 0 24px;
    padding-top: 16px;
    border-top: 1px dashed #e2e8f0;
}

.tp-minimal-sec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.tp-sec-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tp-sec-title i {
    color: #4f46e5;
    margin-right: 6px;
}

.tp-sec-sub {
    font-size: 0.78rem;
    color: #94a3b8;
}

.tp-minimal-mistakes-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tp-minimal-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.tp-minimal-card-hdr {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.8rem;
    font-weight: 700;
}

.hdr-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.danger-lbl { color: #b91c1c; }
.warning-lbl { color: #b45309; }
.omission-lbl { color: #c2410c; }

.hdr-count {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 1px 8px;
    border-radius: 10px;
}

.danger-cnt { background: #fee2e2; color: #b91c1c; }
.warning-cnt { background: #fef3c7; color: #b45309; }
.omission-cnt { background: #ffedd5; color: #c2410c; }

.tp-table-minimal {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
}

.tp-table-minimal th {
    background: #ffffff;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 6px 14px;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
}

.tp-table-minimal td {
    padding: 7px 14px;
    border-bottom: 1px solid #f8fafc;
    font-family: 'Noto Sans Bengali', 'Vrinda', 'Inter', sans-serif;
    color: #1e293b;
}

.tp-table-minimal tr:last-child td {
    border-bottom: none;
}

.tp-idx-cell {
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
}

.comp-orig-txt {
    color: #15803d !important;
    font-weight: 600;
    font-size: 0.95rem;
}

.comp-typed-wrong {
    color: #dc2626 !important;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: underline;
    text-decoration-color: #ef4444;
}

.comp-typed-half {
    color: #d97706 !important;
    font-weight: 600;
    font-size: 0.95rem;
}

.comp-typed-omitted {
    color: #ea580c !important;
    font-weight: 600;
    font-size: 0.85rem;
    font-style: italic;
}

.tp-minimal-empty-cell {
    text-align: center !important;
    color: #94a3b8 !important;
    font-size: 0.8rem !important;
    padding: 10px 14px !important;
    background: #ffffff !important;
}

/* === Scrollable Table Container for Omission Breakdown === */
.tp-scrollable-table {
    max-height: 200px;
    overflow-y: auto;
    scroll-behavior: smooth;
    margin-bottom: 0 !important;
}

.tp-scrollable-table::-webkit-scrollbar {
    width: 5px;
}

.tp-scrollable-table::-webkit-scrollbar-track {
    background: #f8fafc;
}

.tp-scrollable-table::-webkit-scrollbar-thumb {
    background: #fed7aa;
    border-radius: 3px;
}

.tp-scrollable-table::-webkit-scrollbar-thumb:hover {
    background: #f97316;
}

.tp-scrollable-table table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.tp-result-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

/* ==========================================================================
   Responsive 2-Column Layout & Sticky Right Side Ad Area
   ========================================================================== */
.tp-test-layout-grid {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
}

.tp-test-main-col {
    flex: 1;
    min-width: 0;
}

.tp-test-sidebar-col {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    align-self: flex-start;
}

.tp-sidebar-ad-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05), 0 2px 6px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: all 0.2s ease;
}

.tp-sidebar-ad-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tp-sidebar-ad-header i {
    color: #4f46e5;
    margin-right: 6px;
}

.tp-sidebar-ad-body {
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 280px;
    box-sizing: border-box;
}

/* Ad Placeholder Styling */
.tp-ad-placeholder {
    width: 100%;
    min-height: 280px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    text-align: center;
    box-sizing: border-box;
}

.tp-ad-placeholder .tp-ad-icon {
    font-size: 2.2rem;
    color: #4f46e5;
    margin-bottom: 10px;
}

.tp-ad-placeholder .tp-ad-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 4px;
}

.tp-ad-placeholder .tp-ad-size {
    font-size: 0.82rem;
    font-weight: 600;
    color: #4f46e5;
    margin-bottom: 6px;
    background: #eef2ff;
    padding: 3px 10px;
    border-radius: 12px;
}

.tp-ad-placeholder .tp-ad-desc {
    font-size: 0.78rem;
    color: #64748b;
}

/* Responsive Rules for Tablet & Mobile */
@media (max-width: 1024px) {
    .tp-test-layout-grid {
        flex-direction: column;
        gap: 20px;
    }
    
    .tp-test-sidebar-col {
        width: 100%;
        position: static;
    }
    
    .tp-sidebar-ad-body {
        min-height: 120px;
    }
    
    .tp-ad-placeholder {
        min-height: 140px;
        padding: 16px;
    }
}

/* Fullscreen Mode: Show Right Sidebar Ad alongside main workstation */
.tp-test-wrapper.fs-mode .tp-test-layout-grid {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 24px !important;
    width: 100% !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
}

.tp-test-wrapper.fs-mode .tp-test-main-col {
    flex: 1 !important;
    min-width: 0 !important;
    width: auto !important;
}

.tp-test-wrapper.fs-mode .tp-test-sidebar-col {
    display: block !important;
    width: 320px !important;
    flex-shrink: 0 !important;
    position: sticky !important;
    top: 20px !important;
    align-self: flex-start !important;
}



