/* =============================================================================
   HamPass Live - Refined + Vibrant (competition feel)
   Usa variáveis do style.css quando disponíveis
   ============================================================================= */

:root{
  /* base (HamPass) */
  --hp-bg: var(--colorOne, #13111F);
  --hp-surface: var(--colorTwo, #1F1D2B);
  --hp-surface-2: rgba(255,255,255,0.035);
  --hp-surface-3: rgba(255,255,255,0.02);

  --hp-text: var(--textColor, #ffffff);
  --hp-muted: var(--colorLinks, #B8B6C1);
  --hp-title: var(--tableTitle, #d5d2e1);

  /* acentos (HamPass + complementares) */
  --hp-accent: var(--colorDetail, #7462D0);        /* roxo HamPass */
  --hp-accent-2: #38D6FF;                          /* ciano vivo (energia) */
  --hp-accent-3: #5CFFB1;                          /* verde “score” */

  /* bordas e luz */
  --hp-border: rgba(255,255,255,0.08);
  --hp-border-soft: rgba(255,255,255,0.06);

  /* glow (bem sutil, nada grosseiro) */
  --hp-glow: 0 10px 30px rgba(0,0,0,0.28);
  --hp-glow-soft: 0 8px 22px rgba(0,0,0,0.18);

  /* radius */
  --hp-r: 12px;
  --hp-r-pill: 999px;

  /* timing */
  --hp-t: 180ms;

}


.fs-05 {
  font-size: 0.5rem;
}

/* Não force body aqui: o HamPass já define. Se quiser isolar, use wrapper. */

.favicon { 
    float: left;
    margin: 5px 5px 0 0;
}


/* ===========================
   WebSocket connection status
   =========================== */
.status-dot{
  display:inline-block;
  width:10px;
  height:10px;
  border-radius:50%;
  margin-left:6px;
  background:#777;
  transition: background-color var(--hp-t) ease, box-shadow var(--hp-t) ease;
}

.status-dot.online{
  background: #2ef29a;
  box-shadow:
    0 0 0 2px rgba(0,0,0,0.18),
    0 0 10px rgba(46,242,154,0.30);
}

.status-dot.offline{
  background:#ff4a6a;
  box-shadow:
    0 0 0 2px rgba(0,0,0,0.18),
    0 0 10px rgba(255,74,106,0.28);
}


/* ===========================
   Activator status bar
   =========================== */
.activator-bar{
  position:relative;
  border: 1px solid var(--hp-border-soft);
  border-radius: var(--hp-r);
  padding: 10px 12px;

  /* glass + gradient refinado */
  background:
    radial-gradient(1200px 220px at 0% 0%, rgba(116,98,208,0.18) 0%, rgba(0,0,0,0) 55%),
    radial-gradient(900px 200px at 100% 0%, rgba(56,214,255,0.10) 0%, rgba(0,0,0,0) 55%),
    rgba(255,255,255,0.03);

  box-shadow: var(--hp-glow-soft);
  overflow:hidden;
}

/* micro “linha” de energia no topo (bem discreta) */
.activator-bar:before{
  content:"";
  position:absolute;
  top:0; left:0; right:0;
  height:2px;
  background: linear-gradient(90deg, rgba(116,98,208,0.0), rgba(116,98,208,0.75), rgba(56,214,255,0.55), rgba(92,255,177,0.45), rgba(116,98,208,0.0));
  opacity:0.85;
}

.window-bar-head {
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.window-bar-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--hp-title);
}

/* filtros */
.activator-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  gap: 5px;
}

.activator-filters .act-filter {
  display: block;
  font-size:0.78rem;
  font-weight: 700;
  letter-spacing: 0.35px;
  color: var(--hp-muted);
  text-decoration:none;
  text-align: center;
  padding: 5px 10px;
  border-radius: var(--hp-r-pill);
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  transition: transform var(--hp-t) ease, background-color var(--hp-t) ease, border-color var(--hp-t) ease, color var(--hp-t) ease;
}

.activator-filters .act-filter:hover{
  transform: translateY(-1px);
  color: var(--hp-text);
  border-color: rgba(56,214,255,0.28);
  background: rgba(56,214,255,0.06);
}

.activator-filters .act-filter.active{
  color: var(--hp-text);
  border-color: rgba(116,98,208,0.45);
  background:
    radial-gradient(260px 60px at 20% 0%, rgba(116,98,208,0.25) 0%, rgba(0,0,0,0) 70%),
    rgba(116,98,208,0.14);
  box-shadow: 0 0 0 1px rgba(116,98,208,0.12) inset;
}

.activator-item {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    border-radius: var(--hp-r-pill);
    border: 1px solid rgba(255,255,255,0.07);
    background:
    linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.02) 100%);

    box-shadow: 0 10px 22px rgba(0,0,0,0.18);
    transition: transform var(--hp-t) ease, border-color var(--hp-t) ease, background-color var(--hp-t) ease;
}

.activator-item:hover{
  transform: translateY(-1px);
  border-color: rgba(56,214,255,0.18);
}

@media (min-width: 375px) {
  .activator-item {
    width: 100%;
  }
}

.activator-top {
  display:block;
  text-align:center;
}

.activator-top .activator-call {
  font-weight: 900;
  text-align: center;
  color: var(--hp-text);
  letter-spacing: 0.45px;
  white-space: nowrap;
}

.activator-bottom {
  display:block;
  text-align: center;
  font-size:0.78rem;
  font-weight:700;
  color: var(--hp-title);
  opacity:0.95;
  white-space: nowrap;
}

/* bolinha do ativador: com “anel” sutil */
.act-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  display:inline-block;
  flex:0 0 10px;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.20);
}

