@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;800;900&family=JetBrains+Mono:wght@400;700;800&display=swap');

body {
  background-color: #05070a;
  color: #e6edf3;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
}

.armor-inner-layer {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 2px;
}

.btn-vip-gold {
  background: linear-gradient(to right, #facc15, #ca8a04);
  color: #000;
  text-transform: uppercase;
  font-weight: 900;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8), 0 0 10px rgba(202, 138, 4, 0.3);
  border: 1px solid #fef08a;
}

@keyframes paparazzi-flash {
  0%, 95%, 100% { opacity: 0; }
  2%, 10%, 18% { opacity: 0.6; }
  5%, 14% { opacity: 0.2; }
}

.light-paparazzi {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  background: white;
  mix-blend-mode: overlay;
  animation: paparazzi-flash 2.5s ease-out infinite;
}

@keyframes police-pulse {
  0%, 100% { background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.2) 0%, transparent 70%); }
  50% { background: radial-gradient(circle at 70% 50%, rgba(239, 68, 68, 0.2) 0%, transparent 70%); }
}

.light-police {
  position: fixed;
  inset: 0;
  z-index: 9991;
  pointer-events: none;
  animation: police-pulse 1s step-end infinite;
  mix-blend-mode: screen;
}

@keyframes cyberpunk-glow {
  0%, 100% { border-color: #a855f7; box-shadow: 0 0 15px rgba(168, 85, 247, 0.3) inset; }
  50% { border-color: #22c55e; box-shadow: 0 0 15px rgba(34, 197, 94, 0.3) inset; }
}

.light-cyberpunk {
  position: fixed;
  inset: 0;
  z-index: 9992;
  pointer-events: none;
  border: 3px solid #a855f7;
  animation: cyberpunk-glow 2s linear infinite;
}

.tv-active-blink {
  animation: master-blink 1s infinite !important;
}

@keyframes master-blink {
  0%, 100% {
    border-color: #fff;
    box-shadow: 0 0 5px #fff;
    transform: scale(1);
  }
  50% {
    border-color: #e5b80b;
    box-shadow: 0 0 20px rgba(229, 184, 11, 0.5);
    transform: scale(1.02);
  }
}

@keyframes scan-line {
  0% { transform: translateY(-50vh); }
  100% { transform: translateY(50vh); }
}

.scan-overlay .scan-beam {
  width: 100%;
  height: 2px;
  background: #22d3ee;
  position: absolute;
  animation: scan-line 1.5s linear infinite;
  box-shadow: 0 0 15px #22d3ee;
}

.scrollbar-thin::-webkit-scrollbar { width: 4px; }
.scrollbar-thin::-webkit-scrollbar-track { background: #0d1117; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: #30363d; border-radius: 10px; }

.nav-btn.active-live-watch { border-bottom: 2px solid #22c55e; background: rgba(20, 83, 45, 0.2); color: #4ade80; }
.mirror-live { transform: scaleX(-1); }

/* Live feed — TikTok dọc / YouTube ngang */
.live-stage-tiktok #live-feed-mount {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.live-tiktok-phone {
  width: min(100%, 340px);
  height: 100%;
  max-height: 100%;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid #222;
  box-shadow: 0 0 40px rgba(236, 72, 153, 0.15);
}
.live-stage-youtube #live-feed-mount {
  background: #0f0f0f;
}
/* Kho luồng dưới màn hình — không chiếm chỗ player */
.live-catalog-section.live-catalog-below {
  contain: layout style;
  max-height: 6.5rem;
}
.live-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 0.35rem;
  max-height: 4.75rem;
  overflow-y: auto;
  overflow-x: hidden;
  contain: layout style paint;
  content-visibility: auto;
}
.live-catalog-card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: #0a0a0a;
  cursor: pointer;
  text-align: left;
  padding: 0;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.live-catalog-card:hover {
  transform: translateZ(0) scale(1.03);
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.12);
}
.live-catalog-card.is-active {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px #22c55e, 0 4px 24px rgba(34, 197, 94, 0.2);
}
.live-catalog-card__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transform: translateZ(0);
}
.live-catalog-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.15) 55%, transparent 100%);
  pointer-events: none;
}
.live-catalog-card__body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.35rem 0.4rem;
  pointer-events: none;
  z-index: 1;
}
.live-catalog-card__live {
  display: inline-block;
  font-size: 6px;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  background: #dc2626;
  padding: 1px 4px;
  border-radius: 2px;
  margin-bottom: 2px;
  margin-right: 2px;
}
.live-catalog-card__demo {
  display: inline-block;
  font-size: 6px;
  font-weight: 900;
  text-transform: uppercase;
  color: #fde047;
  background: #422006;
  border: 1px solid #ca8a04;
  padding: 1px 4px;
  border-radius: 2px;
  margin-bottom: 2px;
}
.live-catalog-card__title {
  display: block;
  font-size: 7px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-catalog-card__meta {
  display: block;
  font-size: 6px;
  color: #9ca3af;
  font-family: ui-monospace, monospace;
  text-transform: uppercase;
  margin-top: 1px;
}

.sat-preview-video, .sat-preview-iframe { z-index: 1; opacity: 0.92; }
.sat-poster { opacity: 1; }
.satellite-tile:has(.sat-preview-video:not([style*="display: none"])) .sat-poster,
.satellite-tile:has(.sat-preview-iframe) .sat-poster { opacity: 0.25; }
.nav-btn.active-live-broadcast { border-bottom: 2px solid #ef4444; background: rgba(69, 10, 10, 0.2); color: #f87171; }
.nav-btn.active-vip-rooms { border-bottom: 2px solid #eab308; background: rgba(66, 32, 6, 0.2); color: #facc15; }
.nav-btn.active-meeting { border-bottom: 2px solid #0ea5e9; background: rgba(12, 74, 110, 0.2); color: #38bdf8; }
.nav-btn.active-audio-tactical { border-bottom: 2px solid #06b6d4; background: rgba(22, 78, 99, 0.2); color: #22d3ee; }
.nav-btn.active-intelligence { border-bottom: 2px solid #a855f7; background: rgba(59, 7, 100, 0.2); color: #c084fc; }
.nav-btn.active-news { border-bottom: 2px solid #10b981; background: rgba(6, 78, 59, 0.2); color: #34d399; }

.panel-fade-in { animation: panelIn 0.2s ease-out; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden { display: none !important; }

#panel-host.panel-host-live {
  overflow: hidden;
  padding: 0.5rem;
}
#panel-host.panel-host-live .live-watch-panel {
  height: 100%;
}
#panel-host.panel-host-live .live-main-stage {
  flex: 1 1 auto;
  min-height: 0;
}

.toast-enter { animation: toastIn 0.25s ease-out; }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* —— Live broadcast preview compositor —— */
.live-preview-shell {
  --live-light-intensity: 0.7;
  position: relative;
}
.live-preview-shell.live-light-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
  background: linear-gradient(to bottom, rgba(255,255,200,calc(0.35 * var(--live-light-intensity))), transparent 45%);
}
.live-preview-shell.live-light-floor::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 35%;
  pointer-events: none;
  z-index: 25;
  background: linear-gradient(to top, rgba(229,184,11,calc(0.25 * var(--live-light-intensity))), transparent);
}
.live-studio-ao {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 38%;
  height: 72%;
  z-index: 15;
  border: 2px solid rgba(229,184,11,0.6);
  border-radius: 8px 0 0 0;
  overflow: hidden;
  box-shadow: -8px -8px 24px rgba(0,0,0,0.6);
}
.live-preview-shell.live-studio-ao-active #live-preview-video,
.live-preview-shell.live-studio-ao-active #live-preview-yt {
  width: 62%;
}
.live-scene-ticker {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(229,184,11,0.9);
  color: #000;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 8px;
  white-space: nowrap;
  overflow: hidden;
  animation: liveTicker 18s linear infinite;
}
@keyframes liveTicker {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}
.live-scene-logo {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.7);
  color: #E5B80B;
  font-size: 9px;
  font-weight: 900;
  padding: 4px 8px;
  border: 1px solid #E5B80B;
  border-radius: 4px;
}
.live-scene-overlay-shop {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(220,38,38,0.85);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 4px;
}
.live-scene-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: 900;
  padding: 8px 16px;
  text-transform: uppercase;
}
.live-scene-banner.is-hard {
  background: #E5B80B;
  color: #000;
  border: 2px solid #fff;
}
.live-scene-banner.is-soft {
  background: rgba(255,255,255,0.85);
  color: #111;
  border-radius: 8px;
}
.live-scene-banner.is-fire {
  background: linear-gradient(90deg, #dc2626, #E5B80B);
  color: #fff;
  text-shadow: 0 1px 2px #000;
}
.live-beauty-on #live-preview-video,
.live-beauty-on #live-preview-yt {
  filter: brightness(1.08) contrast(1.05) saturate(1.12) blur(0.3px);
}
.live-mask-layer {
  position: absolute;
  inset: 0;
  z-index: 18;
  pointer-events: none;
  background: radial-gradient(circle at 50% 35%, transparent 28%, rgba(0,0,0,0.55) 72%);
}
.live-bg-replace {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-size: cover;
  background-position: center;
}
.live-chroma-mode #live-preview-video {
  mix-blend-mode: multiply;
  opacity: 0.92;
}

