/* 破烂之王 · 风游汇网页版外壳样式
   竖屏游戏：手机上铺满屏幕；桌面上按 750:1334 的比例居中显示，两侧用门户同款深底 #07080c。 */
html {
  -ms-touch-action: none;
  background: #07080c;
}

body, canvas, div {
  display: block;
  outline: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  user-select: none;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

body {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  margin: 0;
  cursor: default;
  color: #c9c6bd;
  background-color: #07080c;
  text-align: center;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Helvetica, Arial, sans-serif;
  overflow: hidden;
}

/* 游戏画面容器：高度占满，宽度不超过 高×750/1334，水平居中 */
#GameDiv {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  height: 100%;
  width: 100%;
  max-width: calc(100vh * 0.5622);
  transform: translateX(-50%);
  background: #07080c;
  overflow: hidden;
}

#Cocos2dGameContainer {
  position: absolute;
  margin: 0;
  left: 0px;
  top: 0px;
  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: center;
  -webkit-box-pack: center;
}

canvas {
  background-color: rgba(0, 0, 0, 0);
}

/* 引擎加载前的启动页：深底 + 黑金头图 + 金色进度条 */
#splash {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #07080c center 28%/cover no-repeat;
  background-image:
    linear-gradient(180deg, rgba(7,8,12,.35) 0%, rgba(7,8,12,.72) 42%, #07080c 78%),
    url("https://www.fengyouhui.cn/static/page/banner-polan.jpg?v=1");
  display: none;
}

.splash-brand {
  position: absolute;
  left: 0;
  right: 0;
  top: 38%;
  transform: translateY(-50%);
}

.splash-title {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 6px;
  color: #e2b657;
  text-shadow: 0 2px 12px rgba(226, 182, 87, 0.25);
}

.splash-sub {
  margin-top: 14px;
  font-size: 14px;
  letter-spacing: 4px;
  color: #8f8b80;
}

.progress-bar {
  position: absolute;
  left: 24%;
  top: 62%;
  height: 4px;
  width: 52%;
  border-radius: 4px;
  background: #1c1d24;
  box-shadow: 0 0 0 1px #262730;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 4px;
  transition: width .3s ease-out;
  background: linear-gradient(90deg, #b88a2f, #e2b657, #f3d690);
}

.splash-hint {
  position: absolute;
  left: 0;
  right: 0;
  top: 62%;
  margin-top: 16px;
  font-size: 12px;
  letter-spacing: 2px;
  color: #6f6c64;
}

/* 风游汇通行证胶囊：深底金边。位置由页面脚本按桌面 / 手机计算，脚本定位前先不显示。 */
.fyh-pass {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 60;
  display: inline-block;
  visibility: hidden;
  height: 26px;
  padding: 0 11px 0 22px;
  border-radius: 13px;
  background: rgba(7, 8, 12, 0.86);
  border: 1px solid #b88a2f;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(226, 182, 87, 0.14);
  color: #e2b657;
  font-size: 12px;
  line-height: 24px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.fyh-pass::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-radius: 50%;
  background: #6f6c64;
}

.fyh-pass.is-login {
  color: #f3e7c6;
}

.fyh-pass.is-login::before {
  background: #e2b657;
  box-shadow: 0 0 6px rgba(226, 182, 87, 0.8);
}

.fyh-pass.is-syncing::before {
  background: #f3d690;
  animation: fyh-blink 1s infinite;
}

@keyframes fyh-blink {
  50% { opacity: 0.25; }
}

@media (max-width: 420px) {
  .fyh-pass {
    height: 24px;
    line-height: 22px;
    font-size: 11px;
    padding: 0 9px 0 20px;
  }
  .fyh-pass::before {
    left: 8px;
    width: 6px;
    height: 6px;
    margin-top: -3px;
  }
}

/* 风币购买弹框：DOM 覆层，黑金配色，手机和电脑都居中；盖在画布之上，点不到下面的游戏 */
.fyh-box {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(7, 8, 12, 0.72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.fyh-box-card {
  width: 100%;
  max-width: 340px;
  box-sizing: border-box;
  padding: 22px 20px 18px;
  border-radius: 16px;
  background: rgba(22, 18, 12, 0.95);
  border: 1px solid rgba(240, 212, 138, 0.4);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(240, 212, 138, 0.08);
  color: #f3e9d2;
  text-align: center;
}

.fyh-box-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 1px;
  color: #f0d48a;
}

.fyh-box-text {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: #d8cdb3;
}

.fyh-box-text.is-price {
  font-size: 16px;
  color: #f3e9d2;
}

.fyh-box-btns {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.fyh-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.fyh-btn-gold {
  background: linear-gradient(180deg, #f0d48a, #c4923a);
  color: #2a1b08;
  box-shadow: 0 4px 14px rgba(196, 146, 58, 0.35);
}

.fyh-btn-line {
  background: transparent;
  color: #e8d7ad;
  border-color: rgba(240, 212, 138, 0.4);
}

.fyh-btn[disabled] {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

/* 扣费结果 / 出错的小提示 */
.fyh-toast {
  position: fixed;
  left: 50%;
  bottom: 14%;
  z-index: 95;
  display: none;
  max-width: 86vw;
  padding: 9px 16px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(7, 8, 12, 0.9);
  border: 1px solid rgba(240, 212, 138, 0.4);
  color: #f3e9d2;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
