/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body */
body {
  font-family: 'Arial', sans-serif;
  background: #f4f7f6;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(to bottom, #eceff1, #ffffff);
}

/* Container */
.container {
  background: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 800px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 10px;
}

header p {
  font-size: 1rem;
  color: #555;
}

/* Settings Section */
.settings {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.setting {
  display: flex;
  flex-direction: column;
  width: 45%;
}

.setting label {
  font-weight: 500;
  margin-bottom: 8px;
}

.custom-select {
  padding: 10px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ddd;
  transition: all 0.3s;
}
.correct {
  background: green;
  color: #fff;
}

.incorrect {
  background: red;
  color: #fff;
}
.reset{
  background: transparent;
  color: #000;
}
.custom-select:hover,
.custom-select:focus {
  border-color: #2a9d8f;
}

.control-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.btn {
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background-color: #2a9d8f;
  color: white;
}

.btn-secondary {
  background-color: #f4a261;
  color: white;
}
.btn-success{
  background-color: #06efcc;
  color: white;
}
.btn:hover {
  transform: scale(1.05);
}

.timer {
  text-align: center;
  margin-top: 20px;
  font-size: 1.2rem;
}
.timer #time{
  font-weight: 900;
}
.timer #time.started {
  transform: scale(1);
  transform-origin: center;
  animation: blinkText 1s linear infinite;
  color: #e02835;
}

@keyframes blinkText {
  0% {
    transform: scale(0.1);
    opacity: 0.2;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.1);
    opacity: 0.2;
  }
}
/* Paragraph */
.paragraph {
  font-size: 1.25rem;
  line-height: 1.8;
  background: #f4f4f4;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-top: 20px;
  color: #333;
}

/* Input Box */
.input-box {
  width: 100%;
  height: 100px;
  font-size: 1.25rem;
  padding: 15px;
  margin-top: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
  resize: none;
  outline: none;
  transition: all 0.3s;
}

.input-box:focus {
  border-color: #2a9d8f;
}
.result-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: max-content;
  padding: 20px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  visibility: hidden;
  transform: scale(.1);
  transform-origin: center;
  transition: .3s linear;
}
.result-container.show{
  visibility: visible;
  transform: scale(1);
}
#result-content {
  font-size: 1rem;
  color: #333;
}

#result-content p {
  margin-bottom: 10px;
}

#result-content strong {
  color: #2a9d8f;
}
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #363949;
  color: #f6f6f9;
  text-align: center;
  user-select: none;
}

footer span {
  font-style: italic;
  font-size: small;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  font-weight: 500;
}

footer span a {
  color: crimson;
}

footer span a:hover {
  text-decoration: underline;
}
/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
  padding-top: 60px;
}

.modal-content {
  background-color: #fff;
  margin: 1% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 50%;
  max-width: 100%;
  max-width: 500px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
}

.radio-buttons {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 20px;
}
.radio-buttons label{
  display: inline-block;
}

.voice-selection {
  margin-bottom: 20px;
  display: none;
}

.voice-selection label {
  font-weight: 500;
}

#voice-select {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  transition: all 0.3s;
}
#start-test:hover {
  background-color: #1f7a6d;
}
.custom-select {
  padding: 10px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ddd;
  transition: all 0.3s;
}
/* Add styles for sliders */
.settings-listen {
  margin-top: 20px;
}

.settings-listen label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.settings-listen input[type="range"] {
  width: 100%;
  margin-bottom: 10px;
}

#rate-value,
#volume-value {
  font-weight: bold;
  font-size: 1rem;
}

#rate-value {
  margin-left: 10px;
}

#volume-value {
  margin-left: 10px;
}
