/* ============================================
   eResonate — Live Demo page
   ============================================ */

.nav-links a.active { color: var(--text); }

/* Demo notice bar */
.demo-bar {
  margin-top: var(--nav-h);
  background: rgba(62, 224, 140, 0.08);
  border-bottom: 1px solid rgba(62, 224, 140, 0.25);
  padding: 0.6rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  text-align: center;
}
.demo-pill {
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--money);
  border: 1px solid rgba(62, 224, 140, 0.4);
  border-radius: 20px;
  padding: 0.15rem 0.7rem;
  white-space: nowrap;
}

/* Layout */
.stream-wrap { padding-top: 2rem; padding-bottom: 5rem; }
.stream-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

/* Player */
.player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050A14;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
#stageCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.stage-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 1;
}
.stage-video.on { opacity: 1; }
.player-topbar {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 3;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 16px var(--accent-glow);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
}
.live-badge.sm { font-size: 0.62rem; padding: 0.2rem 0.5rem; }
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: livePulse 1.4s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}
.viewer-pill {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.viewer-pill span { color: var(--money); }
.fs-btn {
  margin-left: auto;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  padding: 0.32rem 0.55rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.fs-btn:hover { border-color: rgba(255, 255, 255, 0.35); transform: scale(1.08); }
.share-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.32rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s;
}
.share-btn:hover { border-color: rgba(255, 255, 255, 0.35); }
.share-btn + .fs-btn { margin-left: 0; }

.share-menu {
  position: absolute;
  top: 3.2rem;
  right: 1rem;
  z-index: 6;
  min-width: 210px;
  background: rgba(10, 16, 34, 0.96);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.share-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.sm-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.45rem 0.75rem 0.55rem;
}
.sm-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}
.sm-item:hover { background: rgba(255, 255, 255, 0.07); }
.sm-item.copied { color: #3EE08C; }

/* Fullscreen state — let the player fill the screen */
.player:fullscreen { aspect-ratio: auto; border-radius: 0; border: none; }
.player:fullscreen .stage-video { object-fit: contain; background: #000; }
.player:-webkit-full-screen { aspect-ratio: auto; border-radius: 0; border: none; }
.player:-webkit-full-screen .stage-video { object-fit: contain; background: #000; }
/* CSS fallback when the native Fullscreen API is unavailable */
.player.fake-fs {
  position: fixed;
  inset: 0;
  z-index: 1000;
  aspect-ratio: auto;
  border-radius: 0;
  border: none;
  background: #000;
}
.player.fake-fs .stage-video { object-fit: contain; background: #000; }

/* Ad overlay */
.ad-overlay {
  position: absolute;
  right: 1rem;
  bottom: 5.5rem;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(6, 10, 22, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(62, 224, 140, 0.35);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  max-width: 320px;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s;
}
.ad-overlay.on { transform: translateX(0); opacity: 1; }
.ad-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #07070F;
  background: var(--money);
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  flex-shrink: 0;
}
.ad-brand { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 0.92rem; }
.ad-note { font-size: 0.7rem; color: var(--money); }

/* Player info bar */
.player-info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 2.2rem 1.25rem 1rem;
  background: linear-gradient(to top, rgba(3, 3, 8, 0.92) 30%, transparent);
}
.pi-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.pi-text { flex: 1; min-width: 0; }
.pi-artist { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.05rem; }
.pi-venue { font-size: 0.78rem; color: var(--text-muted); }
.btn-follow { padding: 0.5rem 1.2rem; font-size: 0.82rem; flex-shrink: 0; }
.btn-follow.following {
  background: transparent;
  border: 1px solid var(--border-accent);
  color: var(--accent);
  box-shadow: none;
}

/* Reactions */
.reaction-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.float-emoji {
  position: absolute;
  bottom: -40px;
  font-size: 1.6rem;
  animation: floatUp 3s ease-out forwards;
}
@keyframes floatUp {
  0% { transform: translateY(0) scale(0.7); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translateY(-90vh) translateX(var(--drift, 0px)) scale(1.15); opacity: 0; }
}
.reaction-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 0.25rem;
  flex-wrap: wrap;
}
.reaction-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }
.reaction-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1.05rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.reaction-btn:hover { transform: translateY(-2px) scale(1.08); border-color: var(--border-accent); }
.reaction-btn:active { transform: scale(0.92); }
.reaction-hint { font-size: 0.72rem; color: var(--text-dim); margin-left: auto; }

/* Chat */
.chat-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  height: 640px;
  overflow: hidden;
}
.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
}
.chat-count { font-size: 0.72rem; color: var(--accent); font-weight: 600; }
.chat-feed {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}
.chat-msg {
  font-size: 0.82rem;
  line-height: 1.45;
  animation: msgIn 0.25s ease;
  word-wrap: break-word;
}
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-user { font-weight: 700; margin-right: 0.35rem; }
.chat-msg .badge {
  display: inline-block;
  font-family: 'Outfit', sans-serif;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #07070F;
  background: var(--money);
  border-radius: 3px;
  padding: 0.08rem 0.3rem;
  margin-right: 0.35rem;
  vertical-align: 1px;
}
.chat-msg.system {
  color: var(--money);
  font-size: 0.76rem;
  background: rgba(62, 224, 140, 0.07);
  border: 1px solid rgba(62, 224, 140, 0.18);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
}
.chat-msg.you .chat-user { color: var(--accent); }
.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.8rem;
  border-top: 1px solid var(--border);
}
.chat-input-row input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  color: var(--text);
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  min-width: 0;
}
.chat-input-row input:focus { border-color: var(--accent); }
.chat-send { padding: 0.6rem 1.1rem; font-size: 0.82rem; }

