* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f0f0f0;
  padding: 30px 20px;
  min-height: 100vh;
}

/* 顶部标题栏 - 使用素材图片 */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}
.title-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 400px;
  height: 60px;
  background: url('../images/title_base.png') no-repeat center center;
  background-size: contain;
}
.version-select {
  position: relative;
  z-index: 2;
  padding: 8px 36px 8px 16px;
  font-size: 16px;
  border: 2px solid #ff69b4;
  border-radius: 6px;
  background: #fff;
  color: #333;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ff69b4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.version-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.3);
}

/* 区域标题 */
.area-section {
  margin-bottom: 60px;
}
.area-title {
  font-size: 20px;
  font-weight: bold;
  color: #555;
  margin-bottom: 16px;
  text-align: center;
}

/* 角色网格 - 最多一排4个，居中 */
.character-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 680px;
  margin: 0 auto;
}
@media (max-width: 680px) {
  .character-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 340px;
  }
}

/* 角色卡片 */
.character-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.character-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
.char-image-wrapper {
  width: 100%;
  aspect-ratio: 1;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.char-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.char-name {
  text-align: center;
  font-size: 13px;
  font-weight: bold;
  color: #333;
  padding: 8px 4px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 底部蓝黄条 */
.color-bar {
  display: flex;
  height: 32px;
  margin: 4px 8px 8px;
  border-radius: 6px;
  overflow: hidden;
}
.color-bar select {
  flex: 1;
  border: none;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  color: #333;
  padding: 0;
}
.color-bar select:focus {
  outline: none;
}
.bar-blue {
  background: #66ccff;
}
.bar-yellow {
  background: #ffeb3b;
}

.no-data {
  text-align: center;
  color: #999;
  padding: 10px 20px;
  font-size: 16px;
}

/* 提交按钮区域 */
.submit-wrapper {
  display: none;
  justify-content: center;
  margin-top: 50px;
  padding-bottom: 40px;
}
.submit-btn {
  width: 320px;
  height: 80px;
  border: none;
  background: url('../images/button_dialog.png') no-repeat center center;
  background-size: contain;
  cursor: pointer;
  font-size: 22px;
  font-weight: bold;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.submit-btn:hover {
  transform: scale(1.05);
}
.submit-btn:active {
  transform: scale(0.97);
}

/* 用户信息输入行 */
.user-info-row {
  display: none;
  justify-content: center;
  gap: 40px;
  max-width: 680px;
  margin: 0 auto 8px;
  padding: 0;
}
.info-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-field label {
  font-size: 16px;
  font-weight: bold;
  color: #555;
  white-space: nowrap;
}
.info-field input {
  padding: 8px 12px;
  font-size: 15px;
  border: 2px solid #ff69b4;
  border-radius: 6px;
  background: #fff;
  color: #333;
  width: 140px;
}
.info-field input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.3);
}
.info-field select {
  padding: 8px 28px 8px 12px;
  font-size: 15px;
  border: 2px solid #ff69b4;
  border-radius: 6px;
  background: #fff;
  color: #333;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%23ff69b4' d='M5 7L1 2h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.info-field select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.3);
}

/* 提示小字 */
.hint-row {
  display: none;
  max-width: 680px;
  margin: 0 auto 30px;
  text-align: center;
  font-size: 12px;
  color: #999;
}
/* select_version 图片 */
.select-version-img {
  display: block;
  max-width: 400px;
  width: 80%;
  height: auto;
  margin: 0 auto 16px;
  object-fit: contain;
}

/* 结果弹窗 */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active {
  display: flex;
}
.modal-box {
  background: #222;
  color: #fff;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
  font-size: 16px;
  line-height: 1.7;
  position: relative;
}
.modal-box pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  margin: 0;
}
.modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}
.modal-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 20px;
  font-size: 15px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.15s;
}
.modal-btn:hover {
  transform: scale(1.05);
}
.modal-btn:active {
  transform: scale(0.97);
}
.modal-btn-primary {
  background: #8ab4f8;
  color: #000;
}
.modal-btn-secondary {
  background: #444;
  color: #fff;
}
