/* 街机捕鱼 - 网页版样式 */
* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #04121f; }

/* 舞台：固定 1280x720 设计分辨率，整体缩放适配窗口 */
#stage {
  position: absolute; left: 50%; top: 50%;
  width: 1280px; height: 720px;
  transform-origin: center center;
}
#game { position: absolute; left: 0; top: 0; }

/* ---------- 通用 ---------- */
.hidden { display: none !important; }

.wood-btn {
  font-family: "Microsoft YaHei", sans-serif;
  font-weight: bold; color: #5a3413;
  background: url("../assets/ui/ui_fish_start1.png") center / 100% 100% no-repeat;
  border: none; cursor: pointer; text-align: center;
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
  transition: transform .08s;
}
.wood-btn:hover { transform: scale(1.05); filter: brightness(1.1); }
.wood-btn:active { transform: scale(.97); }
.wood-btn.big { width: 300px; height: 104px; font-size: 30px; line-height: 96px; }
.wood-btn.small {
  width: 200px; height: 76px; font-size: 20px; line-height: 70px;
  color: #fff; text-shadow: 0 2px 3px #000;
}

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; }
#hud.show { opacity: 1; }
#hud > * { pointer-events: auto; }

.btn-icon {
  position: absolute; width: 64px; height: 64px; cursor: pointer;
  background-size: 100% 100%; transition: transform .08s;
}
.btn-icon:hover { transform: scale(1.08); }
#btnBack { left: 14px; top: 12px; background-image: url("../assets/ui/ui_fish_back1.png"); }
#btnSetting { right: 14px; top: 12px; background-image: url("../assets/ui/ui_fish_set up1.png"); }

.btn-round {
  position: absolute; width: 60px; height: 60px; cursor: pointer; z-index: 5;
  background-size: 100% 100%; transition: transform .08s;
}
.btn-round:hover { transform: scale(1.12); }
#btnGunUp { left: calc(50% - 160px); bottom: 12px; background-image: url("../assets/ui/ui_fish_jia1.png"); }
#btnGunDown { left: calc(50% + 100px); bottom: 12px; background-image: url("../assets/ui/ui_fish_jian1.png"); }

/* 金币/等级面板 */
#goldPanel { position: absolute; left: 86px; top: 8px; width: 330px; height: 108px; }
.panel-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.panel-inner { position: absolute; inset: 14px 18px 12px 20px; display: flex; flex-direction: column; justify-content: center; }
#goldText {
  font: bold 30px/1.1 "Arial Black", "Microsoft YaHei", sans-serif; color: #ffe258;
  text-shadow: 0 0 4px #7a4a00, 1px 1px 0 #4a2a00;
}
#goldText.flash-red { animation: flashRed .5s; }
#goldText.flash-gold { animation: flashGold .5s; }
@keyframes flashRed { 0%,100% { color: #ffe258; } 50% { color: #ff3b3b; transform: scale(1.12); } }
@keyframes flashGold { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); color: #fff; } }
#lvRow { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
#lvText { font: bold 16px "Microsoft YaHei"; color: #fff; text-shadow: 0 1px 2px #000; }
#lvNameText { font: bold 13px "Microsoft YaHei"; color: #9fe8ff; text-shadow: 0 1px 2px #000; }
#expBar {
  margin-top: 4px; height: 10px; width: 100%;
  background: rgba(0,0,0,.55); border-radius: 5px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.35);
}
#expFill { height: 100%; width: 0; background: linear-gradient(90deg,#39d0ff,#7cffb0); transition: width .3s; }

/* 倒计时面板 */
.daoji { position: absolute; width: 240px; height: 78px; }
#cdSmall { right: 16px; top: 84px; }
#bigCdWrap { right: 16px; top: 12px; }
.daoji-inner {
  position: absolute; inset: 12px 14px 10px 66px;
  display: flex; align-items: center; justify-content: space-between;
}
.daoji-label { font: bold 15px "Microsoft YaHei"; color: #ffe9b0; text-shadow: 0 1px 2px #000; }
.daoji-inner span:last-child { font: bold 22px "Arial Black"; color: #fff; text-shadow: 0 1px 3px #000; }

/* 大奖励按钮 */
#bigRewardBtn {
  position: absolute; right: 36px; top: 96px;
  display: none; animation: bounce 1s infinite;
  z-index: 6;
}
#bigRewardBtn.show { display: block; }
@keyframes bounce { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08) rotate(-2deg); } }

/* 炮费文字 */
#costText {
  position: absolute; left: calc(50% - 30px); bottom: 92px;
  width: 60px; text-align: center;
  font: bold 22px "Arial Black"; color: #ffe258;
  text-shadow: 0 0 4px #000, 1px 1px 0 #000;
  pointer-events: none;
}
#costText.pop { animation: pop .2s; }
@keyframes pop { 50% { transform: scale(1.3); } }

