@import "./assets/font/fonts.css";
@import "./assets/img/icons/icons.css";

:root {
  --bg-1: #3a241d;
  --bg-2: #6b4e41;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-2: rgba(255, 255, 255, 0.12);
  --stroke: rgba(255, 255, 255, 0.18);
  --txt: #f1ded0;
  --txt-dim: #edd7cc;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.1);
  --radius-xl: 28px;
  --radius-xxl: 16px;
  --gap: 22px;
  --tile-pad: 16px 8px;
  --tile-font: 24px;
}

html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: "Helvetica";
  color: var(--txt);
  font-weight: 400;
  padding: 0;
  box-sizing: border-box;
}
.wrapper {
  position: relative;
  z-index: 2;
  min-height: 100%;
  overflow: hidden;
}
/* Back button container */
.backbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(164, 119, 100, 0.8);
  color: #f1ded0;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  line-height: 0px;
}
.btn-back i {
  font-size: 14px;
  background: #0b0b0b;
  color: #0b0b0b;
}
.section-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}
.section-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.app {
  max-width: 480px;
  margin: 70px auto 0;
  padding: env(safe-area-inset-top, 18px) 18px
    calc(env(safe-area-inset-bottom, 18px) + 18px);
  min-height: 100%;
  position: relative;
  isolation: isolate;
}

header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  position: relative;
}

h1 {
  font-weight: 800;
  line-height: 34px;
  letter-spacing: 0.3px;
  color: var(--txt);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
  font-size: 34px;
  margin: 0;
  padding: 0;
  font-weight: 400;
}
h2,
h3 {
  padding: 0;
  margin: 0;
}
h1 .sub {
  display: block;
  color: var(--txt-dim);
}

.avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: block;
  overflow: hidden;
  flex: 0 0 auto;
  position: relative;
}
.stack {
  margin-top: 70px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.tile {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-height: 68px;
  min-height: 68px;
  border-radius: var(--radius-xxl);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  color: var(--txt);
  text-decoration: none;
  line-height: 1.18;
  font-size: var(--tile-font);
  letter-spacing: 0.5px;
  backdrop-filter: blur(1px) saturate(100%);
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      to right,
      transparent 0%,
      rgba(255, 255, 255, 0.07) 48%,
      transparent 52%
    )
    no-repeat;
  background-size: 180% 100%;
  transform: translateZ(0);
  mix-blend-mode: screen;
  pointer-events: none;
  transition: background-position 0.6s ease;
}

.tile:focus-visible {
  outline: 3px solid #ffe1c8;
  outline-offset: 2px;
}
.tile:hover::after {
  background-position: -10% 0;
}
.tile:active {
  transform: translateY(1px) scale(0.997);
}

.tile.is-large {
  max-height: 109px;
  height: 109px;
  font-size: 34px;
}

.muted {
  opacity: 0.86;
}

.podcasts-items {
  margin-top: 23px;
  gap: 24px;
  display: flex;
  flex-direction: column;
}

.podcast-item {
  position: relative;
  padding: 24px 0 0;
}

.podcast-item::after {
  content: "";
  position: absolute;
  top: 0;
  width: 328px;
  height: 1px;
  background: #a47764;
}
.podcast-titles {
}
.podcast-titles p {
  font-weight: 400;
  font-size: 10px;
  line-height: 100%;
  color: #f1ded0;
}
.podcast-titles h2 {
  font-weight: 400;
  font-size: 24px;
  line-height: 100%;
  margin-top: 4px;
  color: #ffffff;
}

.podcast-body {
  margin-top: 16px;
}
.podcast-info {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.podcast-info p {
  font-weight: 400;
  font-size: 10px;
  line-height: 100%;
  color: #f1ded0;
}
.podcast-play {
  padding: 6px 12px;
  background: #ffffff;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.podcast-play i {
  font-size: 12px;
  flex: 0 0 12px;
  background: #422b23;
  cursor: pointer;
}
.podcast-play span {
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  color: #422b23;
}
.btn-orange {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  box-shadow: 0px 2px 5px 0px #bc42001a;

  background: rgba(164, 119, 100, 0.8);
  width: 100%;
  height: 64px;
  border-radius: var(--radius-xxl);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(1px) saturate(100%);
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  margin-top: 8px;
  font-family: Helvetica;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  text-transform: uppercase;
  color: #f1ded0;
  text-decoration: none;
}

.btn-orange::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      to right,
      transparent 0%,
      rgba(255, 255, 255, 0.07) 48%,
      transparent 52%
    )
    no-repeat;
  background-size: 180% 100%;
  transform: translateZ(0);
  mix-blend-mode: screen;
  pointer-events: none;
  transition: background-position 0.6s ease;
}

