/* WatchDramaFree toast — tema-P 深蓝黑风格（参考目标站 .uye-bildirim） */
.toast-host {
  --toast-bg: #1a242f;
  --toast-border: #2c3a49;
  --toast-text: #f2f2f7;
  --toast-muted: #9b9bab;
  --toast-shadow: 0 14px 36px rgba(0, 0, 0, 0.48);
  position: fixed;
  top: 76px;
  left: 50%;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 24px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast-item {
  position: relative;
  min-width: 172px;
  max-width: min(420px, calc(100vw - 24px));
  padding: 11px 18px 11px 14px;
  background: var(--toast-bg);
  box-shadow: var(--toast-shadow);
  border: 1px solid var(--toast-border);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 11px;
  box-sizing: border-box;
  color: var(--toast-text);
  font-size: 14px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
  overflow: hidden;
}

.toast-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 12px 0 0 12px;
  background: var(--toast-accent, #1a98ff);
}

.toast-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-item.is-leaving {
  opacity: 0;
  transform: translateY(-6px);
}

.toast-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--toast-icon-bg, rgba(26, 152, 255, 0.16));
  color: var(--toast-icon-fg, #1a98ff);
}

.toast-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.toast-text {
  flex: 1;
  min-width: 0;
  padding-right: 2px;
}

.toast-item--info {
  --toast-accent: #1a98ff;
  --toast-icon-bg: rgba(26, 152, 255, 0.16);
  --toast-icon-fg: #1a98ff;
}

.toast-item--success {
  --toast-accent: #00d2c6;
  --toast-icon-bg: rgba(0, 210, 198, 0.16);
  --toast-icon-fg: #00d2c6;
}

.toast-item--error {
  --toast-accent: #ff5c77;
  --toast-icon-bg: rgba(255, 92, 119, 0.16);
  --toast-icon-fg: #ff5c77;
}

.toast-item--warning {
  --toast-accent: #f59e0b;
  --toast-icon-bg: rgba(245, 158, 11, 0.16);
  --toast-icon-fg: #f59e0b;
}

@media (max-width: 767px) {
  .toast-host {
    top: calc(62px + env(safe-area-inset-top, 0px));
    gap: 8px;
  }
  .toast-item {
    min-width: 0;
    padding: 10px 14px 10px 12px;
    font-size: 13px;
    gap: 9px;
  }
  .toast-icon {
    width: 24px;
    height: 24px;
  }
}