/* ---------- 升级提示 ---------- */
#lvUpTips {
  position: absolute; left: 50%; top: 200px; transform: translateX(-50%) scale(0);
  text-align: center; pointer-events: none; opacity: 0;
}
#lvUpTips.show { animation: lvUp 1.6s forwards; }
#lvUpText {
  display: block; font: bold 64px "Microsoft YaHei"; color: #ffe258;
  text-shadow: 0 0 18px #ff9d00, 2px 2px 0 #7a4a00;
}
#lvUpTips em { font: bold 26px "Microsoft YaHei"; color: #fff; font-style: normal; text-shadow: 0 2px 4px #000; }
@keyframes lvUp {
  0% { opacity: 0; transform: translateX(-50%) scale(.2); }
  15% { opacity: 1; transform: translateX(-50%) scale(1.15); }
  25% { transform: translateX(-50%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-50%) scale(1) translateY(-40px); }
}

/* ---------- 解锁/奖励关卡横幅 ---------- */
#unlockBanner {
  position: absolute; left: 50%; top: 42%; transform: translateX(-50%) scale(0);
  text-align: center; pointer-events: none; opacity: 0; z-index: 30;
  padding: 22px 46px;
  background: linear-gradient(135deg, rgba(20,40,80,.88), rgba(10,25,55,.88));
  border: 2px solid #ffd76a; border-radius: 16px;
  box-shadow: 0 0 34px rgba(255,205,80,.55), inset 0 0 22px rgba(255,205,80,.18);
}
#unlockBanner.show { animation: unlockPop 3s forwards; }
#unlockTitle {
  display: block; font: bold 44px "Microsoft YaHei"; color: #ffe258;
  text-shadow: 0 0 16px #ff9d00, 2px 2px 0 #7a4a00; margin-bottom: 8px;
}
#unlockDesc {
  display: block; font: bold 22px "Microsoft YaHei"; color: #fff; font-style: normal;
  text-shadow: 0 2px 4px #000;
}
@keyframes unlockPop {
  0% { opacity: 0; transform: translateX(-50%) scale(.3); }
  10% { opacity: 1; transform: translateX(-50%) scale(1.12); }
  16% { transform: translateX(-50%) scale(1); }
  82% { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(1.04) translateY(-26px); }
}

/* ---------- 设置面板 ---------- */
#settingPanel {
  position: absolute; inset: 0; display: none;
  background: rgba(0,0,0,.55); z-index: 20;
}
#settingPanel.show { display: block; }
#settingBox {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 420px; padding: 26px 30px 30px;
  background: linear-gradient(#2a4a66,#173250);
  border: 3px solid #6fd8ff; border-radius: 14px;
  box-shadow: 0 0 30px rgba(0,180,255,.35);
}
#settingBox h3 { color: #9fe8ff; font: bold 24px "Microsoft YaHei"; margin-bottom: 20px; text-align: center; }
.mute-row { display: flex; align-items: center; gap: 12px; color: #fff; font: 16px "Microsoft YaHei"; margin-bottom: 24px; }
.mute-row img { width: 36px; height: 36px; }
.mute-row input { width: 44px; height: 22px; accent-color: #39d0ff; }
#btnCloseSetting { display: block; margin: 0 auto; width: 160px; height: 64px; font-size: 22px; line-height: 56px; }

/* ---------- 开始界面 ---------- */
#startScreen {
  position: absolute; inset: 0; z-index: 10;
  background: url("../assets/bg/背景_01.png") center / cover no-repeat;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
}
#startScreen::before { content: ""; position: absolute; inset: 0; background: rgba(2,16,32,.45); }
#startScreen > * { position: relative; }
#logo { width: 520px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.6)); animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
#startTip { color: rgba(255,255,255,.75); font: 15px "Microsoft YaHei"; text-shadow: 0 1px 3px #000; margin-top: 6px; }

/* ---------- 加载画面 ---------- */
#loading {
  position: absolute; inset: 0; z-index: 30;
  background: radial-gradient(circle at 50% 40%, #0e3a5e, #04121f 75%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  transition: opacity .55s ease;
}
#loading.fade-out { opacity: 0; pointer-events: none; }
#loadingLogo {
  width: 320px; margin-bottom: 6px;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.55));
  animation: logoFloat 2.6s ease-in-out infinite;
}
@keyframes logoFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
#loadingIcon {
  width: 88px; height: auto;
  filter: drop-shadow(0 0 12px rgba(80,200,255,.45));
}
#loadingBarWrap { width: 400px; height: 16px; border: 2px solid #6fd8ff; border-radius: 9px; overflow: hidden; background: rgba(0,0,0,.5); box-shadow: 0 0 12px rgba(30,150,255,.35); }
#loadingBar { width: 0; height: 100%; background: linear-gradient(90deg,#1a9fff,#7cffb0); transition: width .25s ease; }
#loadingPct { color: #fff; font: bold 14px "Arial Black"; text-shadow: 0 1px 3px #000; min-height: 17px; }
#loadingTip { color: #9fe8ff; font: 14px "Microsoft YaHei"; text-shadow: 0 1px 2px #000; min-height: 18px; }

