html {
  background-color: #f0f0f0;
  color: #333;
}

/* 
html[dark] = [dark]
*/
html[dark] {
  /*  ^^^^^^ attribute selector  */
  background-color: #1d1d1d;
  color: #f0f0f0;
}

body {
  margin: 0;
  font-family: sans-serif;
  font-size: 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-weight: 600;

  width: 100%;
  height: 32px;
  font-size: 16px;
}

footer {
  background-color: #b6b6b6;
}

[dark] footer {
  background-color: #0e0e0e;
}

a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a {
  color: #333;
}

[dark] a {
  color: #f0f0f0;
}

/* Button style */

button {
  background-color: #f0f0f0;
  color: #333;
  border: 1px solid #333;
  padding: 0.5em 1em;
  cursor: pointer;
}

button:hover {
  background-color: #333;
  color: #f0f0f0;
}

/* 
html[dark] button {
[dark] button {
is the same
*/
[dark] button {
  background-color: #333;
  color: #f0f0f0;
  border: 1px solid #f0f0f0;
}

[dark] button:hover {
  background-color: #f0f0f0;
  color: #333;
}
