@font-face {
  font-family: "Breathing IQOS";
  src: url("../fonts/breathing-iqos-bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

.iqos-rtb,
.iqos-rtb-results,
.iqos-rtb *,
.iqos-rtb-results * {
  box-sizing: border-box;
}

.iqos-rtb,
.iqos-rtb-results {
  --text: #fffaf0;
  --muted: rgba(255, 250, 240, 0.78);
  --line: rgba(255, 255, 255, 0.28);
  --glass: rgba(16, 24, 34, 0.25);
  --glass-strong: rgba(16, 24, 34, 0.38);
  --accent: #66e2c7;
  --gold: #ffe79a;
  --orange: #ff843f;
  --button-bg: rgba(255, 255, 255, 0.9);
  --button-bg-hover: #fffaf0;
  --button-text: #202733;
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

.iqos-rtb {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: 100vw;
  min-height: 100vh;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(15, 19, 28, 0.08), rgba(15, 19, 28, 0.22)),
    url("../img/repeat-the-beat-bg-desktop.jpg"),
    linear-gradient(135deg, #7581b9 0%, #43beb8 48%, #ff7d2c 100%);
  background-position: center;
  background-size: cover;
}

.iqos-rtb button,
.iqos-rtb input,
.iqos-rtb a {
  font: inherit;
}

.iqos-rtb__game,
.iqos-rtb__board {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--glass);
  box-shadow: 0 24px 80px rgba(20, 25, 34, 0.18);
  backdrop-filter: blur(18px);
}

.iqos-rtb__game {
  min-height: calc(100vh - 44px);
  overflow: hidden;
}

.iqos-rtb__board {
  padding: 24px;
  overflow: auto;
}

.iqos-rtb__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px 12px;
}

.iqos-rtb__brand {
  display: grid;
  gap: 8px;
  width: min(360px, 48vw);
}

.iqos-rtb__brand img {
  display: block;
  width: min(100%, 310px);
  height: auto;
}

.iqos-rtb__brand strong {
  color: #fff;
  font-family: "Breathing IQOS", "Segoe Script", "Brush Script MT", cursive;
  font-size: clamp(26px, 4.2vw, 72px);
  font-weight: 700;
  line-height: 0.78;
  text-shadow: 0 10px 28px rgba(25, 32, 42, 0.18);
}

.iqos-rtb__midi,
.iqos-rtb__level-head button,
.iqos-rtb__play-actions button,
.iqos-rtb__result-actions button,
.iqos-rtb__result-actions a,
.iqos-rtb__button,
.iqos-rtb__form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-text) !important;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none !important;
  box-shadow: 0 12px 30px rgba(20, 25, 34, 0.13);
  transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.iqos-rtb__midi b,
.iqos-rtb__level-head button *,
.iqos-rtb__play-actions button *,
.iqos-rtb__result-actions button *,
.iqos-rtb__result-actions a *,
.iqos-rtb__button *,
.iqos-rtb__form button * {
  color: inherit !important;
}

.iqos-rtb__midi:hover,
.iqos-rtb__level-head button:hover,
.iqos-rtb__play-actions button:hover,
.iqos-rtb__result-actions button:hover,
.iqos-rtb__result-actions a:hover,
.iqos-rtb__button:hover,
.iqos-rtb__form button:hover,
.iqos-rtb__midi:focus-visible,
.iqos-rtb__level-head button:focus-visible,
.iqos-rtb__play-actions button:focus-visible,
.iqos-rtb__result-actions button:focus-visible,
.iqos-rtb__result-actions a:focus-visible,
.iqos-rtb__button:focus-visible,
.iqos-rtb__form button:focus-visible {
  background: var(--button-bg-hover);
  border-color: rgba(255, 255, 255, 0.72);
  color: var(--button-text) !important;
  transform: translateY(-1px);
}

.iqos-rtb__midi {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
}

.iqos-rtb__midi span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff5b45;
  box-shadow: 0 0 0 4px rgba(255, 91, 69, 0.18);
}

.iqos-rtb__midi.is-connected span {
  background: #66e2c7;
  box-shadow: 0 0 0 4px rgba(102, 226, 199, 0.18);
}

.iqos-rtb__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 28px 14px;
}

