* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 15px;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.time-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  justify-content: center;
}

.time-buttons button {
  background: #ddd;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.time-buttons button:hover {
  background: #ccc;
}

.time-buttons button.active {
  background: #4caf50;
  color: white;
}

h2{
    color: #667eea;
    font-family: cursive;
    margin-bottom: 1%;
    margin-left: 3%;
}

.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.stat-box h3 {
    font-size: 0.9em;
    margin-bottom: 8px;
    opacity: 0.9;
}

.stat-box div {
    font-size: 2em;
    font-weight: bold;
}

.text-display {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    font-size: 1.3em;
    line-height: 1.8;
    margin-bottom: 20px;
    min-height: 150px;
}

.text-display .correct {
    color: green;
}

.text-display .incorrect {
    color: red;
    background: #ffcccc;
}

.text-display .current {
    background: #667eea;
    color: white;
}

#typingArea {
    width: 100%;
    padding: 20px;
    font-size: 1.2em;
    border: 2px solid #667eea;
    border-radius: 10px;
    resize: vertical;
    min-height: 150px;
    font-family: 'Courier New', monospace;
    margin-bottom: 15px;
}

#typingArea:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.start-btn, .reset-btn {
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 10px;
}

.start-btn {
    background: #4ECDC4;
    color: white;
}

.start-btn:hover {
    background: #45b8b0;
    transform: translateY(-2px);
}

.start-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.reset-btn {
    background: #ff6b6b;
    color: white;
}

.reset-btn:hover {
    background: #ee5a5a;
}

@media (max-width: 768px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    
    h1 {
        font-size: 1.3em;
    }
   
    .start-btn {
    margin: 8px;
    }

    .time-buttons button{
      width: 48px;
      height: 2%;
    }

    h2{
      font-size: 11px;
      margin-top: 1.9%;
    }

    .start-btn {
        margin: 6px;
        font-size: 20px;
        margin-left: 19%;
    }

    .reset-btn {
    margin-left: 30px;
   }
}