/* Green Room banner */
.greenroom-banner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.5rem;
  padding: 0.85rem 1.2rem;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.16), rgba(217, 70, 239, 0.08) 60%, transparent);
  border: 1px solid var(--border-accent);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.greenroom-banner:hover {
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.18);
  transform: translateY(-1px);
}
.gr-ticket { font-size: 1.4rem; flex-shrink: 0; }
.gr-text { flex: 1; font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }
.gr-text strong { color: var(--text); }
.gr-go {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Earnings strip */
.earnings-strip {
  margin-top: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 0 50px rgba(168, 85, 247, 0.07);
}
.es-head h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.es-head p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.es-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.es-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}
.es-card--artist { border-color: var(--border-accent); background: rgba(168, 85, 247, 0.06); }
.es-card--venue { border-color: rgba(62, 224, 140, 0.3); background: rgba(62, 224, 140, 0.05); }
.es-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.es-num {
  font-family: 'Outfit', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.es-card--artist .es-num { color: var(--accent); }
.es-card--venue .es-num { color: var(--money); }
.es-sub { font-size: 0.72rem; color: var(--text-dim); margin-top: 0.25rem; }

.split-track {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}
.split-half { flex: 1; padding: 0.55rem; }
.split-artist { background: rgba(168, 85, 247, 0.25); color: #D9BAFF; }
.split-venue { background: rgba(62, 224, 140, 0.18); color: var(--money); }
.split-caption {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.6rem;
}

/* Up next */
.upnext { margin-top: 4.5rem; }
.upnext-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.upnext-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
.show-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.show-card:hover { border-color: var(--border-accent); transform: translateY(-3px); }
.sc-thumb {
  aspect-ratio: 16 / 9;
  position: relative;
  padding: 0.6rem;
  background: linear-gradient(135deg, #240a38, #1a0a2e);
  overflow: hidden;
}
.sc-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sc-thumb--upcoming .sc-video { filter: grayscale(0.4) brightness(0.55); }
.sc-thumb .live-badge,
.sc-thumb .upcoming-badge {
  position: relative;
  z-index: 2;
}
.upcoming-badge {
  display: inline-block;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem;
  color: var(--text-muted);
}
.sc-body { padding: 0.9rem 1rem 1.1rem; }
.sc-artist { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 0.95rem; }
.sc-venue { font-size: 0.75rem; color: var(--text-muted); margin: 0.15rem 0 0.35rem; }
.sc-meta { font-size: 0.72rem; color: var(--accent); font-weight: 600; }

/* CTA */
.demo-cta {
  margin-top: 4.5rem;
  text-align: center;
  padding: 3.5rem 2rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.09) 0%, transparent 70%);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
}
.demo-cta h2 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.demo-cta p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
  font-size: 0.95rem;
}
.demo-cta-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 1024px) {
  .stream-grid { grid-template-columns: 1fr; }
  .chat-col { height: 420px; }
  .upnext-grid { grid-template-columns: repeat(2, 1fr); }
  .es-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .upnext-grid { grid-template-columns: 1fr; }
  .es-grid { grid-template-columns: 1fr; }
  .reaction-hint { display: none; }
  .player { aspect-ratio: 4 / 3; }
  .ad-overlay {
    bottom: auto;
    top: 3rem;
    left: auto;
    max-width: 230px;
    padding: 0.45rem 0.65rem;
    gap: 0.5rem;
  }
  .ad-brand { font-size: 0.78rem; }
  .ad-note { font-size: 0.6rem; }
  .pi-artist { font-size: 0.92rem; }
  .pi-venue { font-size: 0.7rem; }
  .btn-follow { padding: 0.4rem 0.9rem; font-size: 0.75rem; }
}

