/* ============================================================
   Podstrm - discovery page styles
   ============================================================ */

.discovery-page {
  padding: 64px 0 76px;
}

.discover-intro {
  margin-bottom: 58px;
}

.discover-intro h1 {
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.discover-intro p,
.discover-section-head p {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
}

.discover-hero-panel {
  min-height: 332px;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.62) 38%, rgba(0, 0, 0, 0.12) 100%),
    url("/assets/discovery/hero-bg.png") center / cover;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 48px 54px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.discover-hero-panel:hover,
.discover-hero-panel:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.hero-feature-copy {
  max-width: 460px;
  color: #fff;
}

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.live-pill,
.live-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  background: #ff1d1d;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.live-pill {
  padding: 7px 9px;
}

.live-pill::before,
.live-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  margin-right: 4px;
}

.hero-feature-copy h2 {
  margin-top: 22px;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-feature-copy p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 18px;
  font-weight: 600;
  margin-top: 8px;
}

.discover-hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
}

.btn-listen {
  font-size: 18px;
  border-radius: 14px;
  padding: 12px 24px;
}

.details-link {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
}

.discover-controls {
  display: grid;
  grid-template-columns: 1fr 170px 170px;
  gap: 16px;
  margin-top: 58px;
}

.search-field,
.discover-controls select {
  height: 48px;
  border: 1px solid #35425c;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
}

[data-theme="light"] .search-field,
[data-theme="light"] .discover-controls select {
  border-color: #b7bbc4;
  background: #fff;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
}

.search-field svg {
  color: var(--text-soft);
  flex: 0 0 auto;
}

.search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.search-field input::placeholder {
  color: var(--text-muted);
}

.discover-controls select {
  appearance: auto;
  padding: 0 16px;
}

.discover-section {
  margin-top: 52px;
}

.discover-section-head {
  margin-bottom: 22px;
}

.discover-section-head h2 {
  font-size: 29px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.track-card {
  display: block;
  border-radius: 12px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.track-card:hover,
.track-card:focus-visible {
  transform: translateY(-3px);
  opacity: 0.92;
}

.track-card h3 {
  font-size: 14px;
  line-height: 1.2;
  margin-top: 12px;
  font-weight: 800;
}

.track-card p {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
  font-weight: 600;
}

.cover-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
}

.cover-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 7px;
}

.trend-badge,
.price-badge {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  height: 20px;
  border-radius: 10px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 800;
}

.trend-badge {
  left: 12px;
  color: #134200;
  background: var(--green);
}

.trend-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #134200;
  margin-right: 4px;
}

.price-badge {
  left: 92px;
  color: #fff;
  background: #9256e8;
}

.discover-creators-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 30px;
}

.discover-creator-card {
  min-height: 186px;
  border: 1px solid #2f3a53;
  border-radius: 8px;
  background: rgba(13, 18, 30, 0.62);
  text-align: center;
  padding: 20px 18px 18px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.discover-creator-card:hover,
.discover-creator-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--cyan);
}

[data-theme="light"] .discover-creator-card {
  background: #fff;
  border-color: transparent;
}

.creator-profile-link {
  display: block;
}

.creator-profile-link img {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 3px solid #08d5c5;
  object-fit: cover;
}

.creator-profile-link h3 {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 800;
}

.creator-profile-link p {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.2;
}

.discover-creator-card .btn-follow {
  width: 86px;
  margin-top: 16px;
  padding: 8px 14px;
  color: #fff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.discover-cta {
  margin-top: 72px;
  border-radius: 14px;
  padding: 34px 58px;
  background: linear-gradient(120deg, #6d16ee 0%, #1f4fff 55%, #22b8ee 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.discover-cta-kicker {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.discover-cta-kicker::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 14px;
  margin-right: 12px;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
  vertical-align: -2px;
}

.discover-cta h2 {
  font-size: 27px;
  line-height: 1.1;
  margin-top: 22px;
}

.discover-cta p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  margin-top: 12px;
}

.discover-cta-actions {
  display: flex;
  gap: 12px;
  flex: 0 0 auto;
}

.discover-cta .btn {
  border-radius: 14px;
  white-space: nowrap;
}

