.setup-body {
  background: #171717;
}

.setup-page {
  min-height: calc(100vh - 112px);
  padding: 24px 18px 150px;
}

.setup-brand {
  width: fit-content;
  margin: 0 auto 46px;
  font-size: 25px;
}

.setup-brand .brand-mark {
  width: 30px;
  height: 30px;
}

.setup-steps {
  width: min(520px, 100%);
  margin: 0 auto 74px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 36px;
  list-style: none;
  position: relative;
}

.setup-steps::before,
.setup-steps::after {
  content: "";
  position: absolute;
  top: 15px;
  width: 80px;
  height: 4px;
  border-radius: 99px;
  background: #555;
}

.setup-steps::before {
  left: 126px;
}

.setup-steps::after {
  right: 126px;
}

.step {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 900;
}

.step span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #9b9b9b;
}

.step.done span,
.step.active span {
  background: var(--red);
  box-shadow: 0 0 28px rgba(255, 31, 31, 0.32);
}

.step.active span {
  outline: 12px solid rgba(255, 31, 31, 0.08);
}

.setup-section {
  width: min(820px, 100%);
  margin: 0 auto;
  text-align: center;
}

.setup-section[hidden] {
  display: none;
}

.setup-section h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 43px);
}

.setup-section > p {
  margin: 0 0 28px;
  font-size: 17px;
  font-weight: 800;
}

.channel-panel {
  width: 100%;
  padding: 24px;
  border-radius: 22px;
  background: #090909;
  box-shadow: 0 26px 78px rgba(0, 0, 0, 0.34);
}

.youtube-channel-field {
  min-height: 98px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  text-align: left;
}

.youtube-channel-field span {
  color: #9d9d96;
  font-size: 14px;
  font-weight: 950;
}

.youtube-channel-field input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
  font-size: 16px;
  font-weight: 800;
}

.youtube-channel-field input::placeholder {
  color: #92928a;
}

.channel-status {
  min-height: 20px;
  margin: 14px 4px 0;
  color: #aebdda;
  text-align: left;
  font-size: 13px;
  font-weight: 850;
}

.connected-channel {
  width: fit-content;
  max-width: 100%;
  min-height: 58px;
  margin: 0 auto 46px;
  padding: 8px 18px 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: rgba(8, 8, 8, 0.72);
}

.channel-avatar,
.competitor-avatar,
.slot-avatar {
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), transparent),
    linear-gradient(135deg, var(--red), #2f7dff);
  background-size: cover;
  background-position: center;
}

.channel-avatar {
  width: 42px;
  height: 42px;
}

.connected-channel strong,
.connected-channel p {
  display: block;
}

.connected-channel strong {
  color: white;
  font-size: 13px;
  line-height: 1.2;
}

.connected-channel p {
  margin: 3px 0 0;
  color: #92928a;
  font-size: 12px;
  font-weight: 800;
}

.competition-panel {
  width: 100%;
  max-height: none;
  padding: 30px 24px;
  border-radius: 22px;
  background: #090909;
  box-shadow: 0 26px 78px rgba(0, 0, 0, 0.34);
  text-align: left;
  overflow: visible;
}

.selected-header,
.recommendation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  color: #b7c6dc;
  font-size: 13px;
  font-weight: 900;
}

.clear-selection {
  border: 0;
  background: transparent;
  color: #85857d;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.selected-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 26px;
}

.selected-slot {
  min-width: 0;
  min-height: 98px;
  padding: 16px;
  border: 2px dashed rgba(255, 255, 255, 0.38);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: white;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.selected-slot.filled {
  border-style: solid;
  border-color: rgba(255, 31, 31, 0.55);
  background: rgba(255, 255, 255, 0.04);
}

.selected-slot strong,
.selected-slot span,
.selected-slot em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-slot strong {
  font-size: 15px;
  line-height: 1.25;
}

.selected-slot span,
.selected-slot em {
  margin-top: 6px;
  color: #81817a;
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.slot-avatar {
  width: 40px;
  height: 40px;
}

.channel-search {
  height: 56px;
  margin-bottom: 28px;
  padding: 0 18px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #282828;
}

.channel-search span {
  width: 18px;
  height: 18px;
  border: 2px solid white;
  border-radius: 50%;
  position: relative;
}

.channel-search span::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: -6px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: white;
  transform: rotate(45deg);
}

.channel-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: white;
  font-size: 16px;
  font-weight: 750;
}