/* —— Gift impact overlay (GPU, 120fps target) —— */
.gift-overlay {
  position: absolute;
  inset: 0;
  z-index: 45;
  overflow: hidden;
  contain: layout style paint;
}
.gift-impact {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: giftImpactShell 2.8s forwards;
  will-change: opacity;
  transform: translateZ(0);
}
.gift-pop-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  animation: giftPop 0.7s cubic-bezier(0.22, 1.15, 0.36, 1) forwards;
  will-change: transform, opacity;
  transform: translateZ(0);
}
.gift-pop-ring {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 3px solid rgba(229, 184, 11, 0.6);
  animation: giftPopRing 0.9s ease-out forwards;
  will-change: transform, opacity;
}
.gift-pop-icon {
  font-size: 3.5rem;
  line-height: 1;
  filter: drop-shadow(0 0 18px rgba(229, 184, 11, 0.9));
  transform: translateZ(0);
}
.gift-pop-label {
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 12px rgba(229, 184, 11, 0.9), 0 2px 4px #000;
  letter-spacing: 0.08em;
}
.gift-vip-drive {
  margin-top: 0.25rem;
  animation: vipDrive 1.4s 0.25s ease-out forwards;
  will-change: transform, opacity;
  transform: translateZ(0);
}
.gift-donor-name {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #fde047;
}
.name-glow-pulse {
  display: inline-block;
  animation: nameGlowPulse 1s ease-in-out 3;
  animation-fill-mode: forwards;
  will-change: filter;
  transform: translateZ(0);
}
.gift-impact--vip .gift-pop-icon {
  font-size: 4.25rem;
}
.gift-streak {
  position: absolute;
  top: 50%;
  font-size: 2rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  transform: translateZ(0);
}
.gift-streak--left {
  left: -10%;
  animation: giftStreakL 1.1s 0.15s ease-out forwards;
}
.gift-streak--right {
  right: -10%;
  animation: giftStreakR 1.1s 0.2s ease-out forwards;
}
@keyframes nameGlowPulse {
  0%, 100% {
    filter: brightness(1) drop-shadow(0 0 0 transparent);
  }
  50% {
    filter: brightness(2.4) drop-shadow(0 0 10px #E5B80B) drop-shadow(0 0 22px #facc15);
  }
}
@keyframes giftPop {
  0% { opacity: 0; transform: scale(0.2) translateZ(0); }
  55% { opacity: 1; transform: scale(1.12) translateZ(0); }
  100% { opacity: 1; transform: scale(1) translateZ(0); }
}
@keyframes giftPopRing {
  0% { opacity: 0.9; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(1.8); }
}
@keyframes vipDrive {
  0% { opacity: 0; transform: translateX(-80%) scale(0.7) translateZ(0); }
  35% { opacity: 1; transform: translateX(0) scale(1.08) translateZ(0); }
  65% { opacity: 1; transform: translateX(0) scale(1) translateZ(0); }
  100% { opacity: 0.85; transform: translateX(0) scale(1) translateZ(0); }
}
@keyframes giftStreakL {
  0% { opacity: 0; transform: translate(-120%, -50%) scale(0.6); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translate(40%, -50%) scale(1.1); }
}
@keyframes giftStreakR {
  0% { opacity: 0; transform: translate(120%, -50%) scale(0.6); }
  40% { opacity: 1; }
  100% { opacity: 0; transform: translate(-40%, -50%) scale(1.1); }
}
@keyframes giftImpactShell {
  0%, 75% { opacity: 1; }
  100% { opacity: 0; }
}
