/* typing-master.css – New UI Design */

/* ---------- Card Container ---------- */
.typing-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    padding: 30px 25px;
    margin-bottom: 30px;
    transition: box-shadow 0.3s ease;
}

.typing-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.card-header {
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 15px;
}

.card-header h2 {
    margin: 0 0 6px 0;
    font-weight: 600;
    color: #1a2b3c;
}

.card-header .subheading {
    font-size: 1rem;
    color: #6c7a8a;
    margin: 0;
}

/* ---------- Quote Display ---------- */
.quote-wrapper {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    border-left: 4px solid #3b82f6;
}

#quoteDisplay {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 1.5rem;
    line-height: 2.2;
    word-break: break-word;
    color: #1e293b;
    min-height: 80px;
}

#quoteDisplay span {
    transition: background-color 0.08s ease, color 0.08s ease;
    padding: 1px 0;
    border-radius: 2px;
}

#quoteDisplay span.correct {
    color: #22c55e;
    background: transparent;
}

#quoteDisplay span.incorrect {
    color: #ef4444;
    background: #fee2e2;
    text-decoration: underline wavy #ef4444;
}

#quoteDisplay span.current {
    background: #fde047;
    color: #1e293b;
    box-shadow: 0 0 0 2px #fde047;
}

/* ---------- Stats Dashboard ---------- */
.stats-dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
    justify-content: space-between;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 14px 24px;
    margin-bottom: 18px;
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    min-width: 40px;
    text-align: center;
}

.stat-unit {
    font-size: 0.8rem;
    color: #64748b;
    margin-left: 2px;
}

/* ---------- Progress Bar ---------- */
.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.progress-container .progress {
    flex: 1;
    background-color: #e2e8f0;
    border-radius: 20px;
    height: 6px;
    overflow: hidden;
}

.progress-container .progress-bar {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.25s ease;
    border-radius: 20px;
}

.progress-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    min-width: 40px;
    text-align: right;
}

/* ---------- Input Area ---------- */
.input-group {
    margin-bottom: 20px;
}

#quoteInput {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
    resize: vertical;
    min-height: 120px;
}

#quoteInput:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    outline: none;
}

#quoteInput:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
}

/* ---------- Buttons ---------- */
.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.actions .btn {
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: #3b82f6;
    color: #fff;
}
.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-default {
    background: #e2e8f0;
    color: #1e293b;
}
.btn-default:hover {
    background: #cbd5e1;
    transform: translateY(-2px);
}

/* ---------- Instructions (collapsible) ---------- */
.instructions-wrapper {
    margin-top: 25px;
}

.instructions-details {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 20px;
    border: 1px solid #e2e8f0;
}

.instructions-details summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    color: #1e293b;
    padding: 8px 0;
    outline: none;
}

.instructions-details summary:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.instructions-details summary i {
    margin-right: 8px;
    color: #3b82f6;
}

.instructions-details .ins {
    padding-left: 24px;
    margin-top: 12px;
    line-height: 1.7;
}

/* ---------- Image ---------- */
.typing-image {
    text-align: center;
    margin: 30px 0 10px;
}

.typing-image img {
    max-width: 100%;
    height: auto;
    opacity: 0.8;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .typing-card {
        padding: 20px 15px;
    }
    #quoteDisplay {
        font-size: 1.2rem;
        line-height: 1.8;
    }
    .stats-dashboard {
        gap: 12px;
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    .stat-item {
        flex: 1 0 40%;
    }
    .actions .btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}