body {
  background-color: #ffffff;
  color: black;
  text-align: center;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  color: black;
}

.heading-title {
  font-size: 2.1rem;
  font-weight: 700;
  text-align: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: 60%;
  white-space: nowrap;
  /* תמיד במרכז המדויק */
}

/* אם הכותרת ארוכה מאוד, הגופן יקטן ב-30% */
.heading-title.long-title {
  font-size: 1.47rem; /* 70% מ-2.1rem */
  max-width: 75%;
}

.heading-subtitle {
  font-size: 1.1rem;
  font-weight: normal;
  color: #444;
  position: absolute;
  right: calc(50% + 150px);
  /* משמאל ל-title, מרחק של בערך 150px מהמרכז */
  white-space: nowrap;
  z-index: 1;
}
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;

}

/* כל תיבה צהובה */
.timer, .errors, .accuracy, .cpm, .wpm {
  background-color: #ffeb00;
  min-width: 88px;
  height: 40px;
  margin: 5px;
  color: #000;
  padding: 6px 10px;
  border-radius: 14px;
  box-shadow: #00d0ff1f 3px 4px 5px;
  
  /* שורה אחת במקום שתי שורות */
  display: flex;
  align-items: center;
  justify-content: space-between;
  direction: rtl;
}

/* הסתרת תיבות CPM/WPM אם לא בשימוש */
.cpm, .wpm {
  display: none;
}

/* כיתוב */
.header_text {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-transform: none;
}

/* המספר */
.curr_time, .curr_errors, .curr_accuracy, .curr_cpm, .curr_wpm {
  font-size: 18px;
  font-weight: bold;
  color: #000;
  margin-left: 5px;
}


.quote {
	background-color: #0087e6;
    font-size: 28px;
    margin: 6px auto 12px;
    color: #fff;
	width:620px;
    padding: 25px;
    box-shadow: #989898 0px 0px 12px;
    border-radius: 10px;
}

.input_area {
	background-color: #f5f5c6;
    height: 98px;
    width: 620px;
    font-size: 1.5rem;
    font-weight: 600;
    border-radius: 8px;
	font-family: 'Arimo';
    margin: 15px;
    resize: none;
    padding: 20px;
    border: 0px;
	text-align:center;
    box-shadow: #dadaa2 -3px 3px 1px;
    display: none !important;
}

.incorrect_char {
  color: red;
  text-decoration: underline;
}

.correct_char {
  color: #58ff4d;
}

.restart_btn {
color: #fff;
    border-radius: 8px;
    display: none;
    background-color: #326765;
    font-size: 1.5rem;
    padding: 10px;
    border: 0px;
    box-shadow: black 5px 8px 5px;
    margin-top: 20px;
}

#tests {
  display: none;
  margin-top: 26px;
  text-align: center;
}

.end-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: flex-start;
  align-items: stretch;
  max-width: 410px;
  margin-inline: auto;
}

.end-btn {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 3px 0 rgba(0,0,0,.15);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
  width: 100%;
  justify-content: center;
}

.end-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.end-btn:active {
  transform: translateY(0);
}

.end-btn .ico {
  font-size: 20px;
  line-height: 1;
}

/* צבעים לכפתורים */
.end-btn.replay {
  background: #ffeb3b;
  box-shadow: 0 3px 0 #c9b000;
}

.end-btn.typing {
  background: #ffd180;
  box-shadow: 0 3px 0 rgba(0,0,0,.15);
}

.end-btn.other {
  background: #b3e5fc;
  box-shadow: 0 3px 0 #81d4fa;
}

.end-btn.share {
  background: #4caf50;
  color: #fff;
  box-shadow: 0 3px 0 #2e7d32;
}

/* גרסה קומפקטית לנייד */
@media (max-width: 560px) {
  .end-btn {
    font-size: 16px;
    padding: 12px 14px;
  }
}

/* הודעת טוסט להעתקה */
.toast {
  position: fixed;
  inset-inline: 0;
  bottom: 18px;
  margin: auto;
  max-width: 320px;
  background: #323232;
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: .3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

#tests .share-note {
  font-size: 16px;
  margin: 8px 4px 0;
  text-align: center;
  font-weight: 700;
}


#capsStatus {
  display: inline-block;
  margin-top: 10px;
  font-size: 15px;
  font-weight: bold;
  color: #555;
  background: #ffeb00;
  padding: 4px 10px;
  border-radius: 6px;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  transition: background 0.3s, color 0.3s;
}
#capsStatus.active {
  background: #ff2b2b;
  color: white;
}


.keyboard {
  display: inline-block;
  background: #bfbfbf;
  padding: 20px;
  border-radius: 12px;
  box-shadow: inset 0 0 5px #777, 0 5px 15px rgba(0,0,0,0.4);
  direction: ltr;
  margin-top: 20px;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.key {
  position: relative;
  background: linear-gradient(145deg, #ffffff 0%, #dcdcdc 40%, #c0c0c0 100%);
  border: 1px solid #aaa;
  border-radius: 6px;
  margin: 3px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  min-width: 42px;
  height: 46px;
  line-height: 46px;
  color: #000;
  box-shadow:
    inset 2px 2px 4px rgba(255, 255, 255, 0.8),
    inset -2px -2px 4px rgba(0, 0, 0, 0.2),
    0 3px 0 #888;
  transition: all 0.15s ease, transform 0.1s ease;
  user-select: none;
}

.key.wide { min-width: 80px; }
.key.space { min-width: 300px; }

.key.active {
  background: linear-gradient(145deg, #00c3ff 0%, #0078ff 60%, #0056d6 100%);
  color: #fff;
  box-shadow: 0 0 10px #00c3ff, inset 0 0 6px rgba(0,0,0,0.5);
}

.key.error {
  background: linear-gradient(145deg, #ff5e5e 0%, #cc0000 100%);
  color: white;
  box-shadow: 0 0 12px rgba(255, 0, 0, 0.8), inset 0 0 6px rgba(0,0,0,0.4);
}

/* 🔹 הדגשת Caps Lock דולק */
.key.caps-active {
  background: linear-gradient(145deg, #aaffaa 0%, #4caf50 70%);
  color: #fff;
  box-shadow: 0 0 12px rgba(76, 175, 80, 0.8),
              inset 0 0 6px rgba(0, 0, 0, 0.4);
  border-color: #388e3c;
}
