/* style.css */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(to right, #83a4d4, #b6fbff);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  color: #333;
}

.container {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
  max-width: 700px;
  width: 100%;
}

h1 {
  text-align: center;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.quote-box {
  background: #f9f9f9;
  border-left: 4px solid #3498db;
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  line-height: 1.6;
  border-radius: 5px;
}

.progress-wrapper {
  background: #e0e0e0;
  height: 10px;
  width: 100%;
  margin: 1rem 0;
  border-radius: 5px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background-color: #2ecc71;
  transition: width 0.3s ease-in-out;
}

textarea {
  width: 100%;
  height: 120px;
  padding: 1rem;
  border: 2px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  resize: none;
  outline: none;
  transition: border-color 0.3s;
}

textarea:focus {
  border-color: #3498db;
}

.results {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  background: #f4f4f4;
  padding: 1rem;
  border-radius: 8px;
}

.stat {
  flex: 1 1 45%;
  font-size: 1rem;
}

.stat span.label {
  font-weight: bold;
  color: #2c3e50;
}

#status {
  flex-basis: 100%;
  margin-top: 0.5rem;
  font-style: italic;
  color: #888;
}

.controls {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

button {
  flex: 1;
  padding: 0.75rem;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

button#new-test {
  background-color: #3498db;
  color: white;
}

button#new-test:hover {
  background-color: #2980b9;
}

button.secondary {
  background-color: #e74c3c;
  color: white;
}

button.secondary:hover {
  background-color: #c0392b;
}

.high-scores {
  margin-top: 2rem;
}

.high-scores h2 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

#scores-list {
  padding-left: 1.2rem;
}

#scores-list li {
  padding: 0.3rem 0;
  font-weight: 500;
  border-bottom: 1px solid #ddd;
}

/* Responsive Design */
@media (max-width: 600px) {
  .stat {
    flex: 1 1 100%;
  }

  .controls {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 0.2s ease-in-out;
}