/* ---------- 账号 / 积分房 / 排行榜 ---------- */
.wood-btn.mid { width: 148px; height: 54px; font-size: 19px; line-height: 48px; }
#startAccount { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: -6px; }
#saGuest, #saLogged { display: flex; align-items: center; gap: 14px; }
#saName { font: bold 20px "Microsoft YaHei"; color: #9fe8ff; text-shadow: 0 1px 3px #000; cursor: pointer; }
#saName:hover { color: #ffe258; text-decoration: underline; }
#saScore { font: bold 20px "Arial Black"; color: #ffe258; text-shadow: 0 1px 3px #000; }

/* 游戏内积分角标（积分板素材） */
#scoreChip {
  position: absolute; right: 16px; top: 180px; width: 158px; height: 48px;
  display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; z-index: 6;
  background: url("../assets/ui/playerCreditBoard.png") center / 100% 100% no-repeat;
  font: bold 15px "Microsoft YaHei"; color: #fff; text-shadow: 0 1px 2px #000;
  transition: filter .1s;
}
#scoreChip:hover { filter: brightness(1.2); }
#scoreChipVal { font: bold 17px "Arial Black"; color: #ffe258; }

/* 登录/注册 & 排行榜 & 改昵称面板 */
#loginPanel, #lbPanel, #renamePanel {
  position: absolute; inset: 0; display: none;
  background: rgba(0,0,0,.55); z-index: 22;
}
#loginPanel.show, #lbPanel.show, #renamePanel.show { display: block; }
#loginBox, #lbBox, #renameBox {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 430px; padding: 26px 30px 30px;
  background: linear-gradient(#2a4a66,#173250);
  border: 3px solid #6fd8ff; border-radius: 14px;
  box-shadow: 0 0 30px rgba(0,180,255,.35);
}
#loginBox h3, #lbBox h3, #renameBox h3 { color: #9fe8ff; font: bold 24px "Microsoft YaHei"; margin-bottom: 18px; text-align: center; }
.lb-cup { width: 42px; vertical-align: middle; margin-right: 10px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
#loginTabs { display: flex; gap: 10px; margin-bottom: 16px; }
#loginTabs .tab {
  flex: 1; text-align: center; padding: 10px 0; cursor: pointer; border-radius: 8px;
  font: bold 17px "Microsoft YaHei"; color: #cfe9ff; background: rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.2); transition: filter .1s;
}
#loginTabs .tab:hover { filter: brightness(1.2); }
#loginTabs .tab.active { color: #ffe258; background: rgba(20,60,100,.8); border-color: #ffd76a; }
#loginBox input, #renameBox input {
  width: 100%; height: 44px; margin-bottom: 12px; padding: 0 14px;
  border-radius: 8px; border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.35); color: #fff; font: 16px "Microsoft YaHei"; outline: none;
}
#loginBox input:focus, #renameBox input:focus { border-color: #6fd8ff; }
#loginMsg, #renameMsg { min-height: 22px; color: #ff8080; font: 14px "Microsoft YaHei"; margin-bottom: 8px; text-align: center; }
#btnDoLogin, #btnCloseLogin, #btnDoRename, #btnCloseRename {
  display: block; width: 100%; height: 56px; font-size: 20px; line-height: 48px; margin-bottom: 10px;
}
.wood-btn.disabled { opacity: .55; pointer-events: none; }

/* 排行榜列表 */
#lbList { max-height: 300px; overflow-y: auto; margin-bottom: 12px; }
.lb-tip { color: #cfe9ff; font: 15px "Microsoft YaHei"; text-align: center; padding: 18px 0; }
.lb-row {
  display: flex; align-items: center; padding: 8px 12px; border-radius: 8px;
  color: #fff; font: 16px "Microsoft YaHei";
}
.lb-row:nth-child(odd) { background: rgba(0,0,0,.25); }
.lb-row.me { background: rgba(255,205,80,.18); border: 1px solid #ffd76a; color: #ffe258; }
.lb-row .rk { width: 48px; font: bold 17px "Arial Black"; }
.lb-row .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-row .sc { font: bold 17px "Arial Black"; color: #ffe258; }
.lb-row.me .sc { color: #fff; }
#lbMe { text-align: center; color: #ffe258; font: bold 16px "Microsoft YaHei"; margin-bottom: 14px; min-height: 20px; text-shadow: 0 1px 2px #000; }
#btnCloseLb { display: block; margin: 0 auto; width: 160px; height: 58px; font-size: 20px; line-height: 50px; }
