/* Resetting default margins and paddings */
@keyframes slideInAnimation {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideOutAnimation {
  from {
    opacity: 0;
    transform: translateY(10px);
    -webkit-transform: translateY(10px);
    -moz-transform: translateY(10px);
    -ms-transform: translateY(10px);
    -o-transform: translateY(10px);
}
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleAnimation {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

@keyframes fadeInUpAnimation {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInAnimation {
  from {
    opacity: 0;
    transform: translateY(-10px);
    -webkit-transform: translateY(-10px);
    -moz-transform: translateY(-10px);
    -ms-transform: translateY(-10px);
    -o-transform: translateY(-10px);
}
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInAnimation {
  from {
    opacity: 0;
    transform: translateX(-20px); /* 從左側偏移 20px */
  }
  to {
    opacity: 1;
    transform: translateX(0); /* 回到原始位置 */
  }
}

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

body {
  font-family: 'TaiwanPearl-Regular', sans-serif;
  background-color: #f8f9fa;
  color: #333333;
  line-height: 1.6;
  padding: 20px;
}

#title {
  text-align: center;
  margin-bottom: 20px;
  animation: slideInAnimation 0.5s ease-in-out;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

h3 {
  font-size: 1.4rem;
  animation: sfadeInAnimation 0.5s ease-in-out;
  -webkit-animation: sfadeInAnimation 0.5s ease-in-out;
}

h1,
h2{
  animation: slideInAnimation 0.5s ease-in-out;
  -webkit-animation: slideInAnimation 0.5s ease-in-out;
}

#games-chose {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.btn {
  text-decoration: none;
  border: 2px solid #7952b3;
  background-color: #7952b3;
  color: white;
  border-radius: 12px;
  font-size: 24px;
  padding: 10px 20px;
  transition: background-color 0.3s ease;
  animation: scaleAnimation 0.5s ease-in-out;
  -webkit-animation: scaleAnimation 0.5s ease-in-out;
}

.btn:hover {
  background-color: transparent;
  color: #7952b3;
}

.footer {
  text-align: center;
  padding: 20px;
  background-color: #dc3545;
  color: white;
  animation: fadeInUpAnimation 0.5s ease-in-out;
}

.add {
  background-color: #f0f0f0;
  border-left: 5px solid green;
  padding: 10px;
  margin-bottom: 10px;
}

.remove {
  background-color: #f0f0f0;
  border-left: 5px solid red;
  padding: 10px;
  margin-bottom: 10px;
}

.other {
  background-color: #f0f0f0;
  border-left: 5px solid #f1c232;
  padding: 10px;
  margin-bottom: 10px;
}

.warning {
  background-color: #fdf2e9;
  border-left: 5px solid #f2711c;
  color: #dc3545;
  padding: 15px;
  margin-bottom: 15px;
}

.update-section {
  background-color: #f0f0f0;
  border-left: 5px solid #7952b3;
  padding: 10px;
  margin-bottom: 10px;
}

.add,
.remove,
.other,
.warning,
.update-section {
  animation: fadeInAnimation 0.5s ease-in-out;
}

footer {
  text-align: center;
  padding: 20px;
  background-color: #333333;
  color: white;
  animation: slideOutAnimation 0.5s ease-in-out;
  -webkit-animation: slideOutAnimation 0.5s ease-in-out;
}

.animate {
  animation: fadeInAnimation 0.5s ease-in-out;
}

.btn {
  position: relative;
}

.info-icon {
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 16px;
  border-radius: 100%;
  cursor: pointer;
  background-color: #00C7ED;
  width: 24px;
  height: 24px;
  text-align: center;
}

.info-icon:hover {
  background-color: transparent;
  border: 2px solid #00C7ED;
}


.custom-button {
  display: inline-flex; /* 改成 inline-flex */
  align-items: center;
  background-color: #00C7ED;
  border-radius: 10px;
  padding: 10px;
  color: white;
  font-weight: bold;
  white-space: nowrap; /* 文字不換行 */
}

.icon {
  background-color: lightturquoise;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
  order: -1; /* 讓 icon 先顯示 */
}

.text {
  order: 0; /* 讓文字顯示順序在 icon 之後 */
}

.fixed-text-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  z-index: 1000;
}

.fixed-text {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 12px;
  animation: slideOutAnimation 0.5s ease-in-out;
}

.fixed-text:hover {
  background-color: #0056b3;
}

@keyframes darkModeAnimation {
  0% {
    background-color: #f8f9fa;
  }
  100% {
    background-color: #222;
  }
}

@keyframes lightModeAnimation {
  0% {
    background-color: #222;
  }
  100% {
    background-color: #f8f9fa;
  }
}

body {
  animation: lightModeAnimation 0.5s ease-in-out forwards;
  background-color: #f8f9fa;
  color: #333333;
}

body.dark-mode {
  animation: darkModeAnimation 0.5s ease-in-out forwards;
  background-color: #222;
  color: #ddd;
}

#darkModeToggle {
  position: fixed;
  left: 20px;
  background-color: #333;
  color: #fff;
  border: none;
  border-radius: 100%;
  cursor: pointer;
  transition: background-color 1s ease;
  z-index: 1;
  width: 3rem;
  height: 3rem;
  bottom: 32px;
}

body.dark-mode #darkModeToggle {
  background-color: #fff;
  color: #333;
  animation: lightModeAnimation 0.8s ease-in-out forwards;
}

#darkModeToggle:hover {
  background-color: #444;
}

body.dark-mode #darkModeToggle:hover {
  background-color: #bbb;
}

body.dark-mode .update-section {
  background-color: #333;
  color: #ddd;
  animation: darkModeAnimation 0.5s ease-in-out forwards;
}

body.dark-mode .add {
  background-color: #333;
  border-left-color: green;
  color: #ddd;
  animation: darkModeAnimation 0.5s ease-in-out forwards;
}

body.dark-mode .remove {
  background-color: #333;
  border-left-color: red;
  color: #ddd;
  animation: darkModeAnimation 0.5s ease-in-out forwards;
}

body.dark-mode .other {
  background-color: #333;
  border-left-color: #f1c232;
  color: #ddd;
  animation: darkModeAnimation 0.5s ease-in-out forwards;
}

body.dark-mode .warning {
  background-color: #333;
  border-left-color: #f2711c;
  color: #ddd;
  animation: darkModeAnimation 0.5s ease-in-out forwards;
}

body.dark-mode footer {
  background-color: #666;
  color: white;
  animation: darkModeAnimation 0.5s ease-in-out forwards;
}

svg {
  vertical-align: middle;
}


@media (max-width: 480px) {
  .btn {
    display: none;
  }
  .mobile {
    display: block;
  }
}

summary {
  border: 2px solid #00C7ED;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 10px;
  transition: background-color 1s ease;
}
.otherbtn {
  text-decoration: none;
  border: 2px solid #7952b3;
  background-color: #7952b3;
  color: white;
  border-radius: 12px;
  font-size: 24px;
  padding: 10px 20px;
  transition: background-color 0.3s ease;
  animation: scaleAnimation 0.5s ease-in-out;
  -webkit-animation: scaleAnimation 0.5s ease-in-out;
  text-align: center;
}

a {
  text-decoration: none;
}