/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #0e0e0e;
  color: #fff;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===== Layout ===== */
.page {
  max-width: 360px;
  margin: 0 auto;
  min-height: 100vh;
  background-color: #0e0e0e;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

/* ===== Typography ===== */
.text-accent {
  color: #d81425;
}

.section-title {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 16px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
}

.btn--install {
  background-color: #d81425;
  border-radius: 3px;
  font-size: 12px;
  padding: 4px 18px;
  height: 24px;
}

.btn--primary {
  width: 100%;
  height: 38px;
  border-radius: 8px;
  font-size: 12px;
  background: linear-gradient(180deg, #e72730 0%, #b50d14 100%);
  box-shadow:
    0 3px 0 0 #821111,
    inset 0 2px 0 0 rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.btn--cta {
  margin-top: 8px;
}

.btn--footer {
  border-radius: 4px;
  box-shadow: none;
  background: #d81425;
}

.btn__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ===== Divider ===== */
.divider {
  height: 1px;
  background-color: #d9d9d9;
  opacity: 0.1;
  margin: 16px 0;
}

.divider--thin {
  height: 0.5px;
  margin: 12px 0;
}

/* ===== Header ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 10px 8px;
}

.header__app {
  display: flex;
  align-items: center;
  gap: 7px;
}

.header__icon {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
}

.header__title {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}

.header__subtitle {
  font-size: 10px;
  font-weight: 400;
  color: #808080;
}

/* ===== Hero ===== */
.hero {
  padding: 0 12px;
}

.hero__player {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background-color: #000;
  cursor: pointer;
}

.hero__video {
  display: block;
  width: 100%;
  height: 189px;
  object-fit: cover;
  background-color: #000;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: auto;
}

.hero__player--controls-hidden .hero__overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.hero__controls {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  pointer-events: none;
}

.hero__controls > * {
  pointer-events: auto;
}

.hero__play {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero__play-icon--play {
  width: 100%;
  height: 100%;
}

.hero__play-icon--pause {
  display: none;
  width: 18px;
  height: 22px;
  border-left: 6px solid #fff;
  border-right: 6px solid #fff;
  box-sizing: border-box;
}

.hero__player--playing.hero__player--show-controls .hero__play-icon--play {
  display: none;
}

.hero__player--playing.hero__player--show-controls .hero__play-icon--pause {
  display: block;
}

.hero__skip {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.hero__skip-inner {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  transform: scaleX(-1);
}

.hero__skip-inner--forward {
  transform: none;
}

.hero__skip-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__skip-arrow {
  position: absolute;
  top: 0;
  right: 0;
  width: 5.5px;
  height: 6.9px;
}

.hero__skip-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 500;
  color: #fff;
  z-index: 1;
}

.hero__fullscreen {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  z-index: 2;
  pointer-events: auto;
}

.hero__fullscreen img {
  width: 100%;
  height: 100%;
}

/* Progress bar */
.hero__progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 0 9px;
}

.hero__time {
  font-size: 10px;
  font-weight: 500;
  color: #fff;
  flex-shrink: 0;
}

.progress-bar {
  position: relative;
  flex: 1;
  height: 2px;
  cursor: pointer;
}

.progress-bar__track {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.progress-bar__fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background-color: #d81425;
  border-radius: 4px;
  transition: width 0.1s linear;
}

.progress-bar__thumb {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background-color: #d81425;
  border-radius: 50%;
  transition: left 0.1s linear;
}

.hero__player--fullscreen .hero__video {
  height: 100%;
}

.hero__player--fullscreen {
  border-radius: 0;
}

/* Hero CTA */
.hero__cta-section {
  margin-top: 16px;
  position: relative;
}

.hero__headline {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.hero__subheadline {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  margin-top: 8px;
}

/* ===== Store Info ===== */
.store-info {
  padding: 0 12px;
  margin-top: 8px;
}

.store-info__content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
}

.store-info__logo {
  flex-shrink: 0;
  margin-top: 2px;
}

.store-info__name {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
}

.store-info__desc {
  font-size: 12px;
  font-weight: 400;
  color: #808080;
  margin-top: 2px;
}

.store-info__rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 400;
  color: #808080;
  margin-top: 4px;
}

.store-info__star {
  flex-shrink: 0;
}

/* ===== Recommendations ===== */
.recommendations {
  padding: 0 12px;
  margin-top: 16px;
}

.recommendations__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.recommendations__poster {
  width: 100%;
  aspect-ratio: 106 / 142;
  object-fit: cover;
  border-radius: 4px;
}

.recommendations__name {
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  margin-top: 4px;
}

.recommendations__genre {
  font-size: 10px;
  font-weight: 400;
  color: #808080;
  margin-top: 2px;
}

/* ===== Reviews ===== */
.reviews {
  padding: 0 12px;
  margin-top: 8px;
}

.reviews__list {
  margin-top: 8px;
}

.review {
  display: flex;
  gap: 8px;
  padding: 8px 0;
}

.review__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.review__body {
  flex: 1;
  min-width: 0;
}

.review__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
}

.review__name {
  font-size: 11px;
  font-weight: 500;
  color: #fff;
}

.review__stars {
  height: 11px;
  width: auto;
  justify-self: start;
}

.review__date {
  font-size: 10px;
  font-weight: 400;
  color: #808080;
  justify-self: end;
}

.review__text {
  font-size: 11px;
  font-weight: 400;
  color: #b7b7b7;
  line-height: 15px;
  margin-top: 4px;
}

/* ===== Footer ===== */
.footer {
  padding: 24px 12px 16px;
  text-align: center;
}

.footer__note {
  font-size: 12px;
  font-weight: 400;
  color: #808080;
  margin-top: 12px;
}

/* ===== Responsive ===== */
@media (min-width: 361px) {
  .page {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  }
}
