/* common.css —— 公共样式（变量 / 背景 / 按钮 / 下拉 / 弹框） */
:root {
  --blue-btn: #1a2a8f;        /* 深蓝主按钮 */
  --blue-btn-hover: #2234a8;
  --panel-blue: #1e3fd0;      /* 面板蓝 */
  --text-white: #ffffff;
  --accent-red: #ff2d2d;      /* 红色强调 */
  --card-shadow: 0 10px 40px rgba(0, 0, 0, .18);
  --yellow-grad: linear-gradient(180deg, #ffe14d 0%, #ffc400 55%, #f5a800 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--text-white);
  overflow: hidden;
}

/* 满屏蓝底（登录/答题/打分等） */
.bg-full {
  position: fixed;
  inset: 0;
  background: url("../img/bg.jpg") center/cover no-repeat;
  z-index: -1;
}
.bg-full.bg2 { background-image: url("../img/bg2.jpg"); }

/* 视图切换：单页内多视图 */
.view { display: none; width: 100%; height: 100%; }
.view.active { display: block; }

/* 左上角“登录身份 + 退出登录”：仅登录后各视图显示（显隐由 common.js showView 控制） */
.logout-bar {
  display: none;
  position: absolute;
  top: 6px;
  left: 24px;
  z-index: 20;
  align-items: center;
  gap: 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}
.logout-bar.show { display: flex; }
/* 队伍名 / 评委名：过长则省略，不挤压“退出登录” */
.logout-name {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.logout-link {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.logout-link:hover { text-decoration: underline; }

/* 深蓝按钮（确认登录） */
.btn-blue {
  display: block;
  width: 100%;
  height: 62px;
  line-height: 62px;
  border: none;
  border-radius: 8px;
  background: var(--blue-btn);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background .2s;
}
.btn-blue:hover { background: var(--blue-btn-hover); }
.btn-blue:disabled { opacity: .6; cursor: not-allowed; }

/* 黄色按钮（直接使用 btn2.png 素材作为背景，含高光条，可覆盖文字） */
.btn-yellow {
  position: relative;
  display: inline-block;
  min-width: 170px;
  height: 58px;
  line-height: 58px;
  padding: 0 28px;
  border: none;
  background: url("../img/btn2.png") center / 100% 100% no-repeat;
  color: #1a2a8f;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
  text-align: center;
  transition: filter .08s;
}
.btn-yellow:active { filter: brightness(.94); }
.btn-yellow:disabled { filter: grayscale(.12) brightness(1.02); opacity: .8; cursor: not-allowed; }

/* 自定义下拉（还原设计稿灰底 + 右侧蓝三角） */
.select-wrap { position: relative; }
.select-wrap select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 60px;
  padding: 0 48px 0 18px;
  border: none;
  border-radius: 6px;
  background: #ececec;
  color: #333;
  font-size: 20px;
  cursor: pointer;
}
.select-wrap::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 12px solid #1a2a8f;
  transform: translateY(-50%);
  pointer-events: none;
}

/* ===== 登录页布局（选手端 / 评委端共用） ===== */
#view-login { height: 100%; }
.login-layout {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8% 0 6%;
}
.login-left { max-width: 46%; }
.slogan-img { width: 100%; max-width: 640px; height: auto; display: block; }
.contest-name {
  margin-top: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 2px;
}
.login-card {
  width: 460px;
  min-height: 640px;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
}
.login-title {
  color: #1a2a8f;
  font-size: 30px;
  font-weight: 800;
  width: fit-content;
  padding-bottom: 14px;
  border-bottom: 3px solid #1a2a8f;
}
.login-card .select-wrap { margin-top: 150px; }
#loginBtn { margin-top: auto; }

/* 顶部标题图（白字标题） */
.title-img {
  display: block;
  margin: 0 auto;
  height: 56px;
  width: auto;
}

/* 放大预览弹框（vant 风格） */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.modal-mask.show { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  max-width: 80%;
  max-height: 82%;
  position: relative;
  box-shadow: var(--card-shadow);
}
.modal-box img { max-width: 100%; max-height: 72vh; display: block; }
.modal-close {
  position: absolute;
  right: -14px;
  top: -14px;
  width: 34px;
  height: 34px;
  line-height: 32px;
  text-align: center;
  border-radius: 50%;
  background: #fff;
  color: #666;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

/* 轻提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, .78);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 18px;
  z-index: 1000;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* ===== 提交二次确认弹框（深蓝科技风，选手端/评委端共用） ===== */
.confirm-mask {
  position: fixed;
  inset: 0;
  background: rgba(6, 14, 48, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: confirmFade .2s ease;
}
.confirm-mask.show { display: flex; }
@keyframes confirmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes confirmPop { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
.confirm-box {
  width: 460px;
  max-width: calc(100vw - 48px);
  padding: 40px 40px 36px;
  text-align: center;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(38, 66, 190, .96) 0%, rgba(20, 38, 120, .97) 100%);
  border: 1px solid rgba(120, 160, 255, .45);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12);
  animation: confirmPop .26s cubic-bezier(.2, .8, .3, 1.1);
}
/* 警示图标 */
.confirm-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  background: radial-gradient(circle at 50% 35%, #ffb020, #ff7a00);
  box-shadow: 0 8px 22px rgba(255, 138, 0, .45);
}
.confirm-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 12px;
}
.confirm-tip {
  font-size: 16px;
  line-height: 1.7;
  color: #c9d4ff;
  margin-bottom: 32px;
}
.confirm-actions { display: flex; align-items: center; justify-content: center; gap: 18px; }
.confirm-btn {
  flex: 1;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform .12s, filter .12s, background .2s, box-shadow .2s;
}
.confirm-btn:active { transform: translateY(1px); }
/* 次按钮：描边幽灵 */
.confirm-btn-ghost {
  background: rgba(255, 255, 255, .08);
  color: #dbe3ff;
  border: 1px solid rgba(180, 200, 255, .5);
}
.confirm-btn-ghost:hover { background: rgba(255, 255, 255, .16); }
/* 主按钮：黄色按钮背景图 btn2.png，纵向放大裁掉透明留白使药丸与次按钮等高 */
.confirm-btn-primary {
  overflow: hidden;
  background: url("../img/btn2.png") center / 100% 122% no-repeat;
  color: #1a2a8f;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
}
.confirm-btn-primary:hover { filter: brightness(1.05); }
.confirm-btn-primary:active { filter: brightness(.94); }