.btn-orange:focus-visible {
  outline: 3px solid #ffe1c8;
  outline-offset: 2px;
}
.btn-orange:hover::after {
  background-position: -10% 0;
}
.btn-orange:active {
  transform: translateY(1px) scale(0.997);
}

.podcasts-img {
  max-width: 316px;
  width: 100%;
  height: 316px;
  margin: 0 auto;
}
.podcasts-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.podcast-deatil-titles {
  margin-top: 34px;
}

.podcast-deatil-titles span {
  font-weight: 400;
  font-size: 10px;
  line-height: 100%;
  text-align: center;
  color: #ffffff;
  display: block;
  opacity: 0.6;
  margin-bottom: 4px;
}
.podcast-deatil-titles h2 {
  font-weight: 400;
  font-size: 34px;
  line-height: 110.00000000000001%;
  text-align: center;
}
.podcast-deatil-titles p {
  font-family: "Circe";
  font-weight: 400;
  font-size: 14px;
  line-height: 100%;
  text-align: center;
  color: #ffffff;
  opacity: 0.8;
  max-width: 305px;
  margin: 10px auto 0;
}

@media (prefers-reduced-motion: reduce) {
  .tile,
  .tile::after {
    transition: none;
  }
}

.podcast {
  position: relative;
  display: grid;
  align-items: center;
  justify-items: center;
  margin-top: 19px;
}

.podcast__bigplay {
  z-index: 2;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 1px solid #fce9e4;
  background: #a47764;
  margin-bottom: 36px;

  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  transition: all 0.18s ease;
  box-shadow: 0px 55px 15px 0px #516e9100;
}
.podcast__bigplay:hover {
  transform: scale(1.03);
}
.podcast__bigplay:active {
  transform: scale(0.98);
}
.podcast__bigplay:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(252, 233, 228, 0.3);
}

.podcast__bigplay-icon {
  font-size: 45px;
  background: white;
  margin-left: 10px;
}
.icon-pause {
  display: none;
  font-size: 45px;
  background: white;
}
.podcast__bigplay[data-state="pause"] .podcast__bigplay-icon {
  display: none;
}
.podcast__bigplay[data-state="pause"] .icon-pause {
  display: block;
}

.podcast__times {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  margin-top: 12px;
}

.podcast__progress {
  width: 100%;
}

.podcast__time {
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #a47764;
}

.podcast__range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  outline: none;
  background: #f1ded0;
}

.podcast__range::-webkit-slider-runnable-track {
  height: 12px;
  border-radius: 999px;
  background: transparent;
}
.podcast__range::-webkit-slider-thumb {
  display: none;
}

.podcast__range::-moz-range-track {
  display: none;
}
.podcast__range::-moz-range-thumb {
  display: none;
}

.podcast__range:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(252, 233, 228, 0.3);
  border-radius: 12px;
}

.podcast-tag {
  background: #a4776480;
  padding: 0 31px;
  height: 91px;
  font-weight: 400;
  font-size: 20px;
  line-height: 100%;
  text-align: center;
  margin-top: 25px;
  text-transform: uppercase;

  text-align: center;
  backdrop-filter: blur(4px);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f1ded0;
}

.podcast__title {
  margin: 0;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
  font-size: clamp(20px, 3.6vw, 44px);
  color: #f5e9e4;
}

.free-issue-cnt {
  padding: 24px 15px;
  background: #ffffffcc;
  border-radius: 16px 16px 0 0;
  margin-top: 15px;
  min-height: 400px;
}
.first-podcast-cnt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.free-issue-app {
  padding-bottom: 0;
}

