/* ============ 评委手机端 · 通用样式 ============ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #fff;
  min-height: 100vh;
}

/* 背景图铺满；未设置背景图时使用默认科技蓝渐变。
   score.php / login.php 会在 <head> 里输出 body.page-bg{background-image:url(...)}
   覆盖此默认值。 */
.page-bg {
  background-color: #0a2a63;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}
body.page-bg { background-image: linear-gradient(160deg, #0a2a63 0%, #123a86 45%, #0a2350 100%); }

/* 半透明遮罩，保证文字可读 */
.overlay {
  position: fixed; inset: 0;
  background: linear-gradient(180deg, rgba(4,18,48,.35), rgba(4,18,48,.55));
  z-index: 0; pointer-events: none;
}

/* ---------------- 登录页 ---------------- */
.login-page { display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 380px;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 18px;
  padding: 30px 26px 28px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.login-title { font-size: 24px; font-weight: 800; text-align: center; letter-spacing: 2px; }
.login-sub { font-size: 13px; opacity: .85; text-align: center; margin: 8px 0 22px; line-height: 1.6; }
.fld-label { display: block; font-size: 13px; margin: 16px 0 8px; opacity: .9; }
.fld {
  width: 100%; padding: 13px 14px; font-size: 16px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 10px; background: rgba(255,255,255,.95); color: #1a2a4a;
}
select.fld { appearance: none; }
.btn-primary {
  width: 100%; margin-top: 24px; padding: 14px;
  font-size: 17px; font-weight: 700; letter-spacing: 2px;
  border: 0; border-radius: 10px; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #2f7bff, #1a5fd0);
  box-shadow: 0 6px 18px rgba(26,95,208,.5);
}
.btn-primary:active { transform: translateY(1px); }
.msg-error {
  background: rgba(220,60,60,.9); color: #fff; font-size: 13px;
  padding: 10px 12px; border-radius: 8px; margin-bottom: 12px;
}

/* ---------------- 打分页 ---------------- */
.score-page { padding: 0 0 120px; }
.score-header {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 6px;
}
.sh-title { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.sh-judge { font-size: 13px; opacity: .9; }
.sh-logout { color: #ffd; text-decoration: underline; margin-left: 4px; }

.tabs {
  position: relative; z-index: 1;
  display: flex; gap: 10px; padding: 10px 16px 4px;
}
.tab {
  flex: 1; padding: 11px 0; font-size: 15px; font-weight: 700;
  border: 1px solid rgba(255,255,255,.35); border-radius: 10px;
  background: rgba(255,255,255,.12); color: #eaf1ff; cursor: pointer;
}
.tab.active {
  background: linear-gradient(135deg, #2f7bff, #1a5fd0);
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 14px rgba(26,95,208,.5);
}
.tip {
  position: relative; z-index: 1;
  font-size: 12px; opacity: .82; margin: 8px 18px 0; line-height: 1.6;
}

.panel { display: none; position: relative; z-index: 1; padding: 8px 14px 0; }
.panel.active { display: block; }

.score-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.score-item {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px; padding: 12px 14px;
}
.c-no {
  flex: 0 0 34px; height: 34px; line-height: 34px; text-align: center;
  font-weight: 800; font-size: 16px; border-radius: 8px;
  background: rgba(255,255,255,.9); color: #1a5fd0;
}
.c-info { flex: 1; min-width: 0; }
.c-name { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-sub { font-size: 12px; opacity: .8; margin-top: 2px; }
.c-score {
  flex: 0 0 92px; width: 92px; text-align: center;
  font-size: 22px; font-weight: 800; padding: 8px 6px;
  border: 1px solid rgba(255,255,255,.4); border-radius: 10px;
  background: #fff; color: #10306e;
}
.c-score:focus { outline: 2px solid #2f7bff; }

/* 底部提交条 */
.submit-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(6,20,52,.96), rgba(6,20,52,.75));
  backdrop-filter: blur(6px);
}
.panel:not(.active) .submit-bar { display: none; }
.submit-status { font-size: 12px; opacity: .85; margin-bottom: 8px; min-height: 16px; text-align: center; }
.btn-submit {
  width: 100%; padding: 15px; font-size: 17px; font-weight: 800; letter-spacing: 2px;
  border: 0; border-radius: 12px; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #22c17b, #12a065);
  box-shadow: 0 6px 18px rgba(18,160,101,.5);
}
.btn-submit:disabled { opacity: .6; }
.btn-submit:active { transform: translateY(1px); }

/* Toast */
.toast {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%,-50%) scale(.9);
  z-index: 50; padding: 14px 26px; border-radius: 12px;
  background: rgba(0,0,0,.85); color: #fff; font-size: 15px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: .2s; max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.toast.ok { background: rgba(18,160,101,.95); }
.toast.err { background: rgba(210,60,60,.95); }
