:root {
  --bg: #000;
  --black: #000;
  --white: #fff;
  --font-color: #fff;
  --linear: linear-gradient(0deg, #5ee7df 0%, #b490ca 100%);
  --linear-60: linear-gradient(
    0deg,
    rgba(94, 231, 223, 0.6) 0%,
    rgba(180, 144, 202, 0.6) 100%
  );
  --linear-40: linear-gradient(
    0deg,
    rgba(94, 231, 223, 0.4) 0%,
    rgba(180, 144, 202, 0.4) 100%
  );
  --bg-primary-20: rgba(151, 71, 255, 0.2);
  --bg-primary-40: rgba(151, 71, 255, 0.4);
  --primary: #9747ff;
  --light-primary: #c599ff;
  --secondary: #5ee7df;
}

/* 共用 */
body {
  background-color: var(--bg);
  font-family: Noto Sans TC, sans-serif;
  color: var(--font-color);
}

button {
  cursor: pointer;
  &:hover {
    color: var(--light-primary);
  }
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.scroll-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
  overflow: auto;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

::-webkit-scrollbar-thumb {
  background-color: var(--linear);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  /* background-color: #a855f7; */
}

/* 個別 */
header {
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}
#desktop-nav a:hover {
  color: var(--light-primary);
}
#mobile-menu {
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); /* Safari */
}
#mobile-menu a:hover {
  background-color: var(--light-primary);
}
.news-item:hover {
  background-color: var(--light-primary);
  transition: 0.5s;
}
.cart-btn {
  background-color: var(--primary);
  &:hover {
    background-color: var(--light-primary);
    transition: 0.5s;
  }
}
.product-img {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--white);
  max-height: 186px;
  img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  &:hover {
    img {
      transform: scale(1.2);
      transition: 0.25s;
    }
  }
}

.product-img::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  background: var(--linear);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  border-radius: 8px;
  z-index: 2;
  pointer-events: none;
}
.price,
.price span {
  color: var(--primary);
}

.member-img {
  img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
}
.member-card {
  perspective: 1000px;
  cursor: pointer;
}

/* 卡片內層 */
.card-inner {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 142 / 254;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

/* 滑過翻牌 */
.member-card:hover .card-inner {
  transform: rotateY(180deg);
}

/* 卡片正反面共用樣式 */
.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 背面樣式 */
.card-back {
  background: var(--primary);
  transform: rotateY(180deg);
  padding: 1rem;
}

/* 成員名字 */
.member-title {
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: bold;
  margin-top: 0.5rem;
  transition: background 0.5s, -webkit-background-clip 0.5s;
}

/* 滑過文字漸層 */
.member-card:hover .member-title,
footer .copyright {
  background: var(--linear);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
#email .email-container {
  position: relative;
  background: var(--bg-primary-20);
  border-radius: 8px;
  overflow: hidden;
}
#email .email-container::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  background: var(--linear);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  border-radius: 8px;
  z-index: 2;
  pointer-events: none;
}
.email-input::before {
  content: "";
  position: absolute;
  inset: 0;
  padding-top: 2px;
  background: var(--linear);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  z-index: 2;
  pointer-events: none;
  opacity: 0.4;
}
.email-input {
  width: 50%;
  min-width: 300px;
  height: 40px;
  position: relative;
  padding: 0 20px;
  border-radius: 8px;
  form {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}
.email-input::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  background: var(--linear);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  z-index: 2;
  pointer-events: none;
  border-radius: 8px;
}
#email input {
  background-color: transparent;
  color: var(--white);
  border: none;
  border-radius: 0;
  outline: none;
  height: 40px;
  width: 100%;
}
.submit-btn {
  display: inline-flex;
  align-items: center; /* 垂直置中 */
  justify-content: center; /* 水平置中 */
  width: 40px;
  height: 40px;
  margin-right: -10px;
  img {
    max-width: 100%;
    max-height: 100%;
  }
  &:hover path {
    fill: var(--light-primary);
    transition: 0.5s;
  }
}
footer {
  background: var(--bg-primary-40);
  position: relative;
}
footer::before {
  content: "";
  position: absolute;
  inset: 0;
  padding-top: 2px;
  background: var(--linear);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  z-index: 2;
  pointer-events: none;
  opacity: 0.4;
}
.footer-btn {
  background: var(--linear-40);
  position: relative;
  border-radius: 8px;
  img {
    width: 20px;
    height: 20px;
    object-fit: contain;
  }
  &:hover {
    background: var(--light-primary);
    transition: 0.5s;
  }
}
.footer-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  background: var(--linear);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  z-index: 2;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0.4;
}
