/* Creator Tools — 全站廣告版位（保留最小高度，避免 CLS） */

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.ad-slot.is-placeholder {
  border: 2px dashed rgba(255, 255, 255, 0.08);
}

.ad-slot--leaderboard {
  min-height: 90px;
  width: 100%;
  max-width: 728px;
  margin-left: auto;
  margin-right: auto;
}

.ad-slot--rectangle {
  min-height: 250px;
  width: 100%;
  max-width: 336px;
  margin-left: auto;
  margin-right: auto;
}

.ad-slot--banner {
  min-height: 120px;
  width: 100%;
}

.ad-slot__label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4b5563;
  margin-bottom: 0.35rem;
}

.ad-slot__hint {
  font-size: 11px;
  color: #6b7280;
}

/* 自推產品 CTA — LineFlow AI 主力（LINE 綠 + 大按鈕） */
[data-ad-self-promo] {
  max-width: 100%;
}

.ad-self-promo {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 2px solid rgba(6, 199, 85, 0.55);
  background: linear-gradient(
    125deg,
    rgba(6, 199, 85, 0.18) 0%,
    rgba(16, 185, 129, 0.1) 35%,
    rgba(99, 102, 241, 0.12) 100%
  );
  padding: 0;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow:
    0 0 0 1px rgba(6, 199, 85, 0.15),
    0 8px 32px -8px rgba(6, 199, 85, 0.45),
    0 0 64px -16px rgba(6, 199, 85, 0.25);
}

.ad-self-promo__glow {
  position: absolute;
  top: -40%;
  right: -10%;
  width: 55%;
  height: 140%;
  background: radial-gradient(ellipse, rgba(6, 199, 85, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.ad-self-promo:hover {
  border-color: rgba(6, 199, 85, 0.85);
  transform: translateY(-3px) scale(1.01);
  box-shadow:
    0 0 0 1px rgba(6, 199, 85, 0.25),
    0 16px 48px -8px rgba(6, 199, 85, 0.55),
    0 0 80px -12px rgba(6, 199, 85, 0.35);
}

.ad-self-promo__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.75rem 1.5rem;
}

@media (min-width: 640px) {
  .ad-self-promo__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2.25rem;
    gap: 2rem;
  }
}

.ad-self-promo__content {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.ad-self-promo__badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #064e3b;
  background: linear-gradient(135deg, #6ee7b7, #34d399);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
  box-shadow: 0 2px 8px rgba(6, 199, 85, 0.35);
}

.ad-self-promo__eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #4ade80;
  margin-bottom: 0.35rem;
}

.ad-self-promo__title {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.ad-self-promo__desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #d1d5db;
  margin: 0;
  max-width: 36rem;
}

.ad-self-promo__action {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .ad-self-promo__action {
    align-items: flex-end;
    min-width: 11rem;
  }
}

.ad-self-promo__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem 1.75rem;
  border-radius: 0.875rem;
  font-size: 1.0625rem;
  font-weight: 800;
  color: #052e16;
  background: linear-gradient(180deg, #4ade80 0%, #06c755 45%, #05a847 100%);
  box-shadow:
    0 4px 0 #047857,
    0 8px 24px -4px rgba(6, 199, 85, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.ad-self-promo:hover .ad-self-promo__btn {
  transform: translateY(-1px);
  box-shadow:
    0 5px 0 #047857,
    0 12px 32px -4px rgba(6, 199, 85, 0.7);
}

.ad-self-promo__hint {
  font-size: 0.75rem;
  color: #86efac;
  font-weight: 500;
}

.ad-self-promo.is-hidden {
  display: none;
}

/* 工具頁：側欄矩形版位（桌面） */
.ad-slot--sidebar {
  min-height: 250px;
}

@media (min-width: 1024px) {
  .ad-sidebar-wrap {
    position: sticky;
    top: 5rem;
  }
}

/* 電子報訂閱 — 工具列表下方主區塊 */
[data-newsletter] {
  max-width: 100%;
}

.newsletter-box {
  border-radius: 1.25rem;
  border: 2px solid rgba(52, 211, 153, 0.45);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(99, 102, 241, 0.1) 50%, rgba(16, 185, 129, 0.08) 100%);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 0 48px -12px rgba(16, 185, 129, 0.35);
}

@media (min-width: 640px) {
  .newsletter-box {
    padding: 2.5rem 2.5rem;
  }
}

.newsletter-box__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.newsletter-box__title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.newsletter-box__desc {
  font-size: 1rem;
  line-height: 1.65;
  color: #d1d5db;
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

.newsletter-box__desc strong {
  color: #fff;
  font-weight: 600;
}

.newsletter-form__row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 28rem;
  margin: 0 auto 1rem;
}

@media (min-width: 480px) {
  .newsletter-form__row {
    flex-direction: row;
  }
}

.newsletter-form__input {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1rem;
}

.newsletter-form__input::placeholder {
  color: #6b7280;
}

.newsletter-form__input:focus {
  outline: none;
  border-color: rgba(52, 211, 153, 0.65);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.newsletter-form__btn {
  padding: 0.85rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px -4px rgba(16, 185, 129, 0.5);
}

.newsletter-form__btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px -4px rgba(16, 185, 129, 0.55);
}

.newsletter-form__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.newsletter-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  max-width: 28rem;
  margin: 0 auto;
  text-align: left;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #9ca3af;
}

.newsletter-form__consent input {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
}

.newsletter-form__consent a {
  color: #a5b4fc;
  text-decoration: underline;
}

.newsletter-form__status {
  margin-top: 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  min-height: 1.5rem;
}

.newsletter-form__status.is-success { color: #6ee7b7; }
.newsletter-form__status.is-error { color: #fca5a5; }
.newsletter-form__status.is-info { color: #fcd34d; }

.newsletter-box__contact {
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  color: #6b7280;
}

.newsletter-box__contact a {
  color: #9ca3af;
}

.footer-subscribe-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
  border: 1px solid rgba(52, 211, 153, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.footer-subscribe-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px -6px rgba(16, 185, 129, 0.5);
}

[data-newsletter].is-hidden {
  display: none;
}
