/* 글로벌 전광판(월드 노티) — 게임 월드맵 스타일 */

.sv-world-ticker {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
  max-height: 0;
  opacity: 1;
  transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.sv-world-ticker--appweb {
  padding-top: env(safe-area-inset-top, 0px);
  z-index: 350;
}

/* appweb: 뒤 헤더/메뉴가 비치는 글래스 오버레이 */
.sv-world-ticker--appweb .sv-world-ticker__shell {
  background: linear-gradient(
    180deg,
    rgba(18, 26, 46, 0.34) 0%,
    rgba(10, 14, 26, 0.2) 100%
  );
  backdrop-filter: blur(8px) saturate(1.02);
  -webkit-backdrop-filter: blur(8px) saturate(1.02);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.sv-world-ticker--pcweb {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  width: 100%;
  z-index: 1;
  flex-shrink: 0;
}

.sv-world-ticker--pcweb.is-pinned-below-toolbar {
  position: fixed;
  top: var(--sv-ticker-pin-top, var(--header-height, 56px));
  left: var(--sv-ticker-pin-left, 0);
  width: var(--sv-ticker-pin-width, 100%);
  right: auto;
  z-index: 47;
  margin: 0;
  pointer-events: none;
}

.sv-world-ticker.is-open {
  max-height: 40px;
}

.sv-world-ticker.is-visible {
  max-height: 40px;
}

.sv-world-ticker.is-fading {
  opacity: 0;
}

.sv-world-ticker__shell {
  position: relative;
  height: 40px;
  overflow: hidden;
  background: linear-gradient(180deg, #121a2e 0%, #0a0e1a 100%);
  border-bottom: 1px solid rgba(240, 179, 90, 0.28);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(240, 179, 90, 0.35);
}

.sv-world-ticker.is-open .sv-world-ticker__shell::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(240, 179, 90, 0.14) 45%,
    transparent 70%
  );
  transform: translateX(-120%);
  animation: sv-world-ticker-shimmer 1.2s ease-out 1;
  pointer-events: none;
}

.sv-world-ticker__inner {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 10px 0 0;
  gap: 0;
  border-left: 3px solid #f0b35a;
}

.sv-world-ticker__fanfare {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 40px;
  margin-left: 4px;
  padding-right: 8px;
  border-right: 1px solid rgba(240, 179, 90, 0.22);
  transform: scale(0.65);
  opacity: 0.55;
  filter: drop-shadow(0 0 0 transparent);
  transition: transform 0.35s ease, opacity 0.35s ease, filter 0.35s ease;
}

.sv-world-ticker__trumpet {
  display: block;
  width: 22px;
  height: 22px;
}

.sv-world-ticker.is-fanfare .sv-world-ticker__fanfare {
  animation: sv-world-ticker-fanfare 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.sv-world-ticker__track {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
  height: 40px;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 24px,
    #000 calc(100% - 16px),
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 24px,
    #000 calc(100% - 16px),
    transparent 100%
  );
}

.sv-world-ticker__marquee {
  display: block;
  height: 40px;
  overflow: hidden;
}

.sv-world-ticker__marquee--static {
  display: flex;
  align-items: center;
  height: 40px;
  overflow: hidden;
}

.sv-world-ticker__marquee--static .sv-world-ticker__text {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sv-world-ticker__marquee-group {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  height: 40px;
  will-change: transform;
}

.sv-world-ticker__track.is-marquee .sv-world-ticker__marquee-group {
  animation: sv-world-ticker-marquee var(--marquee-duration, 18s) linear infinite;
}

.sv-world-ticker__text {
  display: inline-block;
  font-size: 13px;
  line-height: 40px;
  color: #f5f7fa;
  white-space: nowrap;
  font-family: 'Noto Sans KR', 'DM Sans', sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.sv-world-ticker--appweb .sv-world-ticker__text {
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.72),
    0 0 10px rgba(0, 0, 0, 0.35);
}

.sv-world-ticker__gap {
  display: inline-block;
  padding: 0 14px;
  font-size: 10px;
  line-height: 40px;
  color: rgba(240, 179, 90, 0.6);
  vertical-align: middle;
}

@keyframes sv-world-ticker-fanfare {
  0% {
    transform: scale(0.5) rotate(-14deg);
    opacity: 0.3;
    filter: drop-shadow(0 0 0 transparent) brightness(1);
  }
  45% {
    transform: scale(1.18) rotate(5deg);
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(240, 179, 90, 0.9)) brightness(1.25);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(240, 179, 90, 0.55)) brightness(1);
  }
}

@keyframes sv-world-ticker-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes sv-world-ticker-shimmer {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sv-world-ticker {
    transition: none;
  }

  .sv-world-ticker.is-open .sv-world-ticker__shell::after {
    animation: none;
    display: none;
  }

  .sv-world-ticker.is-fanfare .sv-world-ticker__fanfare {
    animation: none;
    transform: scale(1);
    opacity: 1;
    filter: drop-shadow(0 0 4px rgba(240, 179, 90, 0.45));
  }

  .sv-world-ticker__track.is-marquee .sv-world-ticker__marquee-group {
    animation: none;
  }
}
