/* ep11-player.css: Berry's Sound Music Box UI */

/* Desktop / Default Layout: Bottom-Right placement */
#ep11SoundWrap {
  position: absolute;
  right: 20px;
  bottom: 20px;
  max-width: 420px;
  width: calc(100% - 40px);
  z-index: 30;
  pointer-events: auto;
  animation: ep11FadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ep11-sound-card {
  background: rgba(15, 23, 42, 0.88);
  border: 2px solid rgba(244, 63, 94, 0.45);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(244, 63, 94, 0.2);
  backdrop-filter: blur(12px);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ep11-sound-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ep11-sound-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fb7185;
  letter-spacing: -0.2px;
}

.ep11-note-pill {
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(244, 63, 94, 0.2);
  color: #fecdd3;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.ep11-keys-row {
  display: flex;
  gap: 8px;
}

.ep11-key-btn {
  flex: 1;
  min-height: 72px;
  border: 1.5px solid rgba(251, 113, 133, 0.4);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.7);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  gap: 3px;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ep11-key-btn:active {
  transform: scale(0.95);
}

.ep11-key-btn.active {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.35) 0%, rgba(225, 29, 72, 0.45) 100%);
  border-color: #fb7185;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.5);
}

.ep11-key-icon {
  font-size: 1.5rem;
}

.ep11-key-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #f8fafc;
}

.ep11-key-sound {
  font-size: 0.7rem;
  font-weight: 600;
  color: #fb7185;
}

.ep11-sound-hint {
  font-size: 0.78rem;
  text-align: center;
  color: #cbd5e1;
  min-height: 1.2em;
}

/* Complete Card (Placed below the screen container) */
.ep11-complete-wrap {
  width: 100%;
  max-width: 720px;
  margin: 16px auto;
  padding: 0 16px;
  animation: ep11FadeUp 0.4s ease;
}

.ep11-complete-card {
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(244, 63, 94, 0.4);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.ep11-complete-icon {
  font-size: 2.8rem;
  margin-bottom: 8px;
}

.ep11-complete-card h3 {
  color: #fb7185;
  font-size: 1.25rem;
  margin-bottom: 8px;
  font-weight: 800;
}

.ep11-complete-card p {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 18px;
}

.ep11-cert-btn {
  min-height: 48px;
  padding: 10px 24px;
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.4);
}

@media (min-width: 681px) {
  .cinema-stage:has(#ep11CompleteWrap:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 32%);
    column-gap: 14px;
    align-items: center;
  }
  .cinema-stage:has(#ep11CompleteWrap:not([hidden])) > :not(#screenContainer):not(#ep11CompleteWrap) {
    grid-column: 1 / -1;
  }
  .cinema-stage:has(#ep11CompleteWrap:not([hidden])) #screenContainer {
    grid-column: 1;
    grid-row: 3;
  }
  .cinema-stage:has(#ep11CompleteWrap:not([hidden])) #ep11CompleteWrap {
    grid-column: 2;
    grid-row: 3;
    margin: 0;
    padding: 0;
    min-width: 0;
  }
  .cinema-stage:has(#ep11CompleteWrap:not([hidden])) .ep11-complete-card {
    padding: 18px 14px;
  }
}

/* Mobile Responsive Mode: Move outside image to prevent ANY occlusion */
@media (max-width: 680px) {
  #ep11SoundWrap {
    position: static;
    max-width: 100%;
    width: 100%;
    margin: 12px auto 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
  }
}

@keyframes ep11FadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
