/**
 * PulsePrize Demo — dark terminal shell overrides (game logic CSS stays in styles.css).
 */
body.pp-terminal {
  font-family: Inter, system-ui, sans-serif;
  background: #0a0a0c !important;
  color: #e8e8f0;
  padding: 0;
  margin: 0;
  min-height: 100vh;
}

body.pp-terminal .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  background: transparent;
}

@media (min-width: 768px) {
  body.pp-terminal .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Hero + mini stats */
body.pp-terminal .pp-demo-shell {
  padding-top: 1.5rem;
}

body.pp-terminal .pp-hero-block {
  margin-top: 0.5rem;
}

body.pp-terminal .main-content section,
body.pp-terminal #player-area {
  background: #12121a;
  border: 1px solid #2a2a36;
  border-radius: 1rem;
  box-shadow: none !important;
}

body.pp-terminal .main-content h2 {
  color: #fafafa;
}

body.pp-terminal .community-spotlight--carousel {
  margin: 1.5rem 0 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  min-height: 200px;
}

body.pp-terminal .community-spotlight__track {
  position: relative;
  min-height: 200px;
  border-radius: 1rem;
}

body.pp-terminal .community-spotlight__slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.75rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
  pointer-events: none;
  overflow: hidden;
}

body.pp-terminal .community-spotlight__slide--text::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 120% at 50% 0%, rgba(255, 255, 255, 0.14), transparent 55%),
    radial-gradient(circle at 12% 88%, var(--banner-accent, #00ff9d), transparent 42%),
    radial-gradient(circle at 88% 20%, rgba(192, 38, 255, 0.35), transparent 38%);
  opacity: 0.85;
  pointer-events: none;
}

body.pp-terminal .community-spotlight__slide--text::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

body.pp-terminal .community-spotlight__inner {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  margin: 0 auto;
}

body.pp-terminal .community-spotlight__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.65rem;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
  color: var(--banner-accent, #00ff9d);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid color-mix(in srgb, var(--banner-accent, #00ff9d) 45%, transparent);
  box-shadow: 0 0 20px color-mix(in srgb, var(--banner-accent, #00ff9d) 35%, transparent);
}

body.pp-terminal .community-spotlight__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

body.pp-terminal .community-spotlight__link--text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 200px;
  color: inherit;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  body.pp-terminal .community-spotlight__slide {
    transition: none;
  }
}

body.pp-terminal .community-spotlight__slide--image {
  padding: 0;
  line-height: 0;
  overflow: hidden;
}

body.pp-terminal .community-spotlight__link {
  display: block;
  height: 100%;
  min-height: 200px;
  border-radius: 1rem;
}

body.pp-terminal .community-spotlight__img {
  display: block;
  width: 100%;
  min-height: 200px;
  max-width: 1400px;
  height: auto;
  object-fit: cover;
  border-radius: 1rem;
}

body.pp-terminal .community-spotlight__title {
  margin: 0;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

body.pp-terminal .community-spotlight__sub,
body.pp-terminal .community-spotlight__contrib {
  margin: 0.55rem 0 0;
  font-size: clamp(0.82rem, 1.8vw, 0.95rem);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

body.pp-terminal .community-spotlight__contrib {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--banner-accent, #00ff9d) 75%, #fff);
}

body.pp-terminal .community-spotlight__sub strong {
  color: #fff;
  font-weight: 600;
}

body.pp-terminal .community-spotlight__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

body.pp-terminal .community-spotlight__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #3a3a48;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

body.pp-terminal .community-spotlight__dot.is-active {
  background: #00ff9d;
  transform: scale(1.15);
}

body.pp-terminal .community-spotlight__dot:focus-visible {
  outline: 2px solid #00ff9d;
  outline-offset: 2px;
}

body.pp-terminal .footer {
  color: #9898a8;
  border-top: 1px solid #2a2a36;
  margin-top: 2rem;
  padding-top: 1rem;
}

body.pp-terminal .footer-online {
  color: #00ff9d;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}

body.pp-terminal #online-count {
  font-variant-numeric: tabular-nums;
}

/* —— Activity feed dock: fixed overlay bottom-right (outside .container) —— */
body.pp-terminal .pp-activity-dock {
  position: fixed !important;
  bottom: 10px !important;
  right: 10px !important;
  left: auto !important;
  top: auto !important;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  width: min(340px, calc(100vw - 24px));
  pointer-events: none;
}

body.pp-terminal .pp-activity-dock > * {
  pointer-events: auto;
}

body.pp-terminal .notification-log {
  position: relative !important;
  bottom: auto !important;
  right: auto !important;
  left: auto !important;
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-height: min(420px, 50vh);
  padding: 10px;
  background: rgba(10, 10, 12, 0.94);
  border: 1px solid #2a2a36;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}

body.pp-terminal .notification-log.is-open {
  display: flex;
}

body.pp-terminal .notification-log__item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 12px;
  line-height: 1.35;
  color: #c8c8d4;
}

body.pp-terminal .notification-log__item--bot {
  background: rgba(0, 183, 235, 0.08);
  border-color: rgba(0, 183, 235, 0.22);
}

body.pp-terminal .notification-log__item--human {
  background: rgba(204, 89, 217, 0.1);
  border-color: rgba(204, 89, 217, 0.35);
}

body.pp-terminal .notification-log__item--system {
  background: rgba(255, 255, 255, 0.04);
  border-color: #2a2a36;
}

body.pp-terminal .notification-log__item--golden {
  border-left: 3px solid #e6b800;
}

body.pp-terminal .notification-log__item--diamond {
  border-left: 3px solid #9ca3af;
  background: rgba(156, 163, 175, 0.1);
}

body.pp-terminal .notification-log__badge {
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.pp-terminal .notification-log__item--bot .notification-log__badge {
  background: rgba(0, 255, 157, 0.15);
  color: #00ff9d;
}

body.pp-terminal .notification-log__item--human .notification-log__badge {
  background: rgba(204, 89, 217, 0.2);
  color: #e8a0f0;
}

body.pp-terminal .notification-log__item--system .notification-log__badge {
  background: rgba(152, 152, 168, 0.2);
  color: #9898a8;
}

body.pp-terminal .notification-log__nick {
  color: #fafafa;
  font-weight: 600;
}

body.pp-terminal .notification-log__item--human .notification-log__nick {
  color: #e8a0f0;
}

body.pp-terminal .notification-log__tickets {
  color: #00ff9d;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

body.pp-terminal .pp-activity-feed-toggle {
  position: relative !important;
  bottom: auto !important;
  right: auto !important;
  left: auto !important;
  flex-shrink: 0;
  background: linear-gradient(135deg, #12121a, #1a1a24);
  border: 1px solid rgba(0, 255, 157, 0.35);
  color: #00ff9d;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

body.pp-terminal .pp-sound-toggle-btn.pp-sound-toggle--muted {
  border-color: rgba(152, 152, 168, 0.45);
  background: rgba(152, 152, 168, 0.1);
  color: #9898a8;
}

body.pp-terminal .pp-activity-feed-toggle:hover {
  background: rgba(0, 255, 157, 0.12);
  color: #fafafa;
}

body.pp-terminal .notification.show,
body.pp-terminal .notification.visible {
  opacity: 1;
}

body.pp-terminal .notification--bot.golden,
body.pp-terminal .notification.golden.notification--bot {
  background: rgba(18, 18, 26, 0.95);
  border: 1px solid rgba(230, 184, 0, 0.45);
  color: #f5e6a8;
}

body.pp-terminal .notification--bot.diamond,
body.pp-terminal .notification.diamond.notification--bot {
  background: rgba(22, 22, 28, 0.95);
  border: 1px solid rgba(156, 163, 175, 0.5);
  color: #e5e7eb;
}

body.pp-terminal .notification--human,
body.pp-terminal .notification.notification--human.success,
body.pp-terminal .notification.notification--human.info {
  background: rgba(30, 18, 36, 0.95);
  border: 1px solid rgba(204, 89, 217, 0.5);
  color: #f0d4f8;
}

body.pp-terminal .notification.notification--human.error {
  border-color: rgba(255, 0, 94, 0.5);
}

/* Timer hidden in header but required by script.js */
.pp-demo-timer-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Top 5 panels (Last Round Winners + Donators) —— */
body.pp-terminal #last-round-winners,
body.pp-terminal #top-donors {
  background: #12121a !important;
  border: 1px solid #2a2a36;
  border-radius: 1rem;
  box-shadow: none;
  color: #e8e8f0;
  padding: 1.25rem;
}

body.pp-terminal #last-round-winners h2,
body.pp-terminal #top-donors h2 {
  color: #fafafa;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.pp-terminal #last-round-winners a,
body.pp-terminal #top-donors a {
  color: #00ff9d;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

body.pp-terminal #last-round-winners a:hover,
body.pp-terminal #top-donors a:hover {
  color: #6ee7b7;
  text-decoration: underline;
}

/* Winners + donators tables (sidebar) */
body.pp-terminal #winnersTable,
body.pp-terminal #donatorLeaderboard,
body.pp-terminal .winners-table,
body.pp-terminal .donators-table {
  background: #0d0d12;
  border-radius: 0.75rem;
  overflow: hidden;
}

body.pp-terminal #winnersTable th,
body.pp-terminal #donatorLeaderboard th,
body.pp-terminal .winners-table th,
body.pp-terminal .donators-table th {
  background: #1a1a24 !important;
  color: #9898a8 !important;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid #2a2a36;
}

body.pp-terminal #winnersTable tr,
body.pp-terminal #donatorLeaderboard tr,
body.pp-terminal #winnersTable td,
body.pp-terminal #donatorLeaderboard td,
body.pp-terminal .winners-table td,
body.pp-terminal .donators-table td {
  background: #14141c !important;
  color: #e4e4e7 !important;
  border-bottom: 1px solid #2a2a36;
}

body.pp-terminal #winnersTable tr:hover td,
body.pp-terminal #donatorLeaderboard tr:hover td {
  background: #1a1a24 !important;
}

body.pp-terminal .entries-green {
  color: #4ade80 !important;
}

body.pp-terminal .entries-yellow {
  color: #facc15 !important;
}

body.pp-terminal .entries-red {
  color: #f87171 !important;
}

/* —— Non-winner modals only (How it Works, View All, Set Nickname, Reset Account) —— */
body.pp-terminal #howItWorksModal .modal-content,
body.pp-terminal #viewAllModal .modal-content,
body.pp-terminal #setNicknameModal .modal-content,
body.pp-terminal #resetAccountModal .modal-content {
  background: #12121a !important;
  border: 1px solid #2a2a36;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65);
  color: #e8e8f0;
}

body.pp-terminal #howItWorksModal .modal-content h2,
body.pp-terminal #viewAllModal .modal-content h2,
body.pp-terminal #setNicknameModal .modal-content h2,
body.pp-terminal #resetAccountModal .modal-content h2 {
  color: #fafafa;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

body.pp-terminal #howItWorksModal .modal-content p,
body.pp-terminal #howItWorksModal .modal-content li,
body.pp-terminal #viewAllModal .modal-content p,
body.pp-terminal #setNicknameModal .modal-content p,
body.pp-terminal #resetAccountModal .modal-content p {
  color: #c4c4d0;
  text-align: left;
}

body.pp-terminal #howItWorksModal .modal-content ul {
  padding-left: 1.25rem;
}

/* How It Works — structured layout */
body.pp-terminal #howItWorksModal .hiw-modal {
  position: relative;
  max-width: 32rem;
  padding: 0;
}

body.pp-terminal #howItWorksModal .hiw-scroll {
  padding: 1.25rem 1.5rem 1.5rem;
  max-height: min(78vh, 640px);
  overflow-y: auto;
}

