@font-face {
  font-family: HpSans;
  src: url("/pic/_files/static/fonts/Sans.48d656e.ttf");
}

@font-face {
  font-family: Alimama;
  src: url("/pic/_files/static/fonts/AlimamaShuHeiTi.98a341c.ttf");
}

:root {
  --page-bg: #f3f6fb;
  --card-bg: #ffffff;
  --text: #17181a;
  --muted: #6d7480;
  --line: #e8edf4;
  --blue: #1979ff;
  --green: #18b77b;
  --red: #ef4d4d;
  --shadow: 0 10px 28px rgba(27, 69, 126, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #dfe6ef;
  color: var(--text);
  font-family: HpSans, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  color: inherit;
  font: inherit;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.phone-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  background: #f2f6fa;
}

.view {
  display: none;
  min-height: 100vh;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.view.is-active {
  display: block;
}

.connect-view {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #f6f8fb url("/pic/_files/static/img/topBg.9a78ecd.jpg") top center / 100% auto no-repeat;
}

.connect-visual {
  position: relative;
  height: 56vh;
  min-height: 388px;
}

.connect-logo {
  position: absolute;
  left: 50%;
  top: 112px;
  width: min(78vw, 330px);
  transform: translateX(-50%);
  opacity: 0.9;
}

.connect-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(76px + env(safe-area-inset-bottom));
  padding: 0 40px;
  text-align: center;
}

.connect-panel h1 {
  margin: 0 0 62px;
  color: #101214;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
}

.connect-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: center;
  gap: 26px;
}

.connect-progress-track {
  position: relative;
  height: 9px;
  border-radius: 999px;
  background: #d7e6fb;
}

.connect-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #2996ff;
}

.connect-progress-knob {
  position: absolute;
  left: 0%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border-radius: 50%;
  background: #1d82ff;
  box-shadow: 0 4px 12px rgba(29, 130, 255, 0.22);
  transform: translate(-50%, -50%);
}

.connect-progress-knob img {
  width: 28px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.connect-percent {
  color: #2b96ff;
  font-size: 20px;
  font-weight: 800;
  text-align: left;
}

.connect-copy,
.connect-tip {
  margin: 0;
  color: #9aa1ad;
  font-size: 18px;
  line-height: 1.75;
}

.connect-copy {
  margin-top: 40px;
}

.connect-copy span,
.connect-tip span {
  color: #258cff;
}

.hero {
  position: relative;
  min-height: 208px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  padding: calc(42px + env(safe-area-inset-top)) 26px 42px;
}

.connected-label {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  font-weight: 600;
}

.device-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  min-width: 214px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 26px rgba(0, 60, 140, 0.16);
}

.device-card img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
}

.device-card strong,
.device-card span {
  display: block;
}

.device-card strong {
  font-size: 16px;
}

.device-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.home-content {
  position: relative;
  z-index: 1;
  margin-top: -10px;
  padding: 0 15px calc(136px + env(safe-area-inset-bottom));
}

.feature-card {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 100px;
  margin-bottom: 12px;
  padding: 20px 148px 18px 18px;
  text-align: left;
  border-radius: 10px;
  background-color: var(--card-bg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-shadow: 0 8px 22px rgba(42, 74, 120, 0.08);
}

.feature-card img {
  display: none;
}

.feature-file {
  background-image: url("/pic/_files/static/img/simple-cast-file-bg.720fbff.png");
}

.feature-url {
  background-image: url("/pic/_files/static/img/simple-cast-url-bg.3b5a383.png");
}

.feature-photo {
  background-image: url("/pic/_files/static/img/simple-cast-photo-bg.7ecabe5.png");
}

.feature-card strong,
.feature-card small,
.mini-card strong,
.mini-card small {
  display: block;
}

.feature-card strong {
  margin-bottom: 7px;
  font-size: 18px;
  font-weight: 800;
}

.feature-card small {
  color: #7a828f;
  font-size: 12px;
  line-height: 1.45;
}

.section-title {
  margin: 24px 2px 13px;
  font-size: 18px;
  font-weight: 800;
}

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

.mini-card {
  min-height: 124px;
  padding: 12px 8px 10px;
  text-align: left;
  border-radius: 10px;
  background-color: var(--card-bg);
  background-position: center top;
  background-repeat: no-repeat;
  background-size: 100% auto;
  box-shadow: 0 8px 22px rgba(42, 74, 120, 0.08);
}

.mini-card img {
  display: none;
}

.mini-share {
  background-image: url("/pic/_files/static/img/shareBg.14e3d5f.png");
}

.mini-cloud {
  background-image: url("/pic/_files/static/img/simple-cast-cloud-bg.58c6265.png");
}

.mini-friend {
  background-image: url("/pic/_files/static/img/simple-cast-to-friednd-bg.0fb09b6.png");
}

.mini-card strong {
  display: block;
  margin-top: 56px;
  font-size: 15px;
  font-weight: 800;
}

.mini-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.wx-footer {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 430px);
  min-height: 112px;
  margin: 0;
  padding: 18px 22px 16px;
  border-radius: 0 0 18px 18px;
  background: #fff;
  box-shadow: 0 -8px 28px rgba(45, 78, 120, 0.08);
  transform: translateX(-50%);
}

