/**
 * Podcaster Plus Breakout Animation Styles
 */

/* Reset and Base Styles */
.ppba-player-breakout {
  position: relative;
  min-height: 300vh;
  /* background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%); */
}

.ppba-scroll-container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.ppba-scroll-container:before,
.ppba-scroll-container:after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
}

.ppba-scroll-container:before {
  /* background: radial-gradient(circle at 40% 55%, #c896ff 0%, transparent 30%); */
  background: radial-gradient(
      ellipse 70% 80% at 34% 43%,
      #c896ff 0%,
      transparent 25%
    ),
    radial-gradient(ellipse 77% 61% at 47% 56%, #c896ff 0%, transparent 35%);
}

.ppba-scroll-container:after {
  /* background: radial-gradient(circle at 65% 45%, #96c8ff 0%, transparent 25%); */
  background: radial-gradient(
      ellipse 73% 47% at 52% 44%,
      #96c8ff 0%,
      transparent 31%
    ),
    radial-gradient(ellipse 57% 71% at 65% 50%, #96c8ff 0%, transparent 25%);
}

.ppba-player-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 80vh;
  max-height: 700px;
}

/* Intro Text (fades out during animation) */
.ppba-intro-text {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: 100%;
  max-width: 600px;
  z-index: 5;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.ppba-intro-text h2 {
  margin: 0 0 0.5rem 0;
}

.ppba-intro-text p {
  margin: 0;
  font-size: 1rem;
  color: #6c757d;
  line-height: 1.5;
}

/* Unified Player (Initial State) */
.ppba-unified-player {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(700px, 90vw);
  height: auto;
  max-height: 350px;
  background: linear-gradient(345deg, #6797ef 0%, #7e22ce 100%);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
  z-index: 10;
  color: white;
  padding: 2rem;
  transition: pointer-events 0.1s;
}

.ppba-unified-player.faded {
  pointer-events: none;
}

.ppba-player-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.ppba-player-image {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ppba-player-title {
  flex: 1;
  min-width: 0;
}

.ppba-player-title h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
}

.ppba-player-title p {
  margin: 0.25rem 0 0 0;
  font-size: 0.875rem;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ppba-player-controls-top {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.ppba-player-volume,
.ppba-player-speed {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.ppba-player-volume:hover,
.ppba-player-speed:hover {
  background: rgba(255, 255, 255, 0.3);
}

.ppba-player-main {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.ppba-player-play {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  flex-shrink: 0;
  color: white;
  animation: ppba-pulse 4s ease-in-out infinite;
}

.ppba-player-play:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.4);
}

.ppba-player-play svg {
  margin-left: 3px;
}

.ppba-player-progress-container {
  flex: 1;
  min-width: 0;
}

.ppba-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}

.ppba-progress-fill {
  height: 100%;
  background: white;
  border-radius: 3px;
  transition: width 0.1s;
}

.ppba-progress-time {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.8;
}

.ppba-player-skip-controls {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

.ppba-player-skip-back,
.ppba-player-skip-forward {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  gap: 2px;
}

.ppba-player-skip-back:hover,
.ppba-player-skip-forward:hover {
  background: rgba(255, 255, 255, 0.3);
}

.ppba-player-skip-back span,
.ppba-player-skip-forward span {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Individual Blocks (Broken Out State) */
.ppba-block {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 180px;
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: box-shadow 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
}

.ppba-block:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.ppba-block-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(345deg, #6797ef 0%, #7e22ce 100%);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: white;
  transition: transform 0.3s ease;
  gap: 4px;
}

.ppba-block:hover .ppba-block-icon {
  transform: scale(1.08) rotate(2deg);
}

.ppba-block-icon-play {
  padding-left: 2px;
}

/* Mini progress bar in block */
.ppba-mini-progress {
  width: 48px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 3px;
}

.ppba-mini-progress-fill {
  width: 45%;
  height: 100%;
  background: white;
  border-radius: 2px;
}

.ppba-mini-time {
  font-size: 0.5rem;
  font-weight: 600;
  opacity: 0.9;
}

/* Mini skip controls in block */
.ppba-mini-skip-controls {
  display: flex;
  gap: 6px;
  align-items: center;
}

.ppba-mini-skip-label {
  font-size: 0.625rem;
  font-weight: 700;
  margin-top: 2px;
}

.ppba-block-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: #212529;
  opacity: 0;
}

.ppba-block-desc {
  font-size: 0.8125rem;
  margin: 0;
  color: #6c757d;
  opacity: 0;
}

/* Block Colors */
/* .ppba-block-play .ppba-block-icon {
  background: linear-gradient(345deg, #6797ef 0%, #7e22ce 100%);
}

.ppba-block-progress .ppba-block-icon {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.ppba-block-volume .ppba-block-icon {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.ppba-block-speed .ppba-block-icon {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.ppba-block-skip .ppba-block-icon {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.ppba-block-title .ppba-block-icon {
  background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.ppba-block-image .ppba-block-icon {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.ppba-block-description .ppba-block-icon {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.ppba-block-container .ppba-block-icon {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
} */

.ppba-block-icon {
  background: linear-gradient(345deg, #6797ef 0%, #7e22ce 100%);
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .ppba-player-container {
    max-width: 1000px;
  }

  .ppba-block-icon {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 768px) {
  .ppba-player-breakout {
    min-height: 500vh;
    margin-bottom: 6rem;
  }

  .ppba-player-container {
    padding: 1.5rem 1rem;
  }

  .ppba-scroll-container:before {
    /* background: radial-gradient(circle at 40% 55%, #c896ff 0%, transparent 30%); */
    background: radial-gradient(
        ellipse 97% 46% at 32% 42%,
        #c896ff 0%,
        transparent 28%
      ),
      radial-gradient(ellipse 74% 80% at 42% 45%, #c896ff 0%, transparent 38%);
  }

  .ppba-scroll-container:after {
    /* background: radial-gradient(circle at 65% 45%, #96c8ff 0%, transparent 25%); */
    background: radial-gradient(
        ellipse 81% 69% at 65% 33%,
        #96c8ff 0%,
        transparent 35%
      ),
      radial-gradient(ellipse 62% 82% at 68% 45%, #96c8ff 0%, transparent 25%);
  }

  .ppba-unified-player {
    width: 85vw;
    max-width: 500px;
    padding: 1.5rem;
    border-radius: 20px;
  }

  .ppba-player-header {
    margin-bottom: 1rem;
  }

  .ppba-player-image {
    width: 50px;
    height: 50px;
  }

  .ppba-player-title h3 {
    font-size: 1.1rem;
  }

  .ppba-player-title p {
    font-size: 0.8rem;
  }

  .ppba-player-play {
    width: 56px;
    height: 56px;
  }

  .ppba-player-volume,
  .ppba-player-speed {
    width: 36px;
    height: 36px;
  }

  .ppba-player-skip-back,
  .ppba-player-skip-forward {
    width: 48px;
    height: 48px;
  }

  .ppba-block-icon {
    width: 56px;
    height: 56px;
  }

  .ppba-block-icon svg {
    width: 24px;
    height: 24px;
  }

  .ppba-block-title {
    font-size: 0.9rem;
    margin: 0 0 0.1rem 0;
  }

  .ppba-block-desc {
    font-size: 0.75rem;
  }

  .ppba-intro-text h2 {
    font-size: 1.5rem;
  }

  .ppba-intro-text p {
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .ppba-player-container {
    padding: 1rem;
  }

  .ppba-unified-player {
    width: 90vw;
    padding: 1rem;
    border-radius: 16px;
  }

  .ppba-player-header {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .ppba-player-image {
    width: 44px;
    height: 44px;
  }

  .ppba-player-title h3 {
    font-size: 1rem;
  }

  .ppba-player-title p {
    font-size: 0.75rem;
  }

  .ppba-player-main {
    gap: 1rem;
  }

  .ppba-player-play {
    width: 48px;
    height: 48px;
  }

  .ppba-player-play svg {
    width: 20px;
    height: 20px;
  }

  .ppba-player-volume,
  .ppba-player-speed {
    width: 32px;
    height: 32px;
  }

  .ppba-player-volume svg,
  .ppba-player-speed svg {
    width: 16px;
    height: 16px;
  }

  .ppba-player-skip-back,
  .ppba-player-skip-forward {
    width: 44px;
    height: 44px;
    gap: 1px;
  }

  .ppba-player-skip-back svg,
  .ppba-player-skip-forward svg {
    width: 18px;
    height: 18px;
  }

  .ppba-progress-bar {
    height: 5px;
  }

  .ppba-progress-time {
    font-size: 0.7rem;
  }

  .ppba-block-icon {
    width: 48px;
    height: 48px;
  }

  .ppba-block-icon svg {
    width: 20px;
    height: 20px;
  }

  .ppba-intro-text h2 {
    font-size: 1.25rem;
  }

  .ppba-intro-text p {
    font-size: 0.8125rem;
    padding: 0 1rem;
  }
}

/* Animations */
@keyframes ppba-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .ppba-unified-icon,
  .ppba-scroll-hint,
  .ppba-player-play {
    animation: none;
  }

  .ppba-block-icon,
  .ppba-intro-text {
    transition: none;
  }

  .ppba-block:hover .ppba-block-icon {
    transform: none;
  }
}
