/* ep13-player.css: Coco's Message Broadcast UI */

/* Desktop / Default Layout: Bottom-Right placement */
#ep13BroadcastWrap {
  position: absolute;
  right: 20px;
  bottom: 20px;
  max-width: 410px;
  width: calc(100% - 40px);
  z-index: 30;
  pointer-events: auto;
  animation: ep13FadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ep13-broadcast-card {
  background: rgba(13, 27, 42, 0.88);
  border: 2px solid rgba(56, 189, 248, 0.45);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(56, 189, 248, 0.2);
  backdrop-filter: blur(12px);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ep13-broadcast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ep13-broadcast-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: -0.2px;
}

.ep13-signal-status {
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.2);
  color: #bae6fd;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  animation: ep13Pulse 1.5s infinite;
}

.ep13-message-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(12, 74, 110, 0.3);
  border: 1px solid rgba(14, 165, 233, 0.4);
  padding: 10px 14px;
  border-radius: 12px;
}

.ep13-message-icon {
  font-size: 1.5rem;
}

.ep13-message-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ep13-message-label {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}

.ep13-message-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: #38bdf8;
}

.ep13-broadcast-btn {
  min-height: 52px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.45);
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
  padding: 10px 16px;
}

.ep13-broadcast-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 6px 22px rgba(14, 165, 233, 0.6);
  transform: translateY(-2px);
}

.ep13-broadcast-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.ep13-broadcast-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.ep13-broadcast-hint {
  font-size: 0.76rem;
  color: #94a3b8;
  text-align: center;
  line-height: 1.4;
}

/* Complete Celebration Wrap */
.ep13-complete-wrap {
  margin: 16px auto;
  max-width: 500px;
  width: calc(100% - 32px);
  animation: ep13FadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ep13-complete-card {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(56, 189, 248, 0.05) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  color: #f8fafc;
}

.ep13-complete-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.2);
  border: 2px solid rgba(56, 189, 248, 0.45);
  font-size: 1.2rem;
  font-weight: 900;
  color: #38bdf8;
  margin-bottom: 12px;
}

.ep13-complete-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #e0f2fe;
}

.ep13-complete-card p {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: #94a3b8;
  line-height: 1.5;
}

.ep13-cert-btn {
  padding: 10px 22px;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.5);
  background: rgba(14, 165, 233, 0.25);
  color: #38bdf8;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ep13-cert-btn:hover {
  background: rgba(14, 165, 233, 0.4);
  color: #ffffff;
}

@media (min-width: 681px) {
  .cinema-stage:has(#ep13CompleteWrap:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 32%);
    column-gap: 14px;
    align-items: center;
  }
  .cinema-stage:has(#ep13CompleteWrap:not([hidden])) > :not(#screenContainer):not(#ep13CompleteWrap) {
    grid-column: 1 / -1;
  }
  .cinema-stage:has(#ep13CompleteWrap:not([hidden])) #screenContainer {
    grid-column: 1;
    grid-row: 3;
  }
  .cinema-stage:has(#ep13CompleteWrap:not([hidden])) #ep13CompleteWrap {
    grid-column: 2;
    grid-row: 3;
    margin: 0;
    min-width: 0;
  }
  .cinema-stage:has(#ep13CompleteWrap:not([hidden])) .ep13-complete-card {
    padding: 18px 14px;
  }
}

/* Animations */
@keyframes ep13FadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ep13Pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.75; transform: scale(1.02); }
}

/* Mobile Layout: Outside #screenContainer, immediately below 16:9 screen */
@media (max-width: 680px) {
  #ep13BroadcastWrap {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    max-width: 100%;
    margin: 12px 0;
    box-sizing: border-box;
  }

  .ep13-broadcast-card {
    border-radius: 14px;
    padding: 14px 16px;
  }

  .ep13-broadcast-btn {
    min-height: 48px;
    font-size: 0.96rem;
  }
}
