/* ROOT CONTAINER – default (English) */
.ttp-container {
    max-width: 960px;
    margin: 20px auto;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
}

/* Hindi */
.ttp-container[data-lang="HI"] {
    font-family: Mangal, Arial, sans-serif;
}


/* === TOP TOOLBAR === */
.ttp-toolbar {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    margin-bottom: 12px;
}

.ttp-toolbar label {
    font-weight: 600;
    font-size: 14px;
}

.ttp-inline select {
    border: 1px solid #d0d0d0;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

/* === MAIN BUTTONS === */
.ttp-random-btn,
.ttp-start-btn,
.ttp-submit-btn {
    padding: 8px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-left: 6px;
}

.ttp-random-btn { background: #6c757d; color:#fff; }
.ttp-start-btn { background: #28a745; color:#fff; }
.ttp-submit-btn { background: #dc3545; color:#fff; }

/* === PARAGRAPH SELECT === */
.ttp-paragraph-box {
    display:flex;
    gap:10px;
    margin-bottom:12px;
}

.ttp-paragraph-select {
    flex:1;
    padding: 8px 10px;
    border-radius: 6px;
    border:1px solid #d0d0d0;
    font-size: 14px;
}

/* === LIVE STATS === */
.ttp-stats {
    display:flex;
    gap:18px;
    margin: 15px 0;
    flex-wrap:wrap;
}

.ttp-circle {
    min-width:95px;
    height:75px;
    border-radius:8px;
    background:#f1faff;
    border:1px solid #cde6ff;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    color:#007bff;
}
.ttp-circle span {
    font-size:20px;
    font-weight:700;
}

/* === TYPING SECTION === */
.ttp-typing-box {
    padding:14px;
    background:#ffffff;
    border:1px solid #e0e0e0;
    border-radius:8px;
    box-shadow:0 1px 3px rgba(0,0,0,0.05);
}

.ttp-text-content {
    min-height: 150px;
    max-height: 240px;
    padding: 10px 12px;
    font-size: 18px;
    line-height: 1.55;
    background: #fdfdfd;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
    overflow-y: auto;
    user-select: none;
}
.ttp-text-content {
    scroll-behavior: smooth;
}


/* WORD STATES */
/* === ANTI-FLUCTUATION WORD RENDERING === */
.ttp-word {
    display: inline;
    white-space: nowrap;
    padding: 0 2px;
    border-radius: 3px;
    transition: background 0.1s, outline 0.1s;
}

.correct-word {
    color: #009a00;
}

.wrong-word {
    color: #d60000;
}

.current-word {
    background: rgba(255, 255, 0, 0.6);
    outline: 2px solid rgba(255, 255, 0, 0.8);
    outline-offset: 1px;
    color: #000;
}

/* TEXTAREA */
.ttp-input-area {
    width:100%;
    height:100px;
    margin-top:10px;
    border:1px solid #d0d0d0;
    border-radius:6px;
    padding:10px;
    font-size:18px;
    outline:none;
    background: #f7f9fc;   /* light bluish/grey */
}



.ttp-input-area:focus {
    border-color:#007bff;
    box-shadow:0 0 0 2px rgba(0,123,255,0.2);
    background: #f7f9fc;
}

/* === PERFORMANCE PAGE (CARD UI) === */
.ttp-performance-page {
    max-width:960px;
    margin:20px auto;
    padding:16px;
    border:1px solid #ddd;
    border-radius:8px;
    background:#ffffff;
}


/* CARD GRID */
.ttp-stats-grid {
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(160px,1fr));
    gap:12px;
    margin-bottom:16px;
}
.ttp-card {
    padding:10px 12px;
    border:1px solid #e0e0e0;
    border-radius:6px;
    background:#fafafa;
    text-align:center;
}
.ttp-card label {
    font-size:12px;
    color:#666;
}
.ttp-card .val {
    font-size:18px;
    font-weight:700;
    margin-top:6px;
    color:#111;
}
.ttp-card .val.red { color:#dc3545; font-weight:700; }
.ttp-card .val.orange { color:#ff9800; font-weight:700; }

/* REMARKS */
.ttp-remarks-box {
    padding:10px;
    background:#fff8e1;
    border-left:4px solid #ff9800;
    border-radius:4px;
    margin-bottom:12px;
    font-size:14px;
    line-height:1.5;
}

/* REVIEW SECTION */
.ttp-review-title {
    margin:12px 0 6px;
    font-size:18px;
    font-weight:700;
}

.ttp-review-columns {
    display:flex;
    gap:20px;
    margin-top:10px;
}
.ttp-col { flex:1; }

.ttp-review-text {
    border:1px solid #d0d0d0;
    padding:10px;
    border-radius:6px;
    background:#fafafa;
    min-height:150px;
    font-size:13px;
    font-family:"Courier New", monospace;
    line-height:1.5;
    word-break: break-word;
}

/* REVIEW COLORS */
.review-correct { color:#28a745; font-weight:600; }
.review-wrong { color:#dc3545; font-weight:600; }
.review-empty { color:#999; font-style:italic; }

/* ACTION BUTTONS */
.ttp-action-row {
    margin-top:18px;
    text-align:center;
}
.ttp-action-row button {
    padding:8px 18px;
    font-size:14px;
    border-radius:6px;
    border:0;
    cursor:pointer;
    margin:0 6px;
    font-weight:600;
}
.ttp-retake-btn { background:#007bff; color:#fff; }
.ttp-close-performance { background:#6c757d; color:#fff; }

/* EXAM INFO BOX */
.ttp-exam-info {
    margin-top:18px;
    padding:12px;
    border:1px solid #ccc;
    background:#fafafa;
    border-radius:6px;
    font-size:14px;
    line-height:1.4;
}

/* MOBILE */
@media(max-width:768px){
    .ttp-review-columns { flex-direction:column; }
    .ttp-toolbar { flex-direction:column; align-items:flex-start; }
}


.ttp-result-success {
    color: #28a745 !important; /* green */
    font-weight: 700;
}

.ttp-result-fail {
    color: #dc3545 !important; /* red */
    font-weight: 700;
}