/* Backstage countdown + preview modal (teaser) */
.gr-countdown {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--money);
  background: rgba(62, 224, 140, 0.1);
  border: 1px solid rgba(62, 224, 140, 0.35);
  border-radius: 20px;
  padding: 0.25rem 0.7rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.greenroom-banner.open { border-color: rgba(62, 224, 140, 0.5); }
.greenroom-banner.open .gr-countdown { animation: grPulse 1.6s ease-in-out infinite; }
@keyframes grPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(62, 224, 140, 0); }
  50% { box-shadow: 0 0 18px rgba(62, 224, 140, 0.45); }
}

.gr-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(4, 8, 18, 0.8);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.gr-modal.on { opacity: 1; pointer-events: auto; }
.gr-modal-card {
  width: min(460px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 80px rgba(168, 85, 247, 0.22), 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(14px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  position: relative;
}
.gr-modal.on .gr-modal-card { transform: none; }
.gr-close {
  position: absolute;
  top: 0.7rem; right: 0.7rem;
  z-index: 2;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.55);
  color: var(--text);
  cursor: pointer;
  font-size: 0.8rem;
}
.gr-modal-img {
  aspect-ratio: 16 / 7;
  background: url('images/greenroom-bg.jpg') center 30% / cover no-repeat;
  position: relative;
  padding: 0.8rem;
}
.gr-modal-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg-card), transparent 55%);
}
.gr-modal-img .live-badge { position: relative; z-index: 1; }
.gr-modal-body { padding: 0.5rem 1.5rem 1.5rem; }
.gr-modal-body h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
}
.gr-modal-status { font-size: 0.85rem; color: var(--text-muted); margin: 0.3rem 0 1rem; }
.gr-modal-status strong { color: var(--money); font-variant-numeric: tabular-nums; }
.gr-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  margin-bottom: 1.25rem;
}
.gr-stat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.5rem;
  text-align: center;
}
.gs-num {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.gs-label { font-size: 0.62rem; color: var(--text-dim); }
.gr-modal-btns { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.gr-modal-btns .btn { flex: 1; justify-content: center; white-space: nowrap; }
.gr-modal-note { font-size: 0.7rem; color: var(--text-dim); text-align: center; margin-top: 0.9rem; }
