:root {
  --apple-glass: rgba(9, 10, 30, 0.66);
  --apple-line: rgba(255, 255, 255, 0.11);
  --apple-spring: cubic-bezier(0.2, 0.8, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", sans-serif !important;
}

.header {
  height: 86px !important;
  padding: 10px clamp(10px, 2vw, 24px);
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.header-inner {
  position: relative;
  width: min(1400px, 100%) !important;
  max-width: 1400px !important;
  height: 66px !important;
  padding: 7px 8px 7px 14px !important;
  border: 1px solid var(--apple-line);
  border-radius: 20px;
  background: var(--apple-glass);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(28px) saturate(165%);
  -webkit-backdrop-filter: blur(28px) saturate(165%);
}

.header-inner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.header-inner .brand {
  gap: 10px;
  font-size: 20px;
  letter-spacing: -0.55px;
}

.header-inner .brand-r {
  width: 43px !important;
  height: 41px !important;
}

.header-inner nav {
  min-width: 0;
  height: 52px;
  padding: 4px;
  gap: 3px !important;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.header-inner nav a {
  min-height: 42px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #aaa9b3;
  font-size: 14px;
  font-weight: 550;
  letter-spacing: -0.12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s var(--apple-spring);
}

.header-inner nav a::after {
  display: none !important;
}

.header-inner nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.065);
}

.header-inner nav a.active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.105);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 5px 16px rgba(0, 0, 0, 0.16);
}

.header-inner .login {
  width: auto !important;
  min-width: 136px;
  height: 42px;
  margin-left: 3px;
  border-radius: 13px;
  background:
    linear-gradient(rgba(9, 10, 31, 0.95), rgba(9, 10, 31, 0.95)) padding-box,
    linear-gradient(110deg, #259dff, #7954ff 52%, #f242a1) border-box;
  box-shadow: 0 8px 24px rgba(75, 51, 220, 0.13);
}

.platform-menu {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.page-links {
  width: max-content;
  max-width: 100%;
  min-height: 34px;
  margin-bottom: 28px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(16px);
}

.search input,
.filter,
.tab,
.stat,
.empty {
  border-color: rgba(255, 255, 255, 0.105) !important;
  background-color: rgba(11, 12, 38, 0.64) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(16px);
}

.search input {
  border-radius: 16px !important;
}

.filter,
.tab {
  border-radius: 13px !important;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s var(--apple-spring);
}

.filter.selected,
.tab.active {
  color: #fff;
  background:
    linear-gradient(rgba(24, 25, 65, 0.96), rgba(24, 25, 65, 0.96)) padding-box,
    linear-gradient(110deg, #259dff, #7954ff 52%, #f242a1) border-box !important;
}

.card,
.podcast {
  border-color: rgba(255, 255, 255, 0.105) !important;
  border-radius: 22px !important;
  background: linear-gradient(155deg, rgba(18, 19, 56, 0.86), rgba(7, 8, 30, 0.8)) !important;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: transform 0.28s var(--apple-spring), border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.card:hover,
.podcast:hover {
  transform: translateY(-3px) !important;
  border-color: rgba(151, 101, 255, 0.34) !important;
  box-shadow: 0 25px 58px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(123, 72, 255, 0.06);
}

.category {
  border-color: rgba(255, 255, 255, 0.14) !important;
  border-radius: 24px !important;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.28s var(--apple-spring), box-shadow 0.25s ease !important;
}

.category:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.spotlight {
  border-radius: 26px !important;
}

.spotlight img {
  border-radius: 25px !important;
}

@media (min-width: 961px) and (max-width: 1180px) {
  .header-inner nav a:not(.active):not(.login) {
    display: flex !important;
  }

  .header-inner nav a {
    padding-inline: 9px;
    font-size: 13px;
  }

  .header-inner .login {
    min-width: 122px;
  }
}

@media (max-width: 960px) {
  .header {
    height: 78px !important;
    padding: 8px 10px;
  }

  .header-inner {
    height: 62px !important;
    padding: 7px 8px 7px 11px !important;
    border-radius: 18px;
  }

  .header-inner nav {
    display: none !important;
  }

  .platform-menu {
    display: grid !important;
    place-items: center;
    flex: 0 0 auto;
  }

  body.platform-menu-open .header-inner nav {
    position: absolute;
    z-index: 80;
    top: calc(100% + 10px);
    right: 0;
    width: min(380px, 100%);
    height: auto;
    padding: 10px;
    display: grid !important;
    gap: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 23px;
    background: rgba(9, 10, 31, 0.96);
    box-shadow: 0 30px 85px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(30px) saturate(170%);
    -webkit-backdrop-filter: blur(30px) saturate(170%);
    animation: apple-platform-menu-in 0.24s var(--apple-spring) both;
  }

  body.platform-menu-open .header-inner nav::before {
    content: "NAVIGATION";
    padding: 7px 11px 5px;
    color: #73717f;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 1.3px;
  }

  body.platform-menu-open .header-inner nav a {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 50px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px;
    border-radius: 14px;
    color: #cbc9d1;
    font-size: 15px;
  }

  body.platform-menu-open .header-inner nav a::before {
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 9px;
    color: #c8b7ff;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: none !important;
    font-size: 14px;
  }

  body.platform-menu-open .header-inner nav a[href="discover.html"]::before { content: "⌕"; }
  body.platform-menu-open .header-inner nav a[href="categories.html"]::before { content: "◫"; }
  body.platform-menu-open .header-inner nav a[href="library.html"]::before { content: "♡"; }
  body.platform-menu-open .header-inner nav a[href^="podcast-life-talks.html"]::before { content: "◉"; }
  body.platform-menu-open .header-inner nav a[href="admin.html"]::before { content: "＋"; }
  body.platform-menu-open .header-inner nav a[href="account.html"]::before { content: "◎"; }
  body.platform-menu-open .header-inner nav .login::before { content: "◎"; }

  body.platform-menu-open .header-inner nav a.has-saved::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 15px;
    bottom: auto !important;
    left: auto !important;
    width: 7px;
    height: 7px;
    display: block !important;
    border-radius: 50%;
    background: #ff3a9f;
    box-shadow: 0 0 10px rgba(255, 58, 159, 0.8);
    transform: translateY(-50%);
  }

  body.platform-menu-open .header-inner nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
  }

  body.platform-menu-open .header-inner nav .login {
    margin-top: 3px !important;
    border-radius: 14px;
    background:
      linear-gradient(rgba(13, 14, 41, 0.96), rgba(13, 14, 41, 0.96)) padding-box,
      linear-gradient(110deg, #259dff, #7954ff 52%, #f242a1) border-box;
  }
}

@media (max-width: 520px) {
  .header-inner .brand {
    font-size: 17px;
  }

  .header-inner .brand-r {
    width: 38px !important;
    height: 36px !important;
  }

  .card,
  .podcast,
  .category {
    border-radius: 18px !important;
  }
}

@keyframes apple-platform-menu-in {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.platform-menu-open .header-inner nav {
    animation: none;
  }
}
