/* =============================================
   Player Countdown Widget
   Estilo integrado con webapuestas.com
   ============================================= */

.pc-widget {
  --pc-blue: #049EC5;
  --pc-blue-dark: #037fa0;
  --pc-blue-deep: #02607a;
  --pc-blue-light: #3fc0e0;
  --pc-green: #3FBF53;
  --pc-black: #131313;
  --pc-gray-dark: #7B7B7B;
  --pc-gray-medium: #BBBBBB;
  --pc-gray-light: #E9E9E9;
  --pc-white: #ffffff;
  --pc-radius: 8px;

  font-family: 'Poppins', 'Inter', sans-serif;
  width: 100%;
  margin: 1.5rem 0;
  border-radius: var(--pc-radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

/* === States === */
.pc-state {
  text-align: center !important;
}

/* =============================================
   ESTADO PRE — Countdown
   ============================================= */
.pc-state--pre {
  background: linear-gradient(135deg, #021b26 0%, #03384d 30%, #0a1a20 70%, #131313 100%);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}

.pc-state--pre::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(4, 158, 197, 0.1) 0%, transparent 65%);
  pointer-events: none;
}

.pc-state--pre::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(63, 192, 224, 0.06) 0%, transparent 65%);
  pointer-events: none;
}

.pc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(4, 158, 197, 0.25);
  border-radius: 20px;
  padding: 6px 18px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

.pc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.pc-dot--amber {
  background: var(--pc-blue);
  box-shadow: 0 0 8px var(--pc-blue);
  animation: pc-pulse-blue 2s ease-in-out infinite;
}

@keyframes pc-pulse-blue {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px #049EC5; }
  50% { opacity: 0.5; box-shadow: 0 0 16px #3fc0e0; }
}

.pc-dot--red {
  background: #e74c3c;
  animation: pc-pulse-red 1s ease-in-out infinite;
}

@keyframes pc-pulse-red {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px #e74c3c; }
  50% { opacity: 0.3; box-shadow: 0 0 12px #e74c3c; }
}

.pc-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--pc-white);
  margin: 0.25rem 0;
  line-height: 1.2;
  text-align: center !important;
}

.pc-description {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin: 0 auto 0.25rem;
  font-weight: 400;
  text-align: center !important;
}

/* Countdown numbers */
.pc-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 2rem 0 1.5rem;
}

.pc-countdown__block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pc-countdown__number {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  min-width: 100px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, var(--pc-blue-light) 0%, var(--pc-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(4, 158, 197, 0.3));
}

.pc-countdown__label {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.12em;
  margin-top: 6px;
}

.pc-countdown__sep {
  font-size: 2.8rem;
  font-weight: 200;
  color: rgba(4, 158, 197, 0.3);
  line-height: 1;
  padding-bottom: 22px;
}

/* Days mode: all same size, slightly smaller to fit 4 blocks */
.pc-countdown--days .pc-countdown__number {
  font-size: 3rem !important;
  min-width: 70px !important;
}

.pc-countdown--days .pc-countdown__sep {
  font-size: 2.2rem !important;
}

/* Steps */
.pc-steps {
  display: flex;
  gap: 0;
  margin: 1.5rem auto;
  max-width: 520px;
}

.pc-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border: 1px solid rgba(4, 158, 197, 0.15);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
}

.pc-step:first-child { border-radius: 8px 0 0 8px; }
.pc-step:last-child { border-radius: 0 8px 8px 0; }
.pc-step:not(:first-child) { border-left: none; }

.pc-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(4, 158, 197, 0.12);
  border: 1px solid rgba(4, 158, 197, 0.4);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--pc-blue-light);
}

.pc-step__text {
  text-align: center;
  line-height: 1.3;
}

/* CTA Button */
.pc-cta {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 1.25rem auto 0;
  padding: 18px 24px;
  background: var(--pc-green);
  border: none;
  border-radius: var(--pc-radius);
  color: var(--pc-white);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(63, 191, 83, 0.3);
  position: relative;
  overflow: hidden;
}

.pc-cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transition: left 0.5s ease;
}

.pc-cta:hover {
  background: #000;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  color: var(--pc-white);
  text-decoration: none;
}

.pc-cta:hover::after {
  left: 100%;
}

/* Legal */
.pc-legal {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  margin: 1.25rem 0 0;
}

/* Override body .node__content p { text-align: justify !important } */
body .node__content .pc-widget p,
body .node__content .pc-widget .pc-title,
body .node__content .pc-widget .pc-description,
body .node__content .pc-widget .pc-legal,
body .node__content .pc-widget .pc-screen__text,
body .node__content .pc-widget .pc-step__text {
  text-align: center !important;
}