.wx-footer-copy {
  min-width: 0;
  text-align: left;
}

.wx-footer-copy strong,
.wx-footer-copy span,
.wx-footer-qr span {
  display: block;
}

.wx-footer-copy strong {
  color: #24282e;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

.wx-footer-copy span {
  margin-top: 14px;
  color: #4b5159;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.wx-footer-qr {
  flex: 0 0 auto;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.wx-footer-qr span {
  color: #a0a7b2;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.wx-footer-qr img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.picker-view {
  position: relative;
  min-height: 100vh;
  padding: calc(20px + env(safe-area-inset-top)) 24px calc(30px + env(safe-area-inset-bottom));
  overflow: hidden;
  background: linear-gradient(180deg, #dcedff 0%, #eef7ff 58%, #ffffff 100%);
}

.back-button {
  position: relative;
  width: 44px;
  height: 44px;
  background: transparent;
}

.back-button::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 9px;
  width: 20px;
  height: 20px;
  border-left: 4px solid #14171c;
  border-bottom: 4px solid #14171c;
  transform: rotate(45deg);
}

.wx-menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-self: end;
  width: 102px;
  height: 39px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  color: #111;
  box-shadow: inset 0 0 0 1px rgba(60, 100, 150, 0.05);
}

.wx-menu span {
  display: block;
  text-align: center;
  font-size: 25px;
  line-height: 1;
  transform: translateY(-3px);
}

.wx-menu i {
  display: block;
  width: 25px;
  height: 25px;
  margin: 0 auto;
  border: 5px solid #111;
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.8);
}

.picker-import-card {
  position: absolute;
  left: 50%;
  top: calc(182px + env(safe-area-inset-top));
  width: min(72vw, 320px);
  transform: translateX(-50%);
  pointer-events: none;
}

.picker-import-card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.picker-actions {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: calc(56px + env(safe-area-inset-bottom));
  display: grid;
  gap: 20px;
}

.album-button {
  width: 100%;
  min-height: 60px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0;
}

.album-primary {
  background: #1d79ff;
  color: #fff;
  box-shadow: 0 10px 24px rgba(29, 121, 255, 0.2);
}

.album-chat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(213, 237, 229, 0.78);
  color: #21a45c;
}

.album-chat img {
  width: 35px;
  height: 29px;
  object-fit: contain;
  flex: 0 0 auto;
}

.album-chat span {
  display: block;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sending-view {
  position: relative;
  min-height: 100vh;
  padding: calc(38px + env(safe-area-inset-top)) 24px calc(124px + env(safe-area-inset-bottom));
  background: #fff;
}

.preview-view {
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(28px + env(safe-area-inset-bottom));
  background: #000;
}

.icon-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  font-size: 25px;
  line-height: 34px;
}

.send-list {
  display: grid;
  gap: 24px;
  margin-top: 26px;
}

.cast-file-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 16px;
  min-height: 50px;
}

.cast-file-icon {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 9px;
  background: linear-gradient(135deg, #7b39ff 0%, #b547ff 100%);
}

.cast-file-icon::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 12px;
  width: 19px;
  height: 19px;
  border: 3px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
}

.cast-file-icon::after {
  content: "";
  position: absolute;
  left: 21px;
  top: 18px;
  border-left: 7px solid rgba(255, 255, 255, 0.82);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.cast-file-main {
  position: relative;
  min-width: 0;
}

.cast-file-main strong {
  display: block;
  overflow: hidden;
  max-width: 100%;
  color: #111418;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cast-file-time {
  display: block;
  margin-top: 9px;
  color: #9aa2af;
  font-size: 14px;
}

.cast-progress {
  display: inline-block;
  width: min(152px, 45vw);
  height: 4px;
  margin-top: 15px;
  overflow: hidden;
  border-radius: 999px;
  background: #e1e5ea;
  vertical-align: middle;
}

.cast-progress i {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: #1f7cff;
}

.cast-progress-text {
  display: inline-block;
  margin-left: 8px;
  color: #9aa2af;
  font-size: 16px;
  vertical-align: -5px;
}

.cast-file-status {
  color: #a5adba;
  font-size: 17px;
  white-space: nowrap;
}

.cast-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 24px calc(38px + env(safe-area-inset-bottom));
  border-top: 1px solid #edf0f4;
  background: rgba(255, 255, 255, 0.98);
}