/* cores mais vibrantes porém elegantes */
.act-dot.green  { background: #5CFFB1; }
.act-dot.yellow { background: #FFD86A; }
.act-dot.orange { background: #FF9F4A; }
.act-dot.red    { background: #FF4A6A; }
.act-dot.unk    { background: #9AA4AF; }

/* pulse do “verde” bem leve */
@keyframes actPulse {
  0%   { opacity: 1; }
  50%  { opacity: .55; }
  100% { opacity: 1; }
}
50%  { box-shadow: 0 0 0 2px rgba(0,0,0,0.20), 0 0 14px rgba(92,255,177,0.38); }
  100% { box-shadow: 0 0 0 2px rgba(0,0,0,0.20), 0 0 8px rgba(92,255,177,0.18); }
}
.act-dot.pulse{
  /* glow fixo (barato) + pulso por opacidade (evita animar box-shadow) */
  box-shadow: 0 0 0 2px rgba(0,0,0,0.20), 0 0 12px rgba(92,255,177,0.25);
  animation: actPulse 1.6s ease-in-out infinite;
}


/* ===========================
   QSO table
   =========================== */

/* header da tabela (mais “race / scoreboard”) */
.row-title{
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--hp-title);
}

/* container */
#qsoList, #topHunters, #activatorsRanking {
  border-radius: var(--hp-r);
  border: 1px solid rgba(255,255,255,0.07);
  overflow:hidden;

  background:
    radial-gradient(900px 260px at 0% 0%, rgba(116,98,208,0.10) 0%, rgba(0,0,0,0) 55%),
    rgba(255,255,255,0.02);

  box-shadow: var(--hp-glow);
}

/* linhas */
.qso-row {
  align-items:center;
  padding: 10px 0;

  background: rgba(255,255,255,0.018);
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;

  transition:
    background-color var(--hp-t) ease,
    border-color var(--hp-t) ease,
    opacity 0.5s ease,
    transform 0.5s ease;
}

.badge-band,
.badge-day,
.badge-mode {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.35px;
    color: var(--hp-muted);
    text-decoration: none;
    padding: 4px 7px;
    border-radius: var(--hp-r-pill);
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    transition: transform var(--hp-t) ease, background-color var(--hp-t) ease, border-color var(--hp-t) ease, color var(--hp-t) ease;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;    
}

.badge-mode {
  display: inline-block;
  width: 60px;
  font-size: 0.7rem;
  padding: 1.9px 1.6px;
  text-align: center;
  margin-top: -0.3rem;
}

/* zebra bem sutil */
#qsoList .qso-row:nth-child(even), 
#topHunters .qso-row:nth-child(even),
#activatorsRanking .qso-row:nth-child(even) {
  background: rgba(255,255,255,0.012);
}

/* hover (mais “competitivo”, mas limpo) */
#qsoList .qso-row:hover, 
#topHunters .qso-row:hover,
#activatorsRanking .qso-row:hover {
  background: rgba(56,214,255,0.06);
  border-bottom-color: rgba(56,214,255,0.18) !important;
}

