/* =============================================================================
 * 启动界面（加载页）样式
 * 说明：引擎自带样式在 style-mobile.25fc5.css 里，本文件在它之后加载，用于覆盖
 *      #splash 的外观，并提供自研的加载界面 / 广告调试面板。
 * 配色取自游戏画面：青绿底 + 橙黄高亮。
 * ========================================================================== */

:root {
  --shell-bg-1: #5fbdd3;
  --shell-bg-2: #7fd2e0;
  --shell-bg-3: #3f9fb8;
  --shell-accent: #ffc53d;
  --shell-accent-deep: #f2a20c;
  --shell-ink: #0f5f74;
  --shell-white: #ffffff;
  --shell-safe-top: env(safe-area-inset-top, 0px);
  --shell-safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--shell-bg-2);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* 引擎的 style-mobile.25fc5.css 里有 `div { display: block }`，
   作者样式优先级高于浏览器默认的 [hidden]{display:none}，会把 hidden 属性顶掉，
   所以这里必须显式补一条。 */
[hidden] {
  display: none !important;
}

/* 引擎的 #splash 只当进度来源用，外观全部隐藏 */
#splash {
  background: transparent !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ---------------------------------------------------------------- 加载界面 */
#shell {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: calc(28px + var(--shell-safe-top)) 24px calc(22px + var(--shell-safe-bottom));
  box-sizing: border-box;
  color: var(--shell-white);
  background:
    radial-gradient(120% 80% at 50% 0%, var(--shell-bg-2) 0%, var(--shell-bg-1) 45%, var(--shell-bg-3) 100%);
  overflow: hidden;
  transition: opacity .42s ease;
}

/* 背景菱形纹理，和游戏里的底图呼应 */
#shell::before {
  content: "";
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, .07) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .07) 75%),
    linear-gradient(45deg, rgba(255, 255, 255, .07) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, .07) 75%);
  background-size: 64px 64px;
  background-position: 0 0, 32px 32px;
  animation: shell-drift 24s linear infinite;
  pointer-events: none;
}
@keyframes shell-drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(64px, 64px, 0); }
}

#shell.shell-hide {
  opacity: 0;
  pointer-events: none;
}

/* ------------------------------------------------------------------ 品牌区 */
.shell-brand {
  position: relative;
  margin-top: 8vh;
  text-align: center;
}

.shell-title {
  font-size: clamp(34px, 11vw, 54px);
  font-weight: 900;
  letter-spacing: 4px;
  line-height: 1.15;
  color: var(--shell-accent);
  text-shadow:
    -2px -2px 0 rgba(255, 255, 255, .95), 2px -2px 0 rgba(255, 255, 255, .95),
    -2px 2px 0 rgba(255, 255, 255, .95), 2px 2px 0 rgba(255, 255, 255, .95),
    0 6px 14px rgba(15, 95, 116, .45);
}

.shell-subtitle {
  margin-top: 14px;
  font-size: clamp(12px, 3.4vw, 15px);
  letter-spacing: 3px;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 2px 6px rgba(15, 95, 116, .5);
}

/* ------------------------------------------------------------------ 进度条 */
.shell-loading {
  position: relative;
  width: min(78vw, 380px);
  margin-bottom: 4px;
}

.shell-track {
  position: relative;
  height: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .3);
  box-shadow: inset 0 2px 5px rgba(15, 95, 116, .35), 0 1px 0 rgba(255, 255, 255, .35);
  overflow: hidden;
}

.shell-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffd977 0%, var(--shell-accent) 55%, var(--shell-accent-deep) 100%);
  box-shadow: 0 0 12px rgba(255, 197, 61, .75);
  transition: width .35s ease-out;
}

.shell-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .35) 25%, transparent 25%,
                    transparent 50%, rgba(255, 255, 255, .35) 50%, rgba(255, 255, 255, .35) 75%,
                    transparent 75%);
  background-size: 22px 22px;
  animation: shell-stripes 1s linear infinite;
}
@keyframes shell-stripes {
  from { background-position: 0 0; }
  to   { background-position: 44px 0; }
}

.shell-progress-text {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, .95);
  text-shadow: 0 2px 5px rgba(15, 95, 116, .5);
}

.shell-progress-text b {
  font-weight: 700;
  color: var(--shell-white);
}

/* ------------------------------------------------------------------ 提示语 */
.shell-tip {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  max-width: 92vw;
  text-align: center;
  font-size: clamp(12px, 3.3vw, 14px);
  line-height: 1.8;
  color: rgba(255, 255, 255, .95);
  text-shadow: 0 2px 6px rgba(15, 95, 116, .55);
  transition: opacity .3s ease;
}

.shell-tip em {
  font-style: normal;
  display: inline-block;
  padding: 2px 8px;
  margin-right: 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .22);
  font-size: 12px;
  white-space: nowrap;
  vertical-align: middle;
}

/* ------------------------------------------------------------------- 页脚 */
.shell-footer {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.shell-age {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #1c8f4a;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
}
.shell-age b { font-size: 20px; }
.shell-age i { font-style: normal; font-size: 8px; margin-top: 2px; opacity: .9; }

.shell-notice {
  flex: 1 1 auto;
  text-align: right;
  font-size: 10px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .8);
  text-shadow: 0 1px 4px rgba(15, 95, 116, .45);
}

/* --------------------------------------------------------------- 广告状态 */
.shell-adpill {
  position: fixed;
  top: calc(10px + var(--shell-safe-top));
  right: 10px;
  z-index: 19;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  background: rgba(15, 95, 116, .42);
  color: #fff;
  font-size: 11px;
  letter-spacing: .5px;
  opacity: .75;
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.shell-adpill:active { opacity: 1; }

.shell-adpanel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
  width: min(86vw, 340px);
  max-height: 76vh;
  overflow: auto;
  padding: 16px 16px 18px;
  border-radius: 14px;
  background: #10333d;
  color: #eaf6f9;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  font-size: 12px;
  line-height: 1.7;
}

.shell-adpanel h3 {
  margin: 0 0 10px;
  font-size: 14px;
  letter-spacing: 1px;
}

.shell-adpanel table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
}
.shell-adpanel td {
  padding: 3px 0;
  vertical-align: top;
  word-break: break-all;
}
.shell-adpanel td:first-child {
  width: 40%;
  color: #8fb9c4;
}

.shell-adpanel button {
  flex: 1 1 0;
  padding: 9px 10px;
  margin: 4px 3px 0;
  border: 0;
  border-radius: 10px;
  background: var(--shell-accent);
  color: #4a3100;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.shell-adpanel button.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .35);
  color: #cfe8ee;
  font-weight: 400;
}
.shell-adpanel .row { display: flex; }

.shell-adpanel-mask {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgba(0, 0, 0, .55);
}

/* 横屏时收紧一些间距 */
@media (orientation: landscape) and (max-height: 480px) {
  .shell-brand { margin-top: 2vh; }
  .shell-title { font-size: 30px; }
  .shell-footer { display: none; }
}
