* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #03070d;
  color: #f4f8ff;
  font-family: Arial, Helvetica, sans-serif;
}

[hidden] {
  display: none !important;
}

.receiver-shell {
  position: relative;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  width: 100%;
  min-height: 100vh;
  padding: 5vh 6vw;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  background: #07111f;
  background: radial-gradient(circle at 50% 15%, rgba(45, 129, 247, 0.2), transparent 38%), linear-gradient(145deg, #07111f 0%, #0d1a2b 55%, #081321 100%);
}

.cast-video {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: none;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.receiver-shell--streaming .cast-video {
  display: block;
}

.receiver-card {
  position: relative;
  z-index: 2;
  width: 760px;
  max-width: 92vw;
  padding: 30px 44px 28px;
  text-align: center;
  background: #0c1b2d;
  background: rgba(12, 27, 45, 0.96);
  border: 1px solid rgba(143, 183, 233, 0.22);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.36);
}

.receiver-shell--streaming .receiver-note {
  opacity: 0;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: #87baff;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.receiver-summary {
  max-width: 660px;
  margin: 14px auto 22px;
  color: #b8c8db;
  font-size: 24px;
  line-height: 1.4;
}

.pairing-panel {
  margin: 2px auto 0;
}

.pairing-qr {
  display: block;
  width: 560px;
  height: 560px;
  margin: 0 auto 16px;
  background: #ffffff;
  border-radius: 12px;
  image-rendering: pixelated;
}

.manual-code {
  margin: 0;
  color: #ffffff;
  font-family: "Courier New", Courier, monospace;
  font-size: 64px;
  font-weight: bold;
  line-height: 1.15;
  letter-spacing: 0.09em;
  text-shadow: 0 0 26px rgba(111, 176, 255, 0.34);
}

.join-store-note {
  margin-top: 26px;
  margin-bottom: 10px;
}

.join-links {
  margin: 0;
}

.join-link {
  display: inline-block;
  margin: 0 6px;
  padding: 13px 26px;
  color: #f4f8ff;
  font-size: 20px;
  font-weight: bold;
  text-decoration: none;
  background: #2f7bf0;
  border-radius: 22px;
}

.receiver-status {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  margin-top: 22px;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  color: #a9b9cc;
  font-size: 22px;
}

.receiver-status__dot {
  width: 12px;
  height: 12px;
  margin-right: 11px;
  background: #f0bd5c;
  border-radius: 50%;
}

.sound-prompt {
  margin: 10px 0 0;
  color: #d3e5fa;
  font-size: 20px;
  line-height: 1.35;
}

.receiver-shell--waiting .receiver-status__dot,
.receiver-shell--negotiating .receiver-status__dot {
  background: #5ca8f0;
  box-shadow: 0 0 16px rgba(92, 168, 240, 0.55);
}

.receiver-shell--connected .receiver-status__dot {
  background: #5ed79d;
  box-shadow: 0 0 16px rgba(94, 215, 157, 0.55);
}

.receiver-shell--error .receiver-status__dot,
.receiver-shell--stopped .receiver-status__dot {
  background: #ef7777;
}

.receiver-note {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 20px 0 0;
  color: #6f8299;
  font-size: 20px;
  line-height: 1.4;
  text-align: center;
}

@media (max-height: 950px) {
  .receiver-shell {
    padding: 20px 24px;
  }

  .receiver-card {
    width: 700px;
    padding: 22px 40px 20px;
  }

  .eyebrow {
    margin-bottom: 7px;
    font-size: 18px;
  }

  h1 {
    font-size: 42px;
  }

  .receiver-summary {
    margin-top: 8px;
    margin-bottom: 14px;
    font-size: 22px;
    line-height: 1.35;
  }

  .manual-code {
    font-size: 58px;
  }

  .pairing-qr {
    width: 470px;
    height: 470px;
    margin-bottom: 12px;
  }

  .receiver-status {
    margin-top: 14px;
    font-size: 21px;
  }

  .receiver-note {
    margin-top: 14px;
    font-size: 19px;
  }
}

@media (max-height: 800px) {
  .receiver-shell {
    padding: 16px 24px;
  }

  .receiver-card {
    width: 640px;
    padding: 15px 30px 14px;
  }

  .eyebrow {
    margin-bottom: 5px;
    font-size: 17px;
  }

  h1 {
    font-size: 38px;
  }

  .receiver-summary {
    margin-top: 5px;
    margin-bottom: 10px;
    font-size: 20px;
    line-height: 1.35;
  }

  .manual-code {
    font-size: 52px;
  }

  .pairing-qr {
    width: 380px;
    height: 380px;
    margin-bottom: 8px;
  }

  .receiver-status {
    margin-top: 10px;
    font-size: 20px;
  }

  .receiver-note {
    margin-top: 10px;
    font-size: 18px;
  }

  .sound-prompt,
  .fullscreen-hint {
    font-size: 18px;
  }
}

@media (max-width: 700px) {
  .receiver-shell {
    padding: 22px;
  }

  .receiver-card {
    width: 560px;
    max-width: 88vw;
    padding: 28px 32px 26px;
  }

  .eyebrow {
    font-size: 14px;
  }

  h1 {
    font-size: 32px;
  }

  .receiver-summary {
    margin-top: 12px;
    margin-bottom: 20px;
    font-size: 17px;
  }

  .manual-code {
    font-size: 42px;
  }

  .pairing-qr {
    width: 278px;
    height: 278px;
    margin-bottom: 10px;
  }

  .receiver-status {
    font-size: 16px;
  }

  .receiver-note {
    font-size: 14px;
  }
}

.receiver-shell--streaming .receiver-card {
  display: none;
}

.receiver-shell--streaming .sound-prompt {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 8px 12px;
  text-align: center;
  background: rgba(7, 17, 31, 0.78);
  border-radius: 8px;
}

.fullscreen-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  z-index: 3;
  margin: 0;
  padding: 10px 14px;
  color: #f4f8ff;
  font-size: 20px;
  text-align: center;
  background: rgba(7, 17, 31, 0.82);
  border-radius: 8px;
  pointer-events: none;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
}