/* links */
.qso-row a {
  color: var(--hp-muted);
  text-decoration:none;
  transition: color var(--hp-t) ease, opacity var(--hp-t) ease;
}
.qso-row a:hover {
  color: var(--hp-text);
  opacity: 0.98;
}

/* texto secundário */
.qso-row .text-secondary {
  color: rgba(213,210,225,0.72) !important;
}

/* callsign com “energia” sutil */
.qso-row strong,
.qso-row strong a {
  color: var(--hp-text);
  font-weight: 900;
  letter-spacing: 0.45px;
}

/* destaque do novo QSO: glow roxo/ciano leve (refinado) */
.qso-row.qso-new {
  background:
    radial-gradient(420px 120px at 15% 50%, rgba(116,98,208,0.22) 0%, rgba(0,0,0,0) 65%),
    radial-gradient(420px 120px at 85% 50%, rgba(56,214,255,0.12) 0%, rgba(0,0,0,0) 65%),
    rgba(255,255,255,0.02) !important;

  box-shadow:
    inset 0 0 0 1px rgba(116,98,208,0.18),
    inset 0 0 0 9999px rgba(116,98,208,0.06);

  color: var(--hp-text) !important;
}

/* removendo */
.qso-row.qso-removing {
  opacity:0;
  transform: translateY(6px);
}

/* números mais “certinhos” */
.qso-row .col-md-1.text-center,
.qso-row .col-md-2.text-center{
  font-variant-numeric: tabular-nums;
}

/* Pequeno ajuste de leitura */
.qso-row .col-md-1,
.qso-row .col-md-2{
  font-size: 0.92rem;
}

/* ===========================
   Live stats (above stations working)
   =========================== */
.live-stat-card{
  position: relative; /* da linha energetica */
  overflow: hidden; /* da linha energetica */
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--hp-r);
  /* fundo mais escuro que o body + glass */
  background:
    radial-gradient(520px 140px at 10% 0%, rgba(116,98,208,0.16) 0%, rgba(0,0,0,0) 60%),
    radial-gradient(520px 140px at 90% 0%, rgba(56,214,255,0.10) 0%, rgba(0,0,0,0) 60%),
    rgba(0,0,0,0.26); /* <-- mais escuro que o body */

  box-shadow: var(--hp-glow-soft);
}
/* linha energética sutil */
.live-stat-card:before{
  content:"";
  position:absolute;
  top:0; left:0; right:0;
  height:2px;
  background: linear-gradient(90deg, rgba(116,98,208,0.0), rgba(116,98,208,0.70), rgba(56,214,255,0.55), rgba(92,255,177,0.45), rgba(116,98,208,0.0));
  opacity:0.75;
}

.live-stat-label{
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--hp-title);
  opacity: 0.95;
}

.live-stat-value{
  margin-top: 6px;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: var(--hp-text);
  line-height: 1.1;
}

.live-stat-sub{
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--hp-muted);
  opacity: 0.9;
}

.live-stat-timer{
  font-size: 1.2rem;
  line-height: 1.75rem;
  font-variant-numeric: tabular-nums;
}

/* quando estiver no fim (últimos 5min), dá um glow leve */
.live-stat-card.is-urgent{
  border-color: rgba(255, 74, 106, 0.25);
}
.live-stat-card.is-urgent:before{
  background: linear-gradient(90deg, rgba(255,74,106,0.0), rgba(255,74,106,0.55), rgba(255,159,74,0.35), rgba(255,74,106,0.0));
}

/* ===========================
   Stats flash (when value changes)
   =========================== */