.free-issue-titles {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 307px;
  margin: 0 auto;
}
.free-issue-titles i {
  margin-bottom: 14px;
  font-size: 36px;
  background: #422b23;
}
.free-issue-titles h2 {
  font-size: 28px;
  line-height: 110%;
  text-align: center;
  color: #a47764;
}

.free-issue-titles p {
  font-weight: 400;
  font-size: 14px;
  line-height: 100%;
  text-align: center;
  color: #170f09;
  opacity: 8;
  margin: 0;
  padding: 14px 0 0;
}
.free-issue-items {
  margin-top: 58px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.free-issue-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  flex-wrap: wrap;
}
.free-issue-item i {
  font-size: 22px;
  background: #a47764;
  flex: 0 0 22px;
}
.free-item-texts {
  flex: 1 1 auto;
}
.free-issue-item p {
  font-weight: 600;
  font-size: 20px;
  line-height: 24px;
  text-align: start;
  text-transform: uppercase;
  color: #170f09;
  margin: 0;
}
.free-issue-item span {
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #170f09;
  opacity: 0.8;
}

.free-issue-item button,
.free-issue-item a {
  max-width: 195px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 195px;
  background: rgba(164, 119, 100, 0.4);
  height: 64px;
  border-radius: 16px;
  box-shadow: 0px 2px 5px 0px #bc42001a, 0px 9px 9px 0px #bc420017,
    0px 20px 12px 0px #bc42000d, 0px 35px 14px 0px #bc420003,
    0px 55px 15px 0px #bc420000;
  border: 1px solid #fce9e4;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0px;
  text-align: center;
  text-transform: uppercase;
  color: #170f09;
}