.discovery-page.profile-mode {
  min-height: calc(100vh - 72px);
  background: #080b12;
  padding: 0 0 32px;
}

.discovery-page.profile-mode > section:not(.creator-profile-page) {
  display: none;
}

.creator-profile-page {
  display: none;
  background: #080b12;
}

.discovery-page.profile-mode .creator-profile-page {
  display: block;
  min-height: inherit;
}

.profile-shell {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.profile-hero {
  position: relative;
  min-height: 548px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(7, 10, 17, 0.04) 0%, #080b12 92%),
    linear-gradient(90deg, rgba(8, 11, 18, 0.22) 0%, rgba(8, 11, 18, 0.38) 44%, rgba(8, 11, 18, 0.12) 100%),
    url("assets/discovery/hero-bg.png") center top / cover;
}

.profile-hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 36% 12%, rgba(31, 79, 255, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(8, 11, 18, 0.02) 0%, rgba(8, 11, 18, 0.72) 64%, #080b12 100%);
  pointer-events: none;
}

.profile-hero .profile-shell {
  position: relative;
  min-height: 548px;
  padding-top: 256px;
}

.profile-heading {
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.profile-avatar {
  width: 166px;
  height: 166px;
  border-radius: 8px;
  object-fit: cover;
  background: #151a27;
}

.profile-copy {
  padding-bottom: 7px;
}

.profile-kicker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 24px;
}

.profile-kicker {
  color: #9ca4b3;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.profile-live-pill {
  padding: 6px 8px;
}

.profile-copy h1 {
  color: #fff;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-top: 7px;
}

.profile-meta,
.profile-bio {
  color: #9ca4b3;
  font-size: 16px;
  line-height: 1.5;
}

.profile-actions {
  position: absolute;
  right: var(--page-gutter);
  top: 362px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-follow,
.profile-primary-action {
  min-height: 49px;
  border-radius: 10px;
  background: #1f4fff;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.profile-follow {
  padding: 12px 16px;
}

.profile-follow.is-following {
  background: #5bef00;
  color: #061500;
}

.profile-icon-btn {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border: 1px solid #46526c;
  border-radius: 50%;
  background: rgba(8, 11, 18, 0.26);
  color: #fff;
  cursor: pointer;
}

.profile-bio {
  max-width: 720px;
  margin-top: 28px;
}

.profile-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 51px;
  padding: 8px;
  margin-top: 18px;
  border-radius: 24px;
  background: #151c2a;
}

.profile-tab {
  height: 35px;
  border: 0;
  border-radius: 18px;
  padding: 0 16px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.profile-tab.is-active {
  background: #090d17;
}

.profile-content-shell {
  margin-top: 36px;
  padding-bottom: 8px;
}

.profile-panel {
  display: none;
}

.profile-panel.is-active {
  display: block;
}

.profile-audio-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 22px;
}

.profile-audio-card {
  display: block;
  min-width: 0;
  color: #fff;
}

.profile-audio-card:hover .profile-audio-cover,
.profile-audio-card:focus-visible .profile-audio-cover {
  transform: translateY(-3px);
}

.profile-audio-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: #151a27;
  transition: transform 0.18s ease;
}

