/*=============== TYPING TRAINER ===============*/
.typing__container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/*=============== CONFIGURATION PANEL ===============*/
.typing__config {
  background: var(--container-color);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px hsla(207, 24%, 35%, 0.1);
  transition: background 0.4s, box-shadow 0.4s;
}

.typing__config-grid {
  display: grid;
  gap: 1.5rem;
}

.typing__config-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.typing__config-group--checkboxes {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Dropdowns row layout */
.typing__config-group--dropdowns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.typing__dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media screen and (min-width: 768px) {
  .typing__config-group--dropdowns {
    grid-template-columns: 2fr 1.5fr 2fr 0.8fr;
    grid-column: 1 / -1;
  }
}

@media screen and (min-width: 576px) and (max-width: 767px) {
  .typing__config-group--dropdowns {
    grid-template-columns: 1.5fr 1fr 1.5fr 0.7fr;
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 575px) {
  .typing__config-group--dropdowns {
    grid-template-columns: 1fr 1fr;
  }

  .typing__dropdown-item--text-type,
  .typing__dropdown-item--language {
    grid-column: 1 / -1;
  }
}

.typing__label {
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  color: var(--title-color);
  transition: color 0.4s;
}

.typing__mode-buttons,
.typing__value-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.typing__mode-btn,
.typing__value-btn {
  flex: 1;
  min-width: 80px;
  padding: 0.75rem 1rem;
  background: var(--body-color);
  border: 2px solid transparent;
  border-radius: 0.5rem;
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.typing__mode-btn:hover,
.typing__value-btn:hover {
  background: var(--first-color);
  color: #fff;
  transform: translateY(-2px);
}

.typing__mode-btn--active,
.typing__value-btn--active {
  background: var(--first-color);
  color: #fff;
  border-color: var(--first-color);
}

.typing__select {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 0.75rem;
  border: 2px solid var(--body-color);
  border-radius: 0.5rem;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  color: var(--text-color);
  background-color: var(--body-color);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: calc(100% - 0.5rem) center;
  background-size: 1.25rem;
  cursor: pointer;
  transition: all 0.3s;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.typing__select:focus {
  outline: none;
  border-color: var(--first-color);
}

.typing__checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.typing__checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.typing__checkbox-text {
  font-size: var(--normal-font-size);
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.4s;
  position: relative;
  padding-left: 28px;
}

.typing__checkbox-text i {
  color: var(--first-color);
}

/* Custom checkbox box */
.typing__checkbox-text::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-color-light);
  border-radius: 0.25rem;
  background-color: transparent;
  transition: all 0.3s;
}

/* Checkbox checked state - box */
.typing__checkbox:checked ~ .typing__checkbox-text::before {
  border-color: var(--first-color);
  background-color: var(--first-color);
}

/* Checkmark */
.typing__checkbox:checked ~ .typing__checkbox-text::after {
  content: '';
  position: absolute;
  left: 8.5px;
  top: 4.5px;
  width: 3.5px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* Disabled checkbox state */
.typing__checkbox-label--disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.typing__checkbox-label--disabled .typing__checkbox-text {
  color: var(--text-color-light);
}

.typing__checkbox-label--disabled .typing__checkbox {
  cursor: not-allowed;
}

/*=============== TYPING TEST AREA ===============*/
.typing__test-area {
  position: relative;
  background: var(--container-color);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px hsla(207, 24%, 35%, 0.1);
  transition: background 0.4s, box-shadow 0.4s;
}

.typing__stats-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
  padding-bottom: 1rem;
}

@media screen and (max-width: 640px) {
  .typing__stats-bar {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

.typing__stat-item--action {
  display: flex;
  align-items: center;
  justify-content: center;
}

.typing__stat-action-btn {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  color: var(--title-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.typing__stat-action-btn:hover {
  color: var(--first-color);
}

.typing__stat-item {
  text-align: center;
}

.typing__stat-item--timer {
  color: var(--first-color);
}

.typing__stat-label {
  display: block;
  font-size: var(--small-font-size);
  color: var(--text-color-light);
  margin-bottom: 0.25rem;
  transition: color 0.4s;
}

.typing__stat-value {
  display: block;
  font-size: var(--h2-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
  transition: color 0.4s;
}

.typing__stat-item--timer .typing__stat-value {
  color: var(--first-color);
}

.typing__text-display {
  font-family: 'Courier New', monospace;
  font-size: 20px; /* Default, overridden by JS */
  line-height: 1.8;
  color: var(--text-color-light);
  padding: 1.5rem;
  background: var(--body-color);
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  /* Height is calculated dynamically in JS based on font size */
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  user-select: none;
  transition: background 0.4s, color 0.4s, max-height 0.3s ease;
  position: relative;
  cursor: text;
  word-break: keep-all;
  overflow-wrap: normal;
}

/* Hide scrollbar while keeping scroll functionality */
.typing__text-display::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

.typing__text-display {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

/* Font Options */
.typing__text-display.font-mono {
  font-family: 'Courier New', monospace;
}

.typing__text-display.font-consolas {
  font-family: 'Consolas', 'Courier New', monospace;
}

.typing__text-display.font-monaco {
  font-family: 'Monaco', 'Courier New', monospace;
}

.typing__text-display.font-menlo {
  font-family: 'Menlo', 'Monaco', monospace;
}

.typing__text-display.font-roboto-mono {
  font-family: 'Roboto Mono', monospace;
}

.typing__text-display.font-source-code {
  font-family: 'Source Code Pro', monospace;
}

.typing__text-display.font-fira-code {
  font-family: 'Fira Code', monospace;
}

.typing__text-display.font-jetbrains {
  font-family: 'JetBrains Mono', monospace;
}

.typing__text-display.font-cascadia {
  font-family: 'Cascadia Code', 'Consolas', monospace;
}

.typing__text-display.font-hack {
  font-family: 'Hack', 'Consolas', 'Courier New', monospace;
}

.typing__text-display.font-ubuntu-mono {
  font-family: 'Ubuntu Mono', monospace;
}

.typing__text-display.font-inconsolata {
  font-family: 'Inconsolata', monospace;
}

.typing__text-display .word {
  display: inline-block;
  margin-right: 0.2em;
  white-space: nowrap;
}

.typing__text-display span {
  position: relative;
}

.typing__text-display .char-correct {
  color: var(--title-color);
}

.typing__text-display .char-incorrect {
  color: #ff4757;
  background: hsla(357, 100%, 63%, 0.2);
  border-radius: 2px;
}

.typing__text-display .char-current {
  position: relative;
}

/* === SMOOTH CARET ELEMENT (separate positioned element) === */
.typing__caret {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  background: var(--first-color);
  opacity: 1;
}

/* Smooth caret transition when enabled */
.typing__text-display.smooth-caret .typing__caret {
  transition: left 120ms linear, top 120ms linear;
}

/* Line caret style (default) */
.typing__caret--line {
  width: 3px;
  border-radius: 1px;
}

/* Block caret style - hidden, we style the character directly instead */
.typing__caret--block {
  display: none;
}

/* Underline caret style */
.typing__caret--underline {
  height: 3px !important;
  border-radius: 1px;
}

/* === BLINKING ANIMATIONS === */

/* Line/underline caret blinking */
.typing__text-display.caret-blink .typing__caret--line,
.typing__text-display.caret-blink .typing__caret--underline {
  animation: blink-smooth 1.2s ease-in-out infinite;
}

/* Block caret blinking - from semi-transparent to fully transparent */
.typing__text-display.caret-blink .typing__caret--block {
  animation: blink-block 1.2s ease-in-out infinite;
}

/* Smooth fade in/out animation for line/underline */
@keyframes blink-smooth {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Block caret blink animation (from 0.7 to 0) */
@keyframes blink-block {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 0; }
}

/* === LEGACY: Hide pseudo-element carets when using smooth caret element === */
.typing__text-display .char-current::before {
  display: none;
}

/* Character behind caret - use default untyped text color */
.typing__text-display .char-current {
  color: var(--text-color-light);
}

/* Terminal-style block cursor - inverted colors on the character itself */
.typing__text-display.caret-block .char-current {
  background: var(--first-color);
  color: var(--container-color);
  border-radius: 2px;
}

/* Block cursor blinking - animate the character's background */
.typing__text-display.caret-block.caret-blink .char-current {
  animation: blink-block-terminal 1.2s ease-in-out infinite;
}

@keyframes blink-block-terminal {
  0%, 100% {
    background: var(--first-color);
    color: var(--container-color);
  }
  50% {
    background: transparent;
    color: var(--text-color-light);
  }
}

.typing__input {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.typing__graph-container {
  margin-bottom: 1.5rem;
}

.typing__graph-label {
  display: block;
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  color: var(--text-color-light);
  margin-bottom: 0.75rem;
  transition: color 0.4s;
}

.typing__graph {
  width: 100%;
  height: 100px;
  background: var(--body-color);
  border-radius: 0.75rem;
  padding: 0.5rem;
  transition: background 0.4s;
}

.typing__controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.typing__btn {
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: 0.5rem;
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.typing__btn--primary {
  background: var(--first-color);
  color: #fff;
}

.typing__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px hsla(207, 65%, 65%, 0.4);
}

.typing__btn--secondary {
  background: var(--container-color);
  color: var(--text-color);
}

.typing__btn--secondary:hover {
  background: var(--body-color);
}

/*=============== RESULTS MODAL ===============*/
.typing__modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: hsla(207, 4%, 16%, 0.7);
  z-index: var(--z-fixed);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s;
}

.typing__modal.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.typing__modal-content {
  background: var(--container-color);
  border-radius: 1rem;
  max-width: 450px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px hsla(207, 24%, 8%, 0.3);
  animation: slideUp 0.3s;
  transition: background 0.4s;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.typing__modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--body-color);
}

.typing__modal-title {
  font-size: var(--h3-font-size);
  color: var(--title-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  transition: color 0.4s;
}

.typing__modal-title i {
  color: var(--first-color);
  font-size: 1.25rem;
}

.typing__modal-close {
  font-size: 1.5rem;
  color: var(--text-color);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  transition: all 0.3s;
}

.typing__modal-close:hover {
  background: transparent;
  color: var(--text-color);
}

.typing__modal-body {
  padding: 1rem 1.25rem;
}

.typing__results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
  margin-bottom: 0.875rem;
}

.typing__result-card {
  background: var(--body-color);
  border-radius: 0.5rem;
  padding: 0.875rem;
  text-align: center;
  transition: background 0.4s, transform 0.3s;
}

.typing__result-card:hover {
  transform: translateY(-2px);
}

.typing__result-card--primary {
  background: var(--body-color);
  color: var(--text-color);
}

.typing__result-card--primary .typing__result-icon {
  color: var(--first-color);
}

.typing__result-card--primary .typing__result-value,
.typing__result-card--primary .typing__result-label {
  color: inherit;
}

.typing__result-icon {
  font-size: 1.25rem;
  color: var(--first-color);
  margin-bottom: 0.375rem;
}

.typing__result-value {
  font-size: var(--h3-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
  margin-bottom: 0.125rem;
  line-height: 1.2;
  transition: color 0.4s;
}

.typing__result-label {
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
  line-height: 1.2;
  transition: color 0.4s;
}

.typing__result-details {
  background: var(--body-color);
  border-radius: 0.5rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.4s;
}

.typing__result-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.typing__result-detail-label {
  font-size: var(--small-font-size);
  color: var(--title-color);
  transition: color 0.4s;
}

.typing__result-detail-value {
  font-size: var(--small-font-size);
  font-weight: var(--font-medium);
  color: var(--title-color);
  transition: color 0.4s;
}

.typing__modal-footer {
  display: flex;
  flex-direction: row;
  gap: 0.625rem;
  padding: 1rem 1.25rem;
  border-top: 2px solid var(--body-color);
}

.typing__modal-footer .typing__btn {
  flex: 1;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  font-size: var(--small-font-size);
}

.typing__modal-footer .typing__btn {
  background: var(--body-color);
  color: var(--text-color);
  border: 1px solid var(--body-color);
}

.typing__modal-footer .typing__btn:hover {
  background: var(--first-color);
  color: #fff;
  border-color: var(--first-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px hsla(207, 65%, 65%, 0.35);
}

/*=============== INSTRUCTIONS ===============*/
.typing__instructions {
  background-color: var(--container-color);
  padding: 2rem;
  border-radius: 1rem;
  margin-bottom: 2rem;
  transition: background-color 0.4s;
}

.typing__instructions-title {
  font-size: var(--h2-font-size);
  color: var(--title-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.4s;
}

.typing__instructions-title i {
  color: var(--first-color);
}

.typing__instructions-list {
  list-style: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.typing__instructions-list li {
  color: var(--text-color);
  margin-bottom: 0.5rem;
  line-height: 1.6;
  transition: color 0.4s;
}

.typing__tip {
  padding: 1rem;
  background-color: var(--body-color);
  border-left: 4px solid var(--first-color);
  border-radius: 0.5rem;
  color: var(--text-color);
  line-height: 1.6;
  transition: background-color 0.4s, color 0.4s;
}

.typing__tip i {
  color: var(--first-color);
  margin-right: 0.5rem;
}

/*=============== STATS SECTION ===============*/
.typing__stats {
  background: var(--container-color);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px hsla(207, 24%, 35%, 0.1);
  transition: background 0.4s, box-shadow 0.4s;
}

.typing__stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.typing__stats-title {
  font-size: var(--h2-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.4s;
}

.typing__stats-title i {
  font-size: 1.5rem;
  color: var(--first-color);
}

.typing__stats-since {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.4s;
}

.typing__stats-since i {
  font-size: 0.9rem;
  color: var(--first-color);
}

.typing__stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.typing__stat-card {
  background: var(--body-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: background 0.4s, transform 0.3s;
  border: 2px solid transparent;
}

.typing__stat-card:hover {
  transform: translateY(-2px);
}

.typing__stat-card--admin {
  border-color: hsla(207, 65%, 65%, 0.3);
}

.typing__stat-icon {
  font-size: 2rem;
  color: var(--first-color);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  background: var(--first-color-alt);
  border-radius: 0.5rem;
  flex-shrink: 0;
}

.typing__stat-content {
  flex: 1;
  min-width: 0;
}

.typing__stat-value {
  font-size: var(--h3-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
  line-height: 1.2;
  margin-bottom: 0.25rem;
  transition: color 0.4s;
}

.typing__stat-label {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
  line-height: 1.2;
  transition: color 0.4s;
}

.typing__stats-footer {
  font-size: var(--small-font-size);
  color: var(--text-color-light);
  text-align: center;
  padding-top: 1rem;
  border-top: 2px solid var(--body-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: color 0.4s;
}

.typing__stats-footer i {
  color: var(--first-color);
}

.typing__recent-sessions {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--body-color);
}

.typing__recent-title {
  font-size: var(--h3-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--title-color);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.4s;
}

.typing__recent-title i {
  color: var(--first-color);
}

.typing__recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.typing__recent-item {
  background: var(--body-color);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  transition: background 0.4s, transform 0.3s;
}

.typing__recent-item:hover {
  transform: translateX(4px);
}

.typing__recent-wpm {
  font-size: var(--h3-font-size);
  font-weight: var(--font-semi-bold);
  color: var(--first-color);
}

.typing__recent-details {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.typing__recent-mode {
  font-size: var(--small-font-size);
  color: var(--text-color);
  transition: color 0.4s;
}

.typing__recent-date {
  font-size: var(--smaller-font-size);
  color: var(--text-color-light);
  transition: color 0.4s;
}

.typing__recent-accuracy {
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  color: var(--text-color);
  transition: color 0.4s;
}

/*=============== RESPONSIVE ===============*/
@media screen and (max-width: 350px) {
  .typing__stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .typing__mode-btn,
  .typing__value-btn {
    min-width: 60px;
    padding: 0.625rem 0.75rem;
    font-size: var(--small-font-size);
  }

  .typing__results-grid {
    grid-template-columns: 1fr;
  }

  .typing__modal-footer {
    flex-direction: column;
  }

  .typing__modal-content {
    max-width: 95%;
  }
}

@media screen and (min-width: 576px) {
  .typing__stats-bar {
    gap: 1.5rem;
  }

  .typing__text-display {
    padding: 2rem;
  }

  .typing__config-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .typing__config-group--checkboxes {
    grid-column: 1 / -1;
  }
}

@media screen and (min-width: 576px) {
  .typing__stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 768px) {
  .typing__recent-item {
    grid-template-columns: 80px 1fr auto;
  }
}

@media screen and (min-width: 1024px) {
  .typing__container {
    padding: 3rem 2rem;
    padding-top: 2rem;
  }

  .typing__config,
  .typing__test-area,
  .typing__instructions,
  .typing__stats {
    padding: 2rem;
  }

  .typing__text-display {
    line-height: 1.8;
    /* Height is calculated dynamically in JS */
  }

  .typing__graph {
    height: 120px;
  }

  .typing__config-group--dropdowns {
    grid-template-columns: 2.2fr 1.5fr 2.2fr 0.8fr;
  }
}

@media screen and (min-width: 1200px) {
  .typing__config-group--dropdowns {
    grid-template-columns: 2.5fr 1.5fr 2.5fr 0.9fr;
  }
}

/* Mobile adjustments */
@media screen and (max-width: 576px) {
  .typing__container {
    padding-top: 2rem;
  }
}

/*=============== DARK THEME ===============*/
body.dark-theme .typing__select {
  border-color: hsl(207, 4%, 15%);
  background-color: hsl(207, 4%, 10%);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-position: calc(100% - 0.5rem) center;
}