.btn-light {
  width: 100%;
  background: rgba(164, 119, 100, 0.4);
  height: 64px;
  border-radius: 16px;
  box-shadow: 0px 2px 5px 0px #bc42001a, 0px 9px 9px 0px #bc420017,
    0px 20px 12px 0px #bc42000d, 0px 35px 14px 0px #bc420003,
    0px 55px 15px 0px #bc420000;
  border: 1px solid #fce9e4;
  cursor: pointer;
  margin-left: auto;

  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0px;
  text-align: center;
  text-transform: uppercase;
  color: #170f09;
  transition: all 0.3s;
}
.btn-white {
  width: 100%;
  background: #f1ded0;
  height: 64px;
  border-radius: 16px;
  box-shadow: 0px 2px 5px 0px #bc42001a, 0px 9px 9px 0px #bc420017,
    0px 20px 12px 0px #bc42000d, 0px 35px 14px 0px #bc420003,
    0px 55px 15px 0px #bc420000;
  border: 1px solid #fce9e4;
  cursor: pointer;
  margin-left: auto;

  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0px;
  text-align: center;
  text-transform: uppercase;
  color: #170f09;
  transition: all 0.3s;
}
.btn-light:hover {
  opacity: 0.7;
}
.btn-white:hover {
  opacity: 0.7;
}
.first-podcast-btn {
  margin-top: 39px;
}
.sure-buttons {
  display: flex;
  width: 100%;
  gap: 13px;
  margin-top: 40px;
}
.subscription-titles h1 {
  text-align: center;
}
.subscription-titles p {
  font-weight: 400;
  font-size: 14px;
  line-height: 100%;
  text-align: center;
  color: #ffffff;
  opacity: 0.8;
  max-width: 233px;
  margin: 0 auto;
  padding: 14px 0 0;
}
.subscription-items {
  display: flex;
  flex-direction: column;
  gap: 31px;
  max-width: 220px;
  margin: 80px auto 40px auto;
}
.subscription-item {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  cursor: pointer;
}
.subscription-item.active .subscription-item-icon::after {
  background: #f1ded0;
}
.subscription-item-icon {
  width: 24px;
  height: 24px;
  background: #f1ded080;
  border-radius: 50%;
  position: relative;
  flex: 0 0 24px;
}
.subscription-item-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: 0.4s;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #a4776480;
}
.subscription-item-titles h2 {
  font-weight: 600;
  font-size: 18px;
  line-height: 100%;
  text-transform: uppercase;
  color: #ffffff;
}
.subscription-item-titles p {
  font-weight: 400;
  font-size: 18px;
  line-height: 100%;
  color: #ffffff;
  opacity: 0.8;
  margin: 0;
  padding: 8px 0 0;
}
.loader-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
.loader {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 34px;
  line-height: 110.00000000000001%;
  text-align: center;
  color: #fff;
  overflow: hidden;
  margin: 50px auto 0;
}
.loader-img {
  position: absolute;
  left: 0;
  top: 0;
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

.info-wrapper {
  height: 100vh;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  max-width: 366px;
  margin: 0 auto;
}
.info-wrapper h2 {
  font-weight: 400;
  font-size: 34px;
  line-height: 120%;
  text-align: center;
  color: #f1ded0;
  margin-top: 10px;
  margin-bottom: 60px;
}
.info-wrapper h2 span {
  font-weight: 400;
  font-size: 24px;
  line-height: 120%;
  text-align: center;
  display: block;
}
/* Free badge chip */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.chip.free {
  background: linear-gradient(135deg, #22c55e, #a3e635);
  color: #0b0b0b;
}
@media (prefers-reduced-motion: reduce) {
  .podcast__bigplay,
  .podcast__bigplay-icon {
    transition: none;
  }
}

/* --- Mini app compaction overrides (append-only) --- */
/* Defaults: compact spacing and sizes to better fit mini-app viewport */
:root {
  --gap: 18px;
  --tile-pad: 12px 8px;
  --tile-font: 20px;
}

.app {
  margin: 16px auto 0;
  padding: env(safe-area-inset-top, 12px) 16px
    calc(env(safe-area-inset-bottom, 12px) + 12px);
}

h1 {
  font-size: 28px;
  line-height: 28px;
}

.stack {
  margin-top: 24px;
}

.tile {
  min-height: 56px;
  max-height: 56px;
  font-size: var(--tile-font);
}
.tile.is-large {
  height: 88px;
  max-height: 88px;
  font-size: 28px;
}

.podcasts-items {
  margin-top: 12px;
}
.podcast-item {
  padding-top: 16px;
}

.podcast__bigplay {
  width: 96px;
  height: 96px;
}
.podcast__bigplay-icon,
.icon-pause {
  font-size: 38px;
}
.podcast__range {
  height: 5px;
}

.podcast-tag {
  height: 56px;
  padding: 0 22px;
  font-size: 16px;
}
.free-issue-cnt {
  min-height: 320px;
  margin-top: 10px;
}

.btn-orange {
  height: 56px;
  font-size: 15px;
}
.btn-light,
.btn-white {
  height: 56px;
}

.podcasts-img {
  height: 240px;
}
.podcast-deatil-titles h2 {
  font-size: 26px;
}

.subscription-items {
  margin: 24px auto;
}

/* Height-based compaction for very small viewports */
@media (max-height: 760px) {
  .app {
    margin: 10px auto 0;
    padding: env(safe-area-inset-top, 8px) 12px
      calc(env(safe-area-inset-bottom, 8px) + 8px);
  }
  h1 {
    font-size: 24px;
    line-height: 26px;
  }
  .tile {
    min-height: 52px;
    max-height: 52px;
  }
  .tile.is-large {
    height: 76px;
    max-height: 76px;
    font-size: 24px;
  }
  .podcasts-img {
    height: 220px;
  }
  .podcast__bigplay {
    width: 84px;
    height: 84px;
  }
  .podcast__bigplay-icon,
  .icon-pause {
    font-size: 32px;
  }
  .subscription-items {
    margin: 16px auto;
  }
}

@media (max-height: 640px) {
  .app {
    margin: 6px auto 0;
  }
  .stack {
    margin-top: 16px;
  }
  .tile {
    min-height: 48px;
    max-height: 48px;
    font-size: 18px;
  }
  .tile.is-large {
    height: 68px;
    max-height: 68px;
    font-size: 22px;
  }
  .podcasts-img {
    height: 200px;
  }
  .podcast__bigplay {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
  }
  .podcast-tag {
    height: 48px;
    font-size: 14px;
  }
}