.cast-action-button {
  width: 100%;
  min-height: 60px;
  border-radius: 8px;
  background: #1f7cff;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.cast-action-button.is-muted {
  background: #86baff;
}

.cast-action-button:disabled {
  cursor: default;
}

.casting-view {
  position: relative;
  min-height: 100vh;
  padding: 0 0 calc(176px + env(safe-area-inset-bottom));
  background: #000;
  color: #fff;
}

.casting-back {
  position: relative;
  width: 44px;
  height: 44px;
  background: transparent;
}

.casting-back::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 10px;
  width: 18px;
  height: 18px;
  border-left: 4px solid #fff;
  border-bottom: 4px solid #fff;
  transform: rotate(45deg);
}

.power-button {
  position: relative;
  width: 44px;
  height: 44px;
  background: transparent;
}

.power-button::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 9px;
  width: 26px;
  height: 26px;
  border: 4px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
}

.power-button::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 4px;
  width: 4px;
  height: 21px;
  border-radius: 2px;
  background: #fff;
}

.wx-menu.dark {
  background: rgba(11, 11, 12, 0.56);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.wx-menu.dark i {
  border-color: #fff;
  box-shadow: inset 0 0 0 5px #000;
}

.casting-stage {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: calc(224px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
}

.casting-media {
  display: block;
  width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #050505;
}

.casting-media:is(img) {
  height: 100%;
}

.casting-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(30px + env(safe-area-inset-bottom));
  padding: 0 16px;
}

.casting-footer p {
  margin: 0 0 24px 4px;
  font-size: 19px;
  color: #fff;
}

.casting-footer p span {
  color: #1f6fff;
  margin: 0 6px;
}

.casting-strip {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 86px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.casting-thumb,
.casting-add {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border-radius: 6px;
  background: #272727;
}

.casting-thumb {
  padding: 0;
  border: 3px solid transparent;
}

.casting-thumb.is-active {
  border-color: #1979ff;
  box-shadow: 0 0 0 1px #1979ff;
}

.casting-thumb img,
.casting-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.casting-add {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 50px;
  line-height: 1;
}

.media-dialog {
  width: min(94vw, 430px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #000;
}

.media-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

#dialogBody img,
#dialogBody video {
  display: block;
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (max-width: 360px) {
  .connect-logo {
    top: 100px;
    width: min(78vw, 280px);
  }

  .connect-visual {
    min-height: 340px;
  }

  .connect-panel {
    bottom: calc(54px + env(safe-area-inset-bottom));
    padding: 0 32px;
  }

  .connect-panel h1 {
    margin-bottom: 48px;
    font-size: 20px;
  }

  .connect-progress-row {
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 20px;
  }

  .connect-copy,
  .connect-tip {
    font-size: 16px;
  }

  .feature-card {
    min-height: 90px;
  }

  .home-content {
    padding-bottom: calc(126px + env(safe-area-inset-bottom));
  }

  .wx-footer {
    min-height: 104px;
    padding: 16px 16px 14px;
  }

  .wx-footer-copy strong {
    font-size: 18px;
  }

  .wx-footer-copy span {
    margin-top: 10px;
    font-size: 13px;
  }

  .wx-footer-qr span {
    font-size: 12px;
  }

  .wx-footer-qr img {
    width: 68px;
    height: 68px;
  }

  .feature-card img {
    width: 62px;
    height: 56px;
  }

  .mini-card {
    min-height: 122px;
  }

  .picker-view {
    padding-left: 18px;
    padding-right: 18px;
  }

  .wx-menu {
    width: 86px;
  }

  .picker-actions {
    left: 18px;
    right: 18px;
    gap: 14px;
  }

  .picker-import-card {
    top: calc(166px + env(safe-area-inset-top));
    width: min(72vw, 260px);
  }

  .album-button {
    min-height: 54px;
    font-size: 17px;
  }

  .sending-view {
    padding-left: 18px;
    padding-right: 18px;
  }

  .cast-file-row {
    grid-template-columns: 42px minmax(0, 1fr) max-content;
    gap: 11px;
  }

  .cast-file-icon {
    width: 40px;
    height: 40px;
  }

  .cast-file-main strong {
    font-size: 16px;
  }

  .cast-file-status {
    font-size: 14px;
  }

  .cast-bottom {
    padding-left: 18px;
    padding-right: 18px;
  }

  .cast-action-button {
    min-height: 54px;
    font-size: 17px;
  }
}