body.pp-terminal #howItWorksModal .hiw-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fafafa;
  letter-spacing: 0.02em;
}

body.pp-terminal #howItWorksModal .hiw-lead {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #a8a8b8;
}

body.pp-terminal #howItWorksModal .hiw-callout {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(0, 255, 157, 0.28);
  background: rgba(0, 255, 157, 0.06);
}

body.pp-terminal #howItWorksModal .hiw-callout__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #00ff9d;
}

body.pp-terminal #howItWorksModal .hiw-callout__text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #d4d4e0;
}

body.pp-terminal #howItWorksModal .hiw-callout__text a,
body.pp-terminal #howItWorksModal .hiw-footer a {
  color: #00ff9d;
  text-decoration: none;
  font-weight: 500;
}

body.pp-terminal #howItWorksModal .hiw-callout__text a:hover,
body.pp-terminal #howItWorksModal .hiw-footer a:hover {
  text-decoration: underline;
}

body.pp-terminal #howItWorksModal .hiw-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #2a2a36;
}

body.pp-terminal #howItWorksModal .hiw-section__title {
  margin: 0 0 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9898a8;
}

body.pp-terminal #howItWorksModal .hiw-steps {
  margin: 0;
  padding-left: 1.15rem;
  list-style: decimal;
}

body.pp-terminal #howItWorksModal .hiw-steps li {
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #c4c4d0;
}