.iqos-rtb__steps span {
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 24, 34, 0.22);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.iqos-rtb[data-screen="register"] [data-step="register"],
.iqos-rtb[data-screen="level"] [data-step="level"],
.iqos-rtb[data-screen="play"] [data-step="play"],
.iqos-rtb[data-screen="result"] [data-step="result"] {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.iqos-rtb__screen {
  display: none;
  min-height: calc(100vh - 226px);
  padding: 24px 28px 30px;
}

.iqos-rtb__screen.is-active {
  display: block;
}

.iqos-rtb__screen[data-screen="register"] {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 28px;
  align-items: center;
}

.iqos-rtb__screen[data-screen="register"].is-active {
  display: grid;
}

.iqos-rtb__intro,
.iqos-rtb__form,
.iqos-rtb__level,
.iqos-rtb__hud div,
.iqos-rtb__result-grid div {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.17);
  box-shadow: 0 18px 48px rgba(20, 25, 34, 0.13);
}

.iqos-rtb__intro {
  min-height: 330px;
  padding: 30px;
}

.iqos-rtb__intro p,
.iqos-rtb__eyebrow,
.iqos-rtb__board p {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.iqos-rtb__intro h1,
.iqos-rtb__screen h2,
.iqos-rtb__board h2 {
  margin: 10px 0 0;
  color: #fff;
  font-size: clamp(34px, 4.4vw, 64px);
  line-height: 1.02;
}

.iqos-rtb__intro span {
  display: block;
  max-width: 460px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.iqos-rtb__form {
  display: grid;
  gap: 10px;
  padding: 24px;
}

.iqos-rtb__form label {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.iqos-rtb__form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  color: #18202a;
  padding: 0 14px;
}

.iqos-rtb__level-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.iqos-rtb__level-head p {
  margin: 0 0 4px;
  color: var(--muted);
}

.iqos-rtb__level-head h2 {
  margin: 0;
}

.iqos-rtb__level-head button {
  padding: 0 16px;
}

.iqos-rtb__levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.iqos-rtb__level {
  min-height: 220px;
  padding: 22px;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.iqos-rtb__level:hover,
.iqos-rtb__level:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.25);
}

.iqos-rtb__level span,
.iqos-rtb__level small,
.iqos-rtb__level em {
  display: block;
}

.iqos-rtb__level span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.iqos-rtb__level strong {
  display: block;
  margin-top: 16px;
  font-size: 30px;
  line-height: 1;
}

.iqos-rtb__level small {
  margin-top: 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.iqos-rtb__level em {
  margin-top: 24px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.35;
}

.iqos-rtb__screen--play {
  position: relative;
}

.iqos-rtb__hud,
.iqos-rtb__result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.iqos-rtb__hud div,
.iqos-rtb__result-grid div {
  min-height: 74px;
  padding: 14px;
}

.iqos-rtb__hud span,
.iqos-rtb__result-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.iqos-rtb__hud strong,
.iqos-rtb__result-grid strong {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  line-height: 1;
}

.iqos-rtb__lanes {
  position: absolute;
  inset: 124px 28px 90px;
  display: grid;
  grid-template-columns: repeat(5, minmax(78px, 1fr));
  gap: 8px;
}

.iqos-rtb__lane {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
}

.iqos-rtb__lane.is-active {
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 44px rgba(255, 255, 255, 0.16);
}

.iqos-rtb__lane-label {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
}

.iqos-rtb__lane-label span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
}

.iqos-rtb__note {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  width: clamp(50px, 6vw, 78px);
  height: clamp(50px, 6vw, 78px);
  background: url("../img/remix-beat.png") center / contain no-repeat;
  filter: drop-shadow(0 12px 30px rgba(24, 32, 42, 0.2));
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.iqos-rtb__note.is-hit {
  opacity: 0;
  transform: translate(-50%, 92%) scale(1.34) rotate(12deg) !important;
  transition: opacity 180ms ease, transform 180ms ease;
}

.iqos-rtb__note.is-missed {
  opacity: 0.28;
  filter: grayscale(1);
}

.iqos-rtb__hitline {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 116px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #61dfcf, #fff2a6, #ff843f);
  box-shadow: 0 0 24px rgba(255, 242, 166, 0.58);
  pointer-events: none;
}

.iqos-rtb__feedback {
  position: absolute;
  left: 50%;
  bottom: 36px;
  min-width: 160px;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.82);
  font-size: 22px;
  font-weight: 950;
  text-align: center;
}

.iqos-rtb__feedback[data-type="perfect"] {
  color: var(--accent);
}

.iqos-rtb__feedback[data-type="good"] {
  color: var(--gold);
}

.iqos-rtb__feedback[data-type="miss"] {
  color: var(--orange);
}

.iqos-rtb__countdown {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(36, 42, 54, 0.36);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: clamp(84px, 16vw, 180px);
  font-weight: 950;
}

.iqos-rtb__countdown[hidden] {
  display: none;
}

.iqos-rtb__play-actions {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: flex;
  gap: 8px;
}

.iqos-rtb__play-actions button {
  min-width: 92px;
  padding: 0 14px;
}

.iqos-rtb__result-grid {
  max-width: 860px;
  margin-top: 24px;
}

.iqos-rtb__result-actions {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

.iqos-rtb__result-actions button {
  padding: 0 18px;
}

.iqos-rtb__result-actions a {
  padding: 0 18px;
}

.iqos-rtb__board h2 {
  margin-bottom: 20px;
  font-size: 30px;
}

.iqos-rtb__board ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.iqos-rtb__board li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
}

.iqos-rtb__board li span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #61dfcf, #ffe58c);
  color: #18202a;
  font-weight: 950;
}

