/* 燈箱樣式 */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fade-in 0.3s ease-in-out;
}

.lightbox-content {
  background: linear-gradient(145deg, #fff, #f5f5f5);
  border-radius: 15px;
  padding: 0;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: scale-in 0.3s ease-in-out;
  overflow: hidden;
}

.lightbox-header {
  background: linear-gradient(45deg, #ff6b6b, #ffd93d);
  color: white;
  padding: 20px;
  text-align: center;
  position: relative;
}

.lightbox-header h3 {
  margin: 0;
  font-size: 1.5em;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-body {
  padding: 30px;
  text-align: center;
}

.lightbox-body p {
  margin: 10px 0;
  font-size: 1.1em;
  color: #333;
}

.treasure-icon {
  font-size: 4em;
  margin: 20px 0;
  animation: bounce 2s infinite;
}

.lightbox-footer {
  padding: 0 30px 30px;
  text-align: center;
}

.treasure-btn {
  background: linear-gradient(45deg, #4ecdc4, #44a08d);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.treasure-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 動畫效果 */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* 閃爍動畫 - icon 一下出現一下消失 */
@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.article-content__icon--blinking {
  animation: blink 1.5s infinite;
}

/* 訊息燈箱樣式 */
.message-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fade-in 0.3s ease-in-out;
}

.message-lightbox-content {
  background: linear-gradient(145deg, #fff, #f8f9fa);
  border-radius: 15px;
  padding: 0;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  animation: scale-in 0.3s ease-in-out;
  overflow: hidden;
}

.message-lightbox-header {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  padding: 25px;
  text-align: center;
}

.message-lightbox-header h3 {
  margin: 0;
  font-size: 1.4em;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.message-lightbox-body {
  padding: 30px;
  text-align: center;
  line-height: 1.6;
}

.message-lightbox-body p {
  margin: 0;
  font-size: 1.1em;
  color: #333;
}

.message-lightbox-footer {
  padding: 0 30px 30px;
  text-align: center;
  display: flex;
  gap: 15px;
  justify-content: center;
}

.message-btn {
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 100px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.message-btn.primary {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
}

.message-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.message-btn.secondary {
  background: linear-gradient(45deg, #f093fb, #f5576c);
  color: white;
}

.message-btn.secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

/* 響應式設計 */
@media (max-width: 480px) {
  .lightbox-content {
    width: 95%;
    margin: 20px;
  }

  .lightbox-header h3 {
    font-size: 1.3em;
  }

  .treasure-icon {
    font-size: 3em;
  }

  .message-lightbox-content {
    width: 95%;
    margin: 20px;
  }

  .message-lightbox-footer {
    flex-direction: column;
    gap: 10px;
  }

  .message-btn {
    width: 100%;
  }
}

/* 登入 Lightbox 樣式（從 lightbox.astro 移植） */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.lightbox-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(50px);
  -webkit-backdrop-filter: blur(50px);
  background-color: rgba(255, 255, 255, 0);
}

.login-lightbox {
  position: relative;
  z-index: 10000;
  background-color: #fff;
  border-radius: 20px;
  padding: 40px;
  max-width: 872px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  background: #fff;
  filter: drop-shadow(20px 20px 20px rgba(0, 0, 0, 0.25));
}

@media (max-width: 450px) {
  .login-lightbox {
    padding: 30px;
  }
}

.login-lightbox .close-btn {
  position: absolute;
  top: -50px;
  right: -50px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  z-index: 10001;
}

@media (max-width: 1024px) {
  .login-lightbox .close-btn {
    top: -50px;
    right: 0px;
  }
}

.login-lightbox .close-btn svg {
  width: 36px;
  height: 36px;
}

@media (max-width: 768px) {
  .login-lightbox .close-btn svg {
    width: 28px;
    height: 28px;
  }
}

.login-lightbox-content {
  text-align: center;
  max-width: 630px;
  margin: 0 auto;
}

.login-lightbox-content-img {
  width: 300px;
  margin-bottom: 20px;
}

@media (max-width: 450px) {
  .login-lightbox-content-img {
    width: 200px;
  }
}

.login-lightbox-content h1 {
  font-size: 40px;
  color: #333;
  margin-bottom: 15px;
  font-weight: bold;
}

@media (max-width: 450px) {
  .login-lightbox-content h1 {
    font-size: 24px;
  }
}

.login-lightbox-content p {
  font-weight: 500;
  font-size: 24px;
  letter-spacing: 0.05em;
  line-height: 35px;
  text-align: center;
  color: #000;
}

@media (max-width: 450px) {
  .login-lightbox-content p {
    font-family: "Source Han Sans TW";
    font-weight: 500;
    font-size: 13px;
    line-height: 20px;
    text-align: center;
    color: #000;
  }
}

.login-lightbox-content span {
  font-weight: normal;
  font-size: 17px;
  letter-spacing: 0.05em;
  line-height: 45px;
  text-align: center;
  color: #000;
  display: block;
}

@media (max-width: 450px) {
  .login-lightbox-content span {
    font-weight: normal;
    font-size: 12px;
    letter-spacing: 0.05em;
    line-height: 18px;
    text-align: center;
  }
}

.login-lightbox-content-checkbox {
  display: flex;
  margin-top: 20px;
  align-items: flex-start;
}

.login-lightbox-content-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  margin-right: 10px;
  margin-top: 2px;
  border: 2px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
}

.login-lightbox-content-checkbox input[type="checkbox"]:checked {
  background: linear-gradient(#bfff72 0%, #7ccf52 26.6%, #4cb6a3 100%);
  border-color: #4cb6a3;
}

.login-lightbox-content-checkbox input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.login-lightbox-content-checkbox input[type="checkbox"]:hover {
  border-color: #7ccf52;
}

.login-lightbox-content-checkbox label {
  font-size: 16px;
  text-align: left;
  cursor: pointer;
  line-height: 1.5;
  color: #666;
}
.treasure-image {
  width: 100%;
  max-width: 38px;
  cursor: pointer;
}
.article-content__icon {
  width: 100%;
  max-width: 90px;
  cursor: pointer;
}
@media (max-width: 450px) {
  .login-lightbox-content-checkbox label {
    font-weight: normal;
    font-size: 12px;
    letter-spacing: 0.05em;
    line-height: 20px;
    text-align: left;
    color: #000;
  }
  .article-content__icon {
    width: 72px;
  }
  .treasure-image {
    max-width: 30px;
  }
}

.login-lightbox-button {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

@media (max-width: 450px) {
  .login-lightbox-button {
    margin-top: 20px;
    gap: 10px;
  }
}

@media (max-width: 320px) {
  .login-lightbox-button {
    gap: 0px;
  }
}

.login-lightbox-button-img {
  width: 100%;
  max-width: 300px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

@media (max-width: 450px) {
  .login-lightbox-button-img {
    width: 140px;
  }
}

.login-lightbox-button-img:hover {
  transform: scale(1.05);
}

.login-lightbox-button-img:active {
  transform: scale(0.98);
}