body.pp-terminal #howItWorksModal .hiw-steps li:last-child {
  margin-bottom: 0;
}

body.pp-terminal #howItWorksModal .hiw-facts {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.pp-terminal #howItWorksModal .hiw-facts li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #c4c4d0;
}

body.pp-terminal #howItWorksModal .hiw-facts__pct {
  flex-shrink: 0;
  min-width: 2.25rem;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: #00ff9d;
}

body.pp-terminal #howItWorksModal .hiw-body {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #c4c4d0;
}

body.pp-terminal #howItWorksModal .hiw-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #2a2a36;
}

body.pp-terminal #howItWorksModal .hiw-footer p {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  color: #9898a8;
}

body.pp-terminal #howItWorksModal .hiw-footer__links a {
  color: #00ff9d;
  text-decoration: none;
  font-weight: 500;
}

body.pp-terminal #howItWorksModal .hiw-footer__links a:hover {
  text-decoration: underline;
}

body.pp-terminal #howItWorksModal .hiw-modal > .close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  z-index: 2;
  font-size: 1.5rem;
  line-height: 1;
}

body.pp-terminal #howItWorksModal .modal-content::-webkit-scrollbar-track,
body.pp-terminal #viewAllModal .modal-content::-webkit-scrollbar-track {
  background: #0a0a0c;
}

