/* 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; }

/* 深蓝按钮（确认登录） */
.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; }
