body {
  --background: rgb(205, 239, 205);
  --card: white;
  --card-hover: #e5eee5;
  --text: #333;
  --secondary: #666;
  --border: #e5eee5;
  --input: white;
  --shadow: rgba(0, 0, 0, 0.1);

  background-color: var(--background);
  color: var(--text);
  font-family: Arial, sans-serif;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

body.dark {
  --background: #202a20;
  --card: #2c382c;
  --card-hover: #344234;
  --text: #f1f1f1;
  --secondary: #c1c9c1;
  --border: #465646;
  --input: #354135;
  --shadow: rgba(0, 0, 0, 0.25);
}

/* Header */

h1 {
  text-align: center;
  font-size: 40px;
  margin-bottom: 10px;
}

h2 {
  font-size: 25px;
  margin: 0 0 5px;
}

.header {
  position: relative;
}

.header > div {
  text-align: center;
}

.subtitle {
  text-align: center;
  font-size: 18px;
  font-style: italic;
  color: var(--secondary);
  margin-bottom: 20px;
}

.theme-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  background-color: var(--input);
  color: var(--text);
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-50%) rotate(15deg) scale(1.05);
}

/* City selector */

.controls {
  margin-bottom: 25px;
}

select {
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background-color: var(--input);
  color: var(--text);
  font-size: 16px;
}

/* Main frame */

.Frame {
  max-width: 600px;
  margin: 60px auto 30px;
  padding: 60px;
  background-color: var(--card);
  box-shadow: 10px 20px 20px var(--shadow);
  border-radius: 20px;
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Cities */

#world {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cities {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 20px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 15px;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background-color 0.2s;
}

.cities:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--shadow);
  background-color: var(--card-hover);
}

.city-info h2 {
  margin: 0;
  font-size: 22px;
  color: var(--text);
}

.timezone,
.date1 {
  color: var(--secondary);
}

.date1 {
  font-size: 18px;
  opacity: 0.8;
}

.time1 {
  font-size: 32px;
  font-weight: bold;
  color: var(--text);
  white-space: nowrap;
}

.time1 small {
  font-size: 12px;
  vertical-align: middle;
  line-height: 60px;
  font-weight: normal;
}

/* Back button */

.back-link {
  display: block;
  margin: 22px auto 0;
  padding: 8px 16px;
  font-size: 16px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: var(--input);
  color: var(--text);
  cursor: pointer;
}

.back-link:hover {
  background-color: var(--card-hover);
}

/* Footer */

footer {
  text-align: center;
  margin-top: 0;
  margin-bottom: 30px;
  font-size: 15px;
  color: var(--secondary);
}

footer a {
  color: inherit;
}

footer a:hover {
  color: #d5ead5;
}

/* Mobile */

@media (max-width: 600px) {
  .Frame {
    width: 90%;
    padding: 30px 20px;
    margin: 30px auto 20px;
  }

  h1 {
    font-size: 30px;
  }

  .subtitle {
    font-size: 16px;
  }

  .theme-toggle {
    width: 40px;
    height: 40px;
    right: -5px;
    top: 55%;
    font-size: 18px;
  }

  .cities {
    padding: 15px;
  }

  .city-info h2 {
    font-size: 20px;
  }

  .date1 {
    font-size: 16px;
  }

  .time1 {
    font-size: 26px;
  }

  .time1 small {
    font-size: 11px;
  }

  footer {
    padding: 0 15px;
    font-size: 14px;
  }
}