body.pp-terminal #howItWorksModal .modal-content::-webkit-scrollbar-thumb,
body.pp-terminal #viewAllModal .modal-content::-webkit-scrollbar-thumb {
  background: #2a2a36;
  border-radius: 4px;
}

body.pp-terminal #howItWorksModal .modal-content::-webkit-scrollbar-thumb:hover,
body.pp-terminal #viewAllModal .modal-content::-webkit-scrollbar-thumb:hover {
  background: #00ff9d;
}

body.pp-terminal #setNicknameModal .modal-content input[type="text"] {
  background: #0a0a0c;
  border: 1px solid #2a2a36;
  color: #f4f4f5;
  border-radius: 0.5rem;
}

body.pp-terminal #setNicknameModal .modal-content input[type="text"]:focus {
  border-color: rgba(0, 255, 157, 0.45);
  outline: none;
  box-shadow: 0 0 0 1px rgba(0, 255, 157, 0.35);
}

body.pp-terminal #howItWorksModal .close,
body.pp-terminal #viewAllModal .close,
body.pp-terminal #setNicknameModal .close {
  color: #9898a8;
}

body.pp-terminal #howItWorksModal .close:hover,
body.pp-terminal #viewAllModal .close:hover,
body.pp-terminal #setNicknameModal .close:hover {
  color: #fafafa;
}

body.pp-terminal #howItWorksModal button,
body.pp-terminal #setNicknameModal button,
body.pp-terminal #viewAllModal button {
  background: #00ff9d;
  color: #0a0a0c;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

body.pp-terminal #howItWorksModal button:hover,
body.pp-terminal #setNicknameModal button:hover {
  filter: brightness(1.08);
}

/* View All modal table */
body.pp-terminal #viewAllModal #viewAllTable th {
  background: #1a1a24 !important;
  color: #9898a8 !important;
}

body.pp-terminal #viewAllModal #viewAllTable tr,
body.pp-terminal #viewAllModal #viewAllTable td {
  background: #14141c !important;
  color: #e4e4e7 !important;
  border-bottom: 1px solid #2a2a36;
}

/* Modal backdrop */
body.pp-terminal .modal:not(#winnerModal) {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}
