/*ze design*/

:root {
    --bg-color: rgb(230, 206, 170);
    --text-color: black;
    --button-bg: #a1876e;
    --button-hover: #c4a785;
    --button-text: black;
    --correct-color: rgb(143, 152, 143);   
    --incorrect-color: red;               
  }
  
  body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Noto Sans Mono', monospace;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
  }  
  
  body.dark {
    --bg-color: #121212;
    --text-color: #f5f5f5;
    --button-bg: #574a3d;
    --button-hover: #c4a785;
    --button-text: #ffffff;
    --correct-color: rgb(143, 152, 143);
    --incorrect-color: #ff6b6b; 
  }
  
  .container {
    max-width: 1150px;
    margin: 120px auto 0 auto;
    text-align: center;
  }
  
  #clock {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: 'Cutive Mono', monospace;
    font-size: 23px;
    color: rgb(99, 84, 64);
  }
  
  .title {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 23px;
    font-family: 'Cutive Mono', monospace;
    color: rgb(99, 84, 64);
  }
  
  #word-count-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
  }
  
  #word-buttons,
  #time-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  #word-buttons button,
  #time-buttons button {
    font-size: 16px;
    padding: 8px 16px;
    font-family: 'Noto Sans Mono', monospace;
    background-color: var(--button-bg);
    border: 2px solid #000000;
    border-radius: 4px;
    cursor: pointer;
    color: var(--button-text);
    transition: background-color 0.2s ease;
  }
  
  #word-buttons button:hover,
  #time-buttons button:hover {
    background-color: var(--button-hover);
  }
  
  #sound-toggle-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 10px;
  }
  
  #sound-toggle {
    font-size: 22px;
    background: rgb(126, 90, 71);
    color: black;
    border: 2px solid #a1876e;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
  }
  
  #sound-toggle:hover {
    transform: scale(1.15);
  }
  
  #timer-display {
    font-size: 20px;
    margin-bottom: 20px;
    font-family: 'Cutive Mono', monospace;
  }
  
  #word-display {
    font-size: 30px;
    font-family: 'Cutive Mono', monospace;
    min-height: 150px;
    margin-bottom: 20px;
    white-space: pre-wrap;
  }
  
  .correct {
    color: var(--correct-color);
  }
  
  .incorrect {
    color: var(--incorrect-color);
  }
  
  .theme-toggle {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    background: rgb(126, 90, 71);
    color: #a1876e;
    border: 4px solid #a1876e;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.15);
    z-index: 1000;
  }
  
  .theme-toggle:hover {
    transform: translateX(-50%) scale(1.25);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  }
  
  * {
    cursor: url('cursor.png') 16 16, auto;
  }
  
  button, a, input, textarea, select, label {
  cursor: url('cursor.png') 16 16, auto !important;
  }

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(230, 206, 170);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeOut 0.3s ease 1s forwards;
}

.loader-content {
  color: rgb(0, 0, 0);
  font-family: Cutive Mono, monospace;
  font-size: 35px;
  text-align: center;
  display: inline-block;
}

.loader-bar {
  margin-top: 12px;
  height: 8px; 
  background: #c5b3a4;
  border-radius: 4px;
  overflow: hidden;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.loader-text {
  display: inline-block;
  padding: 0 10px; 
}

.loader-bar {
  width: calc(100% + 20px); 
}

.loader-fill {
  width: 100%;
  height: 100%;
  background: rgb(0, 0, 0);
  transform: scaleX(0);
  transform-origin: left;
  animation: fillBar 1s linear forwards;
}

@keyframes fillBar {
  to {
    transform: scaleX(1);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}