.channel-search input::placeholder {
  color: #aaa;
}

.recommendation-header {
  margin-bottom: 12px;
}

.recommendation-header small {
  color: #77776f;
  font-weight: 900;
}

.competitor-list {
  max-height: 440px;
  padding-right: 6px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  overflow: auto;
}

.empty-results {
  grid-column: 1 / -1;
  margin: 10px 0;
  color: #8f8f87;
  font-size: 14px;
  font-weight: 850;
}

.load-more {
  width: 100%;
  min-height: 44px;
  margin-top: 16px;
  border: 0;
  border-radius: 10px;
  color: #ededeb;
  background: #3a3a3a;
  font-weight: 950;
  cursor: pointer;
  display: block;
}

.load-more:hover {
  background: #454545;
}

.load-more:disabled {
  cursor: wait;
  opacity: 0.66;
}

.analysis-panel {
  width: 100%;
  padding: 24px;
  border-radius: 22px;
  background: #090909;
  box-shadow: 0 26px 78px rgba(0, 0, 0, 0.34);
  text-align: left;
}

.analysis-channel-card {
  min-height: 104px;
  margin-bottom: 26px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.analysis-channel-card .channel-avatar {
  width: 64px;
  height: 64px;
}

.analysis-channel-card strong,
.analysis-channel-card p {
  display: block;
}

.analysis-channel-card strong {
  color: white;
  font-size: 18px;
}

.analysis-channel-card p {
  margin: 6px 0 0;
  color: #8f8f87;
  font-size: 14px;
  font-weight: 850;
}

.analysis-field,
.analysis-group {
  display: block;
  margin-bottom: 34px;
}

.analysis-field span,
.analysis-label {
  display: block;
  margin: 0 0 10px;
  color: #aebdda;
  font-size: 14px;
  font-weight: 950;
}

.analysis-field textarea {
  width: 100%;
  min-height: 108px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  outline: 0;
  resize: vertical;
  color: white;
  background: #090909;
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 750;
}

.chip-box {
  min-height: 70px;
  padding: 12px 74px 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  position: relative;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analysis-chip {
  max-width: 100%;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #050505;
  background: white;
  font-size: 14px;
  font-weight: 750;
}

.analysis-chip button,
.chip-clear,
.chip-menu {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 950;
}

.analysis-chip button {
  color: #111;
  line-height: 1;
}

.chip-clear,
.chip-menu {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 22px;
}

.chip-clear {
  right: 54px;
}

.chip-menu {
  right: 22px;
  color: #a0a098;
}

.complete-step {
  width: min(780px, 100%);
}

.complete-stack {
  margin-top: 28px;
  display: grid;
  gap: 24px;
}

.complete-channel-card,
.complete-action-card {
  min-height: 100px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  color: white;
  background: #090909;
  text-align: left;
}

.complete-channel-card {
  grid-template-columns: auto minmax(0, 1fr);
}

.complete-channel-card .channel-avatar {
  width: 66px;
  height: 66px;
}

.complete-channel-card strong,
.complete-channel-card p,
.complete-action-card strong,
.complete-action-card em {
  display: block;
}

.complete-channel-card strong,
.complete-action-card strong {
  font-size: 17px;
  line-height: 1.25;
}

.complete-channel-card p {
  margin: 6px 0 0;
  color: #909089;
  font-size: 14px;
  font-weight: 850;
}

.complete-action-card em {
  margin-top: 8px;
  color: white;
  font-style: normal;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 750;
}

.complete-action-card b {
  font-size: 26px;
  font-weight: 700;
}

.complete-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-size: 24px;
  font-weight: 950;
}

.success-icon {
  background: #18bd70;
  box-shadow: 0 0 0 16px rgba(24, 189, 112, 0.22);
}

.lock-icon {
  background: #1478e9;
  box-shadow: 0 0 0 16px rgba(20, 120, 233, 0.24);
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  display: none;
}

.confetti-canvas.active {
  display: block;
}

.competitor-card {
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 14px;
  color: white;
  background: #0b0b0b;
  text-align: left;
  cursor: pointer;
}

.competitor-card.selected {
  border-color: rgba(255, 31, 31, 0.76);
  background: rgba(255, 31, 31, 0.08);
}

.competitor-avatar {
  width: 56px;
  height: 56px;
}

.competitor-copy {
  min-width: 0;
}

.competitor-copy strong,
.competitor-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.competitor-copy strong {
  font-size: 16px;
}

.competitor-copy em {
  margin-top: 6px;
  color: #85857d;
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.competitor-card small {
  color: #76766f;
  font-size: 11px;
  font-weight: 900;
}

.competitor-card b {
  width: 20px;
  height: 20px;
  border: 2px solid white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
}

.why-box {
  margin: 24px 0 0;
  padding: 22px 18px;
  border-radius: 18px;
  color: #0700c8;
  background: #edf3ff;
  text-align: left;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 650;
  position: relative;
  z-index: 1;
}

.why-box strong {
  font-weight: 950;
}

.setup-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 88px;
  padding: 18px min(10vw, 120px);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(9, 9, 9, 0.94);
  backdrop-filter: blur(18px);
}

.setup-footer a {
  grid-column: 2;
  color: #77776f;
  font-size: 13px;
  font-weight: 900;
  text-decoration: underline;
}

.setup-footer a[hidden] {
  display: none;
}

.previous-step {
  grid-column: 1;
  justify-self: start;
  min-width: 88px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 12px;
  color: white;
  background: transparent;
  font-weight: 950;
  cursor: pointer;
}

.next-step {
  grid-column: 3;
  justify-self: end;
  min-width: 72px;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  color: #060606;
  background: white;
  font-weight: 950;
  cursor: pointer;
}

.next-step:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.next-step.saved {
  color: white;
  background: var(--green);
}

@media (max-width: 780px) {
  .setup-steps {
    gap: 18px;
  }

  .setup-steps::before,
  .setup-steps::after {
    width: 54px;
  }

  .setup-steps::before {
    left: 28%;
  }

  .setup-steps::after {
    right: 28%;
  }

  .selected-slots,
  .competitor-list {
    grid-template-columns: 1fr;
  }

  .competitor-list {
    max-height: none;
    overflow: visible;
  }

  .competitor-card {
    grid-template-columns: 50px minmax(0, 1fr) 22px;
  }

  .competitor-card small {
    display: none;
  }
}

@media (max-width: 560px) {
  .setup-page {
    padding: 18px 12px 144px;
  }

  .setup-brand {
    margin-bottom: 34px;
  }

  .setup-steps {
    margin-bottom: 48px;
    font-size: 13px;
  }

  .connected-channel {
    width: 100%;
    border-radius: 18px;
  }

  .setup-section > p {
    font-size: 15px;
  }

  .competition-panel,
  .channel-panel,
  .analysis-panel {
    padding: 22px 14px;
  }

  .selected-header,
  .recommendation-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .setup-footer {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 12px;
  }

  .setup-footer a,
  .previous-step,
  .next-step {
    grid-column: auto;
    justify-self: stretch;
  }

  .analysis-channel-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .chip-box {
    padding-right: 48px;
  }

  .chip-clear {
    right: 34px;
  }

  .chip-menu {
    right: 12px;
  }

  .complete-channel-card,
  .complete-action-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .complete-action-card b {
    display: none;
  }
}
