* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f7fb;
    color: #1f2937;
}

.header {
    background: #1e40af;
    color: white;
    padding: 22px;
    text-align: center;
}

.logo {
    font-size: 30px;
    font-weight: bold;
}

.subtitle {
    margin-top: 6px;
    opacity: 0.9;
}

.container {
    width: 95%;
    max-width: 1200px;
    margin: 30px auto;
}


/* SETTINGS */

.settings-card {
    background: white;
    padding: 22px;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);

    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    align-items: end;
}

.setting {
    display: flex;
    flex-direction: column;
}

.setting label {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 7px;
}

.setting select {
    width: 100%;
    padding: 11px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    background: white;
    font-size: 15px;
}


/* BUTTONS */

button {
    border: none;
    border-radius: 7px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
}

.start-btn {
    background: #2563eb;
    color: white;
}

.start-btn:hover {
    background: #1d4ed8;
}

.submit-btn {
    background: #16a34a;
    color: white;
}

.submit-btn:hover {
    background: #15803d;
}

.restart-btn {
    background: #64748b;
    color: white;
}

.restart-btn:hover {
    background: #475569;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* STATISTICS */

.stats {
    margin-top: 22px;

    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.stat-box {
    background: white;
    padding: 18px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-box span {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 7px;
}

.stat-box strong {
    font-size: 24px;
}


/* PROGRESS */

.progress-container {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 20px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: #2563eb;
    transition: width 0.2s;
}


/* TEST */

.test-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.test-card h2 {
    margin-bottom: 18px;
}

.passage {
    border: 1px solid #d1d5db;
    background: #f9fafb;
    border-radius: 8px;
    padding: 22px;
    font-size: 20px;
    line-height: 1.8;
    min-height: 260px;
    margin-bottom: 20px;
    white-space: pre-wrap;
}


/* TEXTAREA */

textarea {
    width: 100%;
    min-height: 220px;
    resize: vertical;

    border: 2px solid #cbd5e1;
    border-radius: 8px;

    padding: 18px;

    font-size: 20px;
    line-height: 1.7;

    outline: none;
}

textarea:focus {
    border-color: #2563eb;
}

textarea:disabled {
    background: #f1f5f9;
}


/* FONT OPTIONS */

.mangal {
    font-family: "Mangal", "Noto Sans Devanagari", sans-serif;
}

.krutidev {
    font-family: "Kruti Dev 010", "Kruti Dev", Arial, sans-serif;
}


/* BUTTON AREA */

.buttons {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}


/* RESULT */

.result-card {
    margin-top: 25px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    text-align: center;
}

.result-card h2 {
    margin-bottom: 25px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.result-grid div {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
}

.result-grid span {
    display: block;
    color: #64748b;
    margin-bottom: 8px;
}

.result-grid strong {
    font-size: 28px;
}


/* HIDDEN */

.hidden {
    display: none;
}


/* FOOTER */

footer {
    text-align: center;
    padding: 25px;
    color: #64748b;
}


/* RESPONSIVE */

@media (max-width: 900px) {

    .settings-card {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats {
        grid-template-columns: repeat(3, 1fr);
    }

}

@media (max-width: 600px) {

    .settings-card {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .result-grid {
        grid-template-columns: 1fr 1fr;
    }

    .passage,
    textarea {
        font-size: 17px;
    }

    .buttons {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

}