* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 100vh;
  background-color: #f0f0f0;
  transition: background-color 0.3s, color 0.3s;
  padding: 1rem;
}

#note-container {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  padding: 2rem;
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  transition: background-color 0.3s, color 0.3s;
}

h1 {
  font-size: 2rem;
  color: #333;
}

#flashingNotes {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  min-height: 200px;
  max-width: 100%;
}

#flashingNotes img {
  width: 60vw;
  max-width: 250px;
  height: auto;
  transition: transform 0.2s;
}

button {
  padding: 14px 24px;
  font-size: 1.1rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
  margin: 0.5rem;
  width: 90%;
  max-width: 300px;
}

button:hover {
  background-color: #0056b3;
}

#speedControl {
  width: 100%;
  margin-top: 10px;
}

#speedValue {
  font-size: 1rem;
  font-weight: bold;
  color: #333;
}

/* Dark Mode */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

.dark-mode #note-container {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

.dark-mode #speedValue {
  color: #e0e0e0;
}

.dark-mode button {
  background-color: #444;
}

.dark-mode button:hover {
  background-color: #666;
}

.dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: bold;
  margin-top: 1rem;
}

.dark-mode-toggle input[type="checkbox"] {
  transform: scale(1.2);
}

/* Responsive tweaks for small screens */
@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  #flashingNotes img {
    width: 80vw;
  }

  button {
    font-size: 1rem;
    padding: 12px;
  }

  #note-container {
    padding: 1.2rem;
  }
}