.iqos-rtb__board li strong,
.iqos-rtb__board li em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iqos-rtb__board li em {
  grid-column: 2 / 4;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.iqos-rtb__board li b {
  color: var(--gold);
}

.iqos-rtb-results {
  width: 100vw;
  min-height: 100vh;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(15, 19, 28, 0.1), rgba(15, 19, 28, 0.26)),
    url("../img/repeat-the-beat-bg-desktop.jpg"),
    linear-gradient(135deg, #7581b9 0%, #43beb8 48%, #ff7d2c 100%);
  background-position: center;
  background-size: cover;
}

.iqos-rtb-results__hero,
.iqos-rtb-results__table {
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--glass);
  box-shadow: 0 24px 80px rgba(20, 25, 34, 0.18);
  backdrop-filter: blur(18px);
}

.iqos-rtb-results__hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
}

.iqos-rtb-results__hero h1 {
  margin: 8px 0 0;
  color: #fff;
  font-size: clamp(36px, 5vw, 76px);
  line-height: 1;
  text-align: right;
}

.iqos-rtb-results__table {
  margin-top: 18px;
  padding: 18px;
}

.iqos-rtb-results__table ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.iqos-rtb-results__table li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 180px 150px 130px;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.15);
}

.iqos-rtb-results__table li span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #202733;
  font-weight: 950;
}

.iqos-rtb-results__table li strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iqos-rtb-results__table li em,
.iqos-rtb-results__table li small {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.iqos-rtb-results__table li b {
  color: var(--gold);
  font-size: 24px;
  text-align: right;
}

.iqos-rtb-results__empty {
  margin: 0;
  padding: 28px;
  color: var(--muted);
  font-size: 20px;
  text-align: center;
}

@media (max-width: 980px) {
  .iqos-rtb {
    grid-template-columns: 1fr;
    background:
      linear-gradient(180deg, rgba(15, 19, 28, 0.08), rgba(15, 19, 28, 0.22)),
      url("../img/repeat-the-beat-bg-mobile.jpg"),
      linear-gradient(160deg, #7581b9 0%, #43beb8 50%, #ff7d2c 100%);
    background-position: center top;
    background-size: cover;
  }

  .iqos-rtb__screen[data-screen="register"].is-active,
  .iqos-rtb__levels {
    grid-template-columns: 1fr;
  }

  .iqos-rtb-results {
    background:
      linear-gradient(180deg, rgba(15, 19, 28, 0.1), rgba(15, 19, 28, 0.26)),
      url("../img/repeat-the-beat-bg-mobile.jpg"),
      linear-gradient(160deg, #7581b9 0%, #43beb8 50%, #ff7d2c 100%);
    background-position: center top;
    background-size: cover;
  }

  .iqos-rtb-results__hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .iqos-rtb-results__hero h1 {
    text-align: left;
  }

  .iqos-rtb-results__table li {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .iqos-rtb-results__table li em,
  .iqos-rtb-results__table li small {
    grid-column: 2 / 4;
  }
}

@media (max-width: 640px) {
  .iqos-rtb {
    padding: 10px;
  }

  .iqos-rtb__top,
  .iqos-rtb__level-head,
  .iqos-rtb__result-actions {
    flex-direction: column;
  }

  .iqos-rtb__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-inline: 16px;
  }

  .iqos-rtb__hud,
  .iqos-rtb__result-grid {
    grid-template-columns: 1fr;
  }

  .iqos-rtb__screen--play {
    min-height: 640px;
  }

  .iqos-rtb__lanes {
    inset: 240px 14px 98px;
    grid-template-columns: repeat(5, minmax(48px, 1fr));
    gap: 5px;
  }

  .iqos-rtb__lane-label {
    left: 6px;
    right: 6px;
    flex-direction: column;
    font-size: 10px;
  }

  .iqos-rtb__hitline {
    left: 14px;
    right: 14px;
    bottom: 124px;
  }
}
