/* GLOBAL */
* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background: #f1f1f1; margin: 0; }
.hidden { display: none; }

/* LOGIN PAGE */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 40px; }
.login-card { background: #fff; border-radius: 10px; padding: 60px 68px; width: 648px; max-width: 90vw; box-shadow: 0 6px 24px rgba(0,0,0,0.08); }
.app-title { text-align: center; font-size: 60px; font-weight: 800; margin: 0 0 6px; }
.app-sub { text-align: center; font-size: 14px; color: #444; margin-bottom: 24px; }
.login-form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 16px; }
.form-label { font-weight: 800; font-size: 25px; color: #222; }
.form-input { font-size: 20px; padding: 10px 12px; border: 2px solid #cfcfcf; border-radius: 6px; outline: none; }
.form-input:focus { border-color: #007a5a; box-shadow: 0 0 0 3px rgba(0,122,90,0.12); }
.primary-btn { margin-top: 8px; justify-self: center; font-size: 25px; padding: 12px 26px; background: #0a896e; color: #fff; border: none; border-radius: 6px; cursor: pointer; box-shadow: 0 2px 0 #0a6f59; }
.primary-btn:hover { background: #087c63; }

/* MAIN LAYOUT */
.main-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; padding: 24px; }
.container { background: #fff; padding: 24px; border-radius: 8px; }
.right-panel { display: flex; flex-direction: column; gap: 16px; }
.displayText { font-size: 30px; line-height: 1.7; margin-bottom: 14px; }
.current { background-color: #fff3bf; border-bottom: 2px solid #0078D4; }

/* Typing shell (overlay + textarea) */
.typing-shell { position: relative; border: 1px solid #222; border-radius: 4px; background: #fff; max-height: 380px; overflow-y: auto; }
.typing-input, .typing-overlay { font: 30px/1.7 Arial, sans-serif; padding: 12px; min-height: 380px; width: 100%; white-space: pre-wrap; word-wrap: break-word; }
.typing-input { position: relative; color: transparent; caret-color: #111; background: transparent; border: 0; resize: none; outline: none; }
.typing-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; color: #000; }
.correct { color: #000; }
.incorrect { color: #d83b01; }
.inline-stats { display: flex; justify-content: space-between; font-size: 20px; color: #333; margin: 6px 4px; }
.button-group { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.big-btn { font-size: 20px; padding: 10px 16px; cursor: pointer; }
#finishedBtn { background: #0078D4; color: #fff; }
#finishedBtn:hover { background: #106EBE; }

/* Right results */
.result-card { background: #fff; border-radius: 8px; padding: 18px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.result-title { font-size: 40px; font-weight: 900; margin-bottom: 8px; }
.result-line { font-size: 35px; margin: 6px 0; color: #111; }
.result-line.blue { color: #106EBE; font-weight: 800; font-size: 35px; }

/* History */
.history-panel { background: #fff; border-radius: 8px; padding: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.history-panel h2 { font-size: 18px; text-align: center; margin: 6px 0 10px; }
.history-panel ul { list-style: none; padding: 0; margin: 0; }
.history-panel li { font-size: 20px; background: #f6f6f6; border: 1px solid #eee; border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; }