@keyframes statFlash {
  0%   { box-shadow: 0 0 0 rgba(124,252,152,0); transform: translateY(0); }
  35%  { box-shadow: 0 0 14px rgba(124,252,152,.45); transform: translateY(-1px); }
  100% { box-shadow: 0 0 0 rgba(124,252,152,0); transform: translateY(0); }
}

.live-stat-card.stat-flash {
  animation: statFlash 1.2s ease-out;
}

/* ===========================
   Event not started modal
   =========================== */

#liveWrapper.blur {
  opacity: 0.4; background: #000;
  pointer-events: none;
  user-select: none;
}

.event-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,0.65);
}

.event-modal.hidden {
  display: none !important;
}

.event-modal-box {
  text-align: center;
  padding: 30px 34px;
  border-radius: var(--hp-r);
  background:
    radial-gradient(520px 140px at 50% 0%, rgba(116,98,208,0.22) 0%, rgba(0,0,0,0) 60%),
    rgba(0,0,0,0.75);

  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--hp-glow);

  max-width: 420px;
}

.event-modal-box h3 {
  margin-bottom: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.event-modal-box p {
  color: var(--hp-muted);
  margin-bottom: 16px;
}

.event-modal-timer {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

.empty-state-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--hp-muted);
  text-align: center;
  font-style: italic;
  border: 1px dashed var(--hp-border);
  border-radius: var(--hp-r-pill);
  margin: 20px 0;
}

/* Container do Badge */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 2px 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    font-family: sans-serif;
    transition: background-color 0.3s ease;
}

/* Cores baseadas no status */
.live-badge.online { background-color: #008000; }
.live-badge.offline { background-color: #aa0000; }

.icon-live {
    width: 18px;
    height: 18px;
    margin-top: 4px;
    color: #fff;
}

/* Animação de pulso para o modo Online */
.online .icon-live {
    animation: svgPulse 2s infinite ease-in-out;
}

@keyframes svgPulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

.live-clock {
    border-left: 1px solid rgba(255,255,255,0.3);
    padding-left: 8px;
    margin-left: 4px;
    font-weight: 400;
    min-width: 65px;
}

/* Quando offline, o badge continua vermelho, mas o ícone muda */
.live-badge.offline {
    background-color: #aa0000; /* Vermelho mantido */
}

/* Ícone cinza e sem animação no modo offline */
.offline .icon-live {
    animation: none !important;
    opacity: 1 !important;
}

/* Esconder o relógio no modo offline */
.offline .live-clock {
    display: none;
}

.qso-tabs{
  display:flex;
  gap:6px;
  margin-bottom:10px;
}

.qso-tab{
  padding:6px 14px;
  font-weight:800;
  font-size:.8rem;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.03);
  color:var(--hp-muted);
  cursor:pointer;
}

.qso-tab.active{
  color:#fff;
  border-color:var(--hp-accent);
  background:rgba(116,98,208,.18);
}

.qso-tab-panel{
  display:none;
}

.qso-tab-panel.active{
  display:block;
}

/* =========================
   Top Hunters – conteúdo interno
   (herda layout da live-table)
   ========================= */

.badge-mode-phone {
  background: #1a7332;
  color: #ffffff;
}

.badge-mode-cw {
  background: #003b66;
  color: #ffffff;
}

.badge-mode-digital {
  background: #9b5a09;
  color: #ffffff;
}



/* Responsivo */
@media (max-width: 520px){
  .live-stats{ grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .hide-in-mobile { display:none !important; }
}
@media (min-width: 520px){
  .hide-in-desktop { display: none !important; }
}

/* performance (GPU)
   Evite forçar camadas de GPU em toda a lista.
   O antigo will-change/translateZ global criava milhares de layers e estourava a GPU.
*/

/* Se a lista ficar MUITO grande, isso ajuda a não renderizar o que está fora da tela
   (Chrome/Edge modernos). Mantém layout seguro com tamanho intrínseco. */
@supports (content-visibility: auto) {
  #qsoList, #activatorList {
    content-visibility: auto;
    contain-intrinsic-size: 900px;
  }
}

/* Promova somente onde realmente existe animação (poucos elementos) */
/* (mantido sem will-change por padrão para não criar layers desnecessários) */
