* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: "Courier New", Courier, monospace;
  min-height: 100vh;
  display: flex;
  flex-flow: row wrap;
}

.tip-calc-container,
.pal-checker-container {
  flex: 1;
  display: flex;
  flex-flow: column wrap;
  align-items: center;
  gap: 60px;
}
.tip-heading,
.pal-heading {
  margin: 80px 0 50px 0;
  font-size: 2.1rem;
}
.tip-body,
.pal-body {
  min-width: 45%;
  padding: 25px;
  border: 2px solid lightgray;
  border-radius: 5px;
}
.tip-body h2,
.pal-body h2 {
  text-align: center;
  margin-bottom: 30px;
}
.tip-body input,
.tip-body label {
  display: block;
}
.tip-body label {
  margin-bottom: 5px;
}
.tip-body input {
  margin-bottom: 10px;
  width: 100%;
  padding: 10px;
  border-radius: 5px;
}
.calc-btn {
  text-align: center;
  width: 100%;
  padding: 10px;
  margin: 5px 0 20px 0;
  border-radius: 5px;
  font-style: italic;
  font-weight: bold;
  font-size: 17px;
}
.calc-btn:hover,
.pal-btn:hover {
  cursor: pointer;
  opacity: 0.8;
}
.calc-btn:active,
.pal-btn:active {
  transform: translateY(1px);
}
.tip {
  margin-bottom: 10px;
}

.pal-body {
  min-width: 60%;
}
.pal-body input,
.pal-btn {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 15px;
  padding: 10px;
  border-radius: 5px;
}
.pal-btn {
  font-size: 17px;
  font-weight: bold;
  font-style: italic;
}
.pal-result {
  text-align: center;
}
.is-pal {
  color: green;
  font-weight: bold;
}
.not-pal {
  color: red;
  font-weight: bold;
}

.barrier {
  width: 3px;
}

/* Mode Button */
.mode-btn-container {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
#mode-btn {
  display: none;
}
.mode-btn-container span {
  font-size: 22px;
  font-weight: bold;
}
.mode-slider {
  width: 60px;
  height: 30px;
  padding: 3px;
  border-radius: 50px;
  background-color: #f7f7f7;
}
.mode-slider:hover {
  cursor: pointer;
}
.circle {
  width: 24px;
  height: 24px;
  border-radius: 50px;
  background-color: #181940;
  transition: all 0.3s ease;
}
#mode-btn:checked + span + .mode-slider {
  background-color: #181940;
}
#mode-btn:checked + span + .mode-slider .circle {
  transform: translateX(30px);
  background-color: #f7f7f7;
}

/* Dark mode styles */
.dark-body {
  background-color: #181940;
  color: white;
}
.dark-heading {
  text-shadow: 4px 4px 10px rgba(255, 255, 255, 0.3);
}
.dark-box {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}
.dark-btn {
  background-color: #dce52e;
}
.dark-barrier {
  background-color: lightgray;
}

/* Light mode styles */
.light-body {
  color: #181940;
}
.light-heading {
  text-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
}
.light-box {
  background-color: #f7f7f7;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.2);
}
.light-btn {
  color: white;
  background-color: #181940;
}
.light-barrier {
  background-color: #181940;
}
