.lychee-notice-popup {
  position: fixed;
  bottom: 20px;
  left: -450px;
  width: 400px;
  max-width: 90vw;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  transition: left 0.4s ease-in-out;
  box-sizing: border-box;
  overflow: hidden;
}

.lychee-notice-popup.show {
  left: 40px;
}

/* 吸い込まれるアニメーション */
.lychee-notice-popup.shrinking {
  animation-name: shrinkToPoint;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
}

/* メッセージアイコンが光るアニメーション */
.lychee-message-box-icon.glowing {
  animation: iconGlow 0.6s ease-out forwards;
}

@keyframes iconGlow {
  0% {
    box-shadow: 0 0 0px rgba(25, 118, 210, 0);
    filter: brightness(1);
    border-radius: 6px;
  }
  20% {
    box-shadow: 0 0 8px rgba(25, 118, 210, 0.6);
    filter: brightness(1.3);
    border-radius: 6px;
  }
  40% {
    box-shadow: 0 0 16px rgba(25, 118, 210, 0.8);
    filter: brightness(1.5);
    border-radius: 6px;
  }
  60% {
    box-shadow: 0 0 20px rgba(25, 118, 210, 1);
    filter: brightness(1.7);
    border-radius: 6px;
  }
  80% {
    box-shadow: 0 0 16px rgba(25, 118, 210, 0.8);
    filter: brightness(1.4);
    border-radius: 6px;
  }
  100% {
    box-shadow: 0 0 0px rgba(25, 118, 210, 0);
    filter: brightness(1);
    border-radius: 6px;
  }
}

@keyframes shrinkToPoint {
  0% {
    transform: scale(1) skew(0deg, 0deg);
    filter: blur(0px);
    opacity: 1;
  }
  100% {
    transform: scale(0) skew(calc(var(--skew-x, 0deg) * 2), calc(var(--skew-y, 0deg) * 2));
    filter: blur(2px);
    opacity: 0;
  }
}

/* アイコンから飛び出すアニメーション（shrinkToPointの逆） */
.lychee-notice-popup.expanding {
  left: 40px;
  transition: none;
  animation-name: expandFromPoint;
  animation-duration: 0.6s;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
}

@keyframes expandFromPoint {
  0% {
    transform: scale(0) skew(calc(var(--skew-x, 0deg) * 2), calc(var(--skew-y, 0deg) * 2));
    filter: blur(2px);
    opacity: 0;
  }
  100% {
    transform: scale(1) skew(0deg, 0deg);
    filter: blur(0px);
    opacity: 1;
  }
}

/* ヘッダー部分 */
.lychee-notice-popup-header {
  background: #1976D2;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.lychee-notice-popup-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  flex-grow: 1;
}

.lychee-notice-popup-subject {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  word-break: break-all;
  overflow-wrap: break-word;
}

.lychee-notice-popup-close {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.lychee-notice-popup-close:hover {
  color: #ffffff;
}

/* コンテンツ部分 */
.lychee-notice-popup-content {
  padding: 20px;
}

.lychee-notice-popup-date {
  display: block;
  text-align: right;
  color: #999;
  font-size: 13px;
  margin-bottom: 8px;
  font-weight: 400;
}

.lychee-notice-popup-description {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
  margin-bottom: 0;
  white-space: pre-wrap;
}

.lychee-notice-popup-description p {
  margin: 0 0 12px 0;
}

.lychee-notice-popup-description p:last-child {
  margin-bottom: 0;
}

.lychee-notice-popup-description a {
  color: #1976D2;
  text-decoration: underline;
}

.lychee-notice-popup-description a:hover {
  color: #1565C0;
}

/* フッター部分 */
.lychee-notice-popup-footer {
  padding: 16px 20px;
  background: #f5f5f5;
  display: flex;
  justify-content: flex-end;
}

.lychee-notice-popup-detail-button {
  display: inline-block;
  padding: 10px 24px;
  background: #1976D2;
  color: #fff !important;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s;
  box-sizing: border-box;
}

.lychee-notice-popup-detail-button:hover {
  background: #1565C0;
  color: #fff !important;
}
