/* ポップアップバナーのスタイル */
.popup-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 200px;
  height: 200px;
  background: #0a4b78;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  animation: slideIn 0.5s ease-out;
  transition: transform 0.3s ease;
}

/* バナー内のリンク */
.popup-banner a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  border-radius: 12px;
  overflow: hidden;
}

/* ホバー時の効果 */
.popup-banner:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
}

/* 閉じるボタン */
.close-btn {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1001;
}

.close-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: rotate(90deg) scale(1.1);
}

.close-btn::before,
.close-btn::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 2px;
  background: white;
}

.close-btn::before {
  transform: rotate(45deg);
}

.close-btn::after {
  transform: rotate(-45deg);
}

/* アニメーション */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes rotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* 非表示状態 */
.popup-banner.hidden {
  animation: slideOut 0.5s ease-in forwards;
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(calc(100% + 40px));
    opacity: 0;
  }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .popup-banner {
    width: 250px;
    height: 250px;
    bottom: 15px;
    right: 15px;
  }

  .close-btn {
    width: 26px;
    height: 26px;
    top: -13px;
    right: -13px;
  }

  .close-btn::before,
  .close-btn::after {
    width: 14px;
  }
}

@media (max-width: 480px) {
  .popup-banner {
    width: 150px;
    height: 150px;
    bottom: 10px;
    right: 10px;
  }

  .close-btn {
    width: 24px;
    height: 24px;
    top: -12px;
    right: -12px;
  }

  .close-btn::before,
  .close-btn::after {
    width: 12px;
    height: 2px;
  }
}