/* =============================================
   ESTADO LIVE — En directo
   Mismo fondo azul oscuro que PRE
   ============================================= */
.pc-state--live {
  background: linear-gradient(135deg, #021b26 0%, #03384d 30%, #0a1a20 70%, #131313 100%);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}

.pc-state--live::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(4, 158, 197, 0.1) 0%, transparent 65%);
  pointer-events: none;
}

.pc-badge--live {
  color: #e74c3c;
  border-color: rgba(231, 76, 60, 0.3);
  background: rgba(231, 76, 60, 0.1);
}

/* Screen / TV frame */
.pc-screen {
  margin: 1.5rem auto;
  max-width: 440px;
  position: relative;
}

.pc-screen__frame {
  position: relative;
}

.pc-screen__inner {
  background: #000;
  border: 3px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
  box-shadow:
    0 0 0 1px rgba(4, 158, 197, 0.1),
    0 8px 40px rgba(0, 0, 0, 0.5),
    inset 0 0 60px rgba(4, 158, 197, 0.03);
}

.pc-screen__scanline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  pointer-events: none;
  z-index: 2;
}

.pc-screen__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
  z-index: 1;
  background: radial-gradient(ellipse at center, #0d2833 0%, #000 80%);
}

.pc-screen__text {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  margin: 0;
  letter-spacing: 0.03em;
}

.pc-screen__base {
  width: 30%;
  height: 6px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.04) 100%);
  border-radius: 0 0 4px 4px;
}

/* Play button inside screen */
.pc-player__play {
  cursor: pointer;
  transition: transform 0.3s ease;
  position: relative;
  margin-bottom: 0.75rem;
}

.pc-player__play::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(4, 158, 197, 0.08);
  animation: pc-play-ring 2s ease-in-out infinite;
}

@keyframes pc-play-ring {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

.pc-player__play:hover {
  transform: scale(1.12);
}

.pc-player__play svg circle {
  stroke: var(--pc-blue);
  stroke-width: 2;
  transition: stroke 0.3s ease;
}

.pc-player__play svg polygon {
  fill: var(--pc-white);
  transition: fill 0.3s ease;
}

.pc-player__play:hover svg circle {
  stroke: var(--pc-blue-light);
}

.pc-player__play:hover svg polygon {
  fill: var(--pc-blue-light);
}

/* Steps inline (live) */
.pc-steps--inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.pc-step--mini {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}

.pc-step--mini .pc-step__num {
  width: 20px;
  height: 20px;
  font-size: 0.6rem;
}

.pc-step--sep {
  color: rgba(255,255,255,0.2);
  font-size: 1.1rem;
}

/* =============================================
   ESTADO POST — Finalizado
   Mismo fondo azul oscuro que PRE
   ============================================= */
.pc-state--post {
  background: linear-gradient(135deg, #021b26 0%, #03384d 30%, #0a1a20 70%, #131313 100%);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}

.pc-state--post::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -15%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(4, 158, 197, 0.06) 0%, transparent 65%);
  pointer-events: none;
}

.pc-badge--post {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
}

.pc-state--post .pc-title {
  color: var(--pc-white);
}

.pc-state--post .pc-description {
  color: rgba(255,255,255,0.5);
  text-align: center;
}

.pc-description--hour {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.pc-post-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--pc-blue), transparent);
  margin: 1.25rem auto;
  border-radius: 2px;
}

.pc-state--post .pc-cta {
  background: var(--pc-green);
  box-shadow: 0 4px 16px rgba(63, 191, 83, 0.3);
}

.pc-state--post .pc-cta:hover {
  background: #000;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.pc-state--post .pc-legal {
  color: rgba(255,255,255,0.3);
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 576px) {
  .pc-state--pre,
  .pc-state--live,
  .pc-state--post {
    padding: 1.5rem 1rem;
  }

  .pc-title {
    font-size: 1.25rem;
  }

  .pc-countdown__number {
    font-size: 2.8rem;
    min-width: 70px;
  }

  .pc-countdown__sep {
    font-size: 2rem;
  }

  .pc-steps {
    flex-direction: column;
    max-width: 100%;
  }

  .pc-step {
    flex-direction: row;
    border-radius: 0 !important;
    border-left: 1px solid rgba(4, 158, 197, 0.15) !important;
  }

  .pc-step:first-child { border-radius: 8px 8px 0 0 !important; }
  .pc-step:last-child { border-radius: 0 0 8px 8px !important; }
  .pc-step:not(:first-child) { border-top: none; }

  .pc-steps--inline {
    flex-direction: column;
    gap: 4px;
  }

  .pc-step--sep { display: none; }

  .pc-screen__inner {
    aspect-ratio: 16 / 10;
  }

  .pc-cta {
    max-width: 100%;
  }
}
