.typing-area { 
  background: #ffffff; 
  padding: 16px; 
  border-radius: 10px; 
  border: 1px solid rgba(0,0,0,0.05); 
  margin-bottom: 12px; 
  min-height: 150px; 
  display: flex; 
  flex-direction: column; 
  transition: var(--transition);
  box-shadow: var(--shadow);
}
[data-theme="dark"] .typing-area { 
  background: #0b0c0d; 
  border-color: rgba(255,255,255,0.02); 
}
.text-display { 
  font-family: var(--mono); 
  font-size: 18px; 
  line-height: 1.7; 
  color: #495057; 
  white-space: pre-wrap; 
  overflow: auto; 
  padding: 6px; 
  border-radius: 6px; 
  flex: 1; 
  transition: var(--transition);
  position: relative;
}
[data-theme="dark"] .text-display { color: #d5d8db; }
.controls-row { 
  display: flex; 
  gap: 10px; 
  align-items: center; 
  margin-top: 10px; 
  flex-wrap: wrap; 
}
.typing-controls { 
  display: flex; 
  gap: 8px; 
  align-items: center; 
  width: 100%; 
}
.text-input { 
  flex: 1; 
  padding: 10px; 
  border-radius: 10px; 
  border: 1px solid rgba(0,0,0,0.1); 
  background: #ffffff; 
  color: #212529; 
  font-size: 16px; 
  transition: var(--transition);
  font-family: var(--mono);
}
[data-theme="dark"] .text-input { 
  background: #0b0c0d; 
  border-color: rgba(255,255,255,0.04); 
  color: #fff; 
}
.text-input:focus { 
  outline: 2px solid var(--accent); 
  box-shadow: 0 0 0 3px rgba(255,159,28,0.2);
}
.small { font-size: 12px; color: var(--muted); }

.char { 
  display: inline; 
  transition: color 0.1s, background-color 0.1s; 
  border-radius: 2px;
  position: relative;
}
.char.correct { color: var(--green); }
.char.incorrect { 
  color: var(--red); 
  background-color: rgba(220,53,69,0.1);
  text-decoration: line-through;
}
.char.current { 
  background: linear-gradient(90deg, rgba(255,159,28,0.12), transparent); 
  padding: 0 2px; 
  border-radius: 2px; 
  border-left: 3px solid var(--accent); 
  margin-left: -3px; 
  animation: pulse 1.5s infinite;
}
.word-highlight { 
  background: rgba(111,108,255,0.06); 
  border-radius: 4px; 
  padding: 0 2px; 
}

.text-display.cursor-line .char.current {
  border-left: 2px solid var(--accent);
  background: transparent;
  animation: none;
}

.text-display.cursor-underline .char.current {
  border-left: none;
  border-bottom: 2px solid var(--accent);
  background: transparent;
  animation: none;
}

.text-display.cursor-none .char.current {
  border-left: none;
  background: transparent;
  animation: none;
}