.profile-audio-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-audio-badge {
  position: absolute;
  top: 18px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 7px;
  padding: 0 8px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.profile-audio-badge.is-price {
  background: #9256e8;
}

.profile-audio-badge.is-live {
  gap: 4px;
  background: #ff101b;
  text-transform: uppercase;
}

.profile-audio-badge.is-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.profile-audio-card strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  line-height: 1.18;
  margin-top: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-audio-card > span:not(.profile-audio-cover) {
  display: block;
  overflow: hidden;
  color: #9ca4b3;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 3px;
}

.profile-content-card {
  min-height: 151px;
  border: 1px solid #405070;
  border-radius: 12px;
  background: rgba(12, 16, 27, 0.76);
  padding: 34px 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.profile-item-main {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.profile-item-main img {
  width: 81px;
  height: 81px;
  border-radius: 8px;
  object-fit: cover;
  background: #151a27;
  flex: 0 0 auto;
}

.profile-item-main h2 {
  color: #fff;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.profile-item-main p {
  color: #9ca4b3;
  font-size: 16px;
  line-height: 1.45;
  margin-top: 4px;
}

.profile-primary-action {
  min-width: 203px;
  padding: 12px 22px;
  white-space: nowrap;
}

.profile-event-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 0 0 auto;
}

.profile-copy-link {
  min-height: 49px;
  min-width: 164px;
  border: 1px solid #46526c;
  border-radius: 16px;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.event-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.event-price {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 8px;
  border-radius: 6px;
  background: #9256e8;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.profile-event-card.is-registered .profile-primary-action {
  min-width: 176px;
  background: #5bef00;
  color: #061500;
}

.profile-toast {
  position: fixed;
  z-index: 60;
  top: 92px;
  right: max(48px, calc((100vw - 1266px) / 2 + 48px));
  display: flex;
  align-items: center;
  gap: 14px;
  width: 368px;
  min-height: 60px;
  border: 1px solid #18d977;
  border-radius: 10px;
  background: #e9fff0;
  color: #008037;
  padding: 16px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.profile-toast[hidden] {
  display: none;
}

.toast-check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #008d3c;
  color: #fff;
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  .track-grid,
  .discover-creators-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .profile-audio-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .discover-controls {
    grid-template-columns: 1fr 1fr;
  }

  .search-field {
    grid-column: 1 / -1;
  }

  .profile-shell {
    padding: 0 var(--page-gutter);
  }

  .profile-actions {
    right: var(--page-gutter);
  }

  .profile-content-card,
  .profile-event-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-event-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .track-grid,
  .discover-creators-grid {
    grid-template-columns: 1fr;
  }

  .discovery-page {
    padding-top: 40px;
  }

  .discover-intro {
    margin-bottom: 32px;
  }

  .discover-hero-panel {
    min-height: 300px;
    padding: 32px 24px;
    border-radius: 14px;
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.68) 58%, rgba(0, 0, 0, 0.2) 100%),
      url("assets/discovery/hero-bg.png") center / cover;
  }

  .hero-feature-copy h2 {
    font-size: 28px;
  }

  .hero-feature-copy p,
  .details-link,
  .btn-listen {
    font-size: 15px;
  }

  .discover-hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .discover-controls {
    grid-template-columns: 1fr;
    margin-top: 32px;
  }

  .search-field {
    grid-column: auto;
  }

  .discover-section {
    margin-top: 42px;
  }

  .discover-section-head h2 {
    font-size: 25px;
  }

  .track-grid {
    gap: 26px;
  }

  .cover-wrap {
    aspect-ratio: 16 / 11;
  }

  .discover-cta {
    margin-top: 52px;
    padding: 28px 22px;
    align-items: flex-start;
    flex-direction: column;
  }

  .discover-cta-actions {
    flex-wrap: wrap;
  }

  .profile-hero,
  .profile-hero .profile-shell {
    min-height: 640px;
  }

  .profile-hero .profile-shell {
    padding-top: 210px;
  }

  .profile-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .profile-avatar {
    width: 138px;
    height: 138px;
  }

  .profile-actions {
    position: static;
    margin-top: 22px;
  }

  .profile-tabs {
    width: 100%;
    height: auto;
    align-items: stretch;
    flex-wrap: wrap;
  }

  .profile-tab {
    flex: 1 1 auto;
  }

  .profile-content-shell {
    margin-top: 34px;
  }

  .profile-audio-grid {
    grid-template-columns: 1fr 1fr;
    gap: 22px 16px;
  }

  .profile-audio-card strong {
    font-size: 14px;
    white-space: normal;
  }

  .profile-content-card {
    padding: 22px;
  }

  .profile-item-main {
    align-items: flex-start;
    gap: 16px;
  }

  .profile-item-main h2 {
    font-size: 20px;
  }

  .profile-item-main p,
  .profile-meta,
  .profile-bio {
    font-size: 14px;
  }

  .profile-event-actions,
  .profile-primary-action,
  .profile-copy-link {
    width: 100%;
  }

  .profile-toast {
    top: 84px;
    left: 18px;
    right: 18px;
    width: auto;
  }
}
