/* Modernized styles with a sleek design */
body {
  font-family: 'Inter', sans-serif;
  padding: 20px;
  background: var(--background-color);
  color: var(--text-color);
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  transition: background 0.3s, color 0.3s;
}

:root {
  --background-color: #f9f9f9;
  --text-color: #2c3e50;
  --primary-color: #3498db;
  --secondary-color: #2980b9;
  --border-color: #dcdcdc;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Dark mode variables */
body.dark-mode {
  --background-color: #1e1e1e;
  --text-color: #ecf0f1;
  --primary-color: #9b59b6;
  --secondary-color: #8e44ad;
  --border-color: #444;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.container {
  padding: 20px;
  border-radius: 12px;
  background: var(--background-color);
  box-shadow: var(--box-shadow);
  transition: background 0.3s, box-shadow 0.3s;
}

h1 {
  font-size: 2rem;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 20px;
}

#test-text {
  background: var(--background-color);
  padding: 20px;
  border: 1px solid var(--border-color);
  margin-bottom: 20px;
  font-size: 1rem;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  transition: background 0.3s, border-color 0.3s;
}

#input-area {
  width: 100%;
  height: 150px;
  font-size: 1rem;
  padding: 15px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  resize: vertical;
  box-sizing: border-box;
  background: var(--background-color);
  color: var(--text-color);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

#timer, #result {
  margin-top: 20px;
  font-weight: bold;
  color: var(--text-color);
  text-align: center;
  transition: color 0.3s;
}

button {
  display: block;
  margin: 20px auto;
  padding: 12px 24px;
  font-size: 1rem;
  cursor: pointer;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  transition: background-color 0.3s, transform 0.2s;
}

button:hover {
  background-color: var(--secondary-color);
  transform: scale(1.05);
}

#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: black;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
  box-shadow: var(--box-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.2s;
  content: "🌙";
}

#theme-toggle:hover {
  background-color: var(--secondary-color);
  transform: scale(1.15);
}