/* 全局字体和背景 */
body {
  font-family: 'PingFang SC', '微软雅黑', Arial, sans-serif;
  background: linear-gradient(120deg, #e0eafc 0%, #cfdef3 100%);
  margin: 0;
  padding: 0;
}
.container {
  width: 100%;
  max-width: 440px;
  margin: 32px auto 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px #b3c6e0;
  padding: 18px 8px 18px 8px;
  box-sizing: border-box;
}
@media (max-width: 600px) {
  .container {
    max-width: 100vw;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 16px 0;
  }
}
h2 {
  text-align: center;
  color: #1976d2;
  font-size: 2rem;
  margin: 18px 0 18px 0;
  letter-spacing: 2px;
}
.form-title {
  font-size: 1.2rem;
  color: #1976d2;
  margin-bottom: 10px;
  text-align: center;
}
.input-group {
  margin-bottom: 14px;
}
input[type=text], input[type=password] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #b3c6e0;
  border-radius: 8px;
  font-size: 1rem;
  background: #f7fafd;
  transition: border 0.2s;
  box-sizing: border-box;
}
input[type=text]:focus, input[type=password]:focus {
  border: 1.5px solid #1976d2;
  outline: none;
  background: #fff;
}
.register-btn, .login-btn {
  flex: 1;
  padding: 12px 0;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}
.register-btn {
  background: #4caf50;
  color: #fff;
}
.login-btn {
  background: linear-gradient(90deg, #2196f3, #42a5f5);
  color: #fff;
}
button:disabled {
  background: #b0b0b0;
  color: #f0f0f0;
  cursor: not-allowed;
}
.switch-link {
  color: #1976d2;
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.98rem;
}
.msg {
  display: block;
  min-height: 22px;
  color: #d9534f;
  margin: 8px 0 0 0;
  font-size: 1rem;
  text-align: center;
}
.success {
  color: #28a745;
}
#main-box > div {
  margin-bottom: 12px;
}
#user-times {
  color: #1976d2;
  font-weight: bold;
  font-size: 1.1rem;
}
#recharge-msg {
  font-size: 0.98rem;
}
#count-bar {
  margin-bottom: 14px;
  font-size: 1.15rem;
  color: #fff;
  background: linear-gradient(90deg, #1976d2 60%, #5faaff 100%);
  border-radius: 10px;
  box-shadow: 0 2px 12px #b3c6e0;
  padding: 10px 0 8px 0;
  text-align: center;
  letter-spacing: 2px;
  font-weight: bold;
  max-width: 98vw;
  margin-left: auto;
  margin-right: auto;
}
#count-bar .label {
  color: #e0e0e0;
  font-size: 1.08rem;
  font-weight: normal;
}
#count-bar span {
  font-size: 1.25rem;
  margin: 0 8px;
  color: #fff;
}
#gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  justify-content: center;
}
@media (max-width: 600px) {
  #gallery {
    gap: 8px;
    margin-top: 4px;
  }
}
.thumb-card {
  border: 1.5px solid #e0eafc;
  border-radius: 10px;
  padding: 8px 4px 8px 4px;
  background: #f7fafd;
  width: 100px;
  text-align: center;
  position: relative;
  box-shadow: 0 2px 8px #e0eafc;
  margin-bottom: 2px;
  transition: box-shadow 0.2s, border 0.2s;
}
.thumb-card:active, .thumb-card:hover {
  box-shadow: 0 4px 16px #b3c6e0;
  border: 1.5px solid #1976d2;
}
.thumb-card input[type=checkbox] {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 18px;
  height: 18px;
}
.thumb-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 4px;
  box-shadow: 0 1px 4px #e0eafc;
  background: #fff;
}
.thumb-card .type-label {
  position: absolute;
  right: 8px;
  top: 8px;
  background: #1976d2;
  color: #fff;
  font-size: 12px;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: bold;
  letter-spacing: 1px;
}
.thumb-card .img-seq {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: #1976d2;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  text-align: center;
  line-height: 22px;
  font-weight: bold;
  font-size: 14px;
  z-index: 2;
  box-shadow: 0 1px 4px #b3c6e0;
}
@media (max-width: 600px) {
  .thumb-card {
    width: 29vw;
    min-width: 80px;
    max-width: 110px;
    padding: 6px 2px 6px 2px;
  }
  .thumb-card img {
    width: 22vw;
    min-width: 60px;
    max-width: 90px;
    height: 22vw;
    min-height: 60px;
    max-height: 90px;
  }
}
.wait-modal {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.25);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wait-modal .wait-box {
  background: #fff;
  padding: 32px 48px;
  border-radius: 8px;
  box-shadow: 0 2px 16px #888;
  font-size: 20px;
  color: #1976d2;
  text-align: center;
}
/* 操作按钮区分组样式 */
#main-box > div > button, #main-box > div > label {
  width: auto;
  min-width: 90px;
  margin: 6px 6px 6px 0;
  display: inline-block;
  font-size: 1rem;
  padding: 10px 0;
}
@media (max-width: 600px) {
  #main-box > div > button, #main-box > div > label {
    min-width: 70px;
    font-size: 0.98rem;
    padding: 8px 0;
  }
}
#main-msg {
  display: block;
  min-height: 22px;
  color: #d9534f;
  margin: 10px 0 0 0;
  font-size: 1.05rem;
  text-align: center;
  word-break: break-all;
}
@media (max-width: 600px) {
  #main-msg {
    font-size: 0.98rem;
    margin: 8px 0 0 0;
  }
}
.auto-wm-label {
  display: inline-flex;
  align-items: center;
  font-size: 1.08rem;
  color: #1976d2;
  font-weight: bold;
  background: #e3f0fd;
  border-radius: 6px;
  padding: 6px 14px 6px 8px;
  margin-right: 12px;
  box-shadow: 0 1px 4px #e0eafc;
  transition: background 0.2s;
}
.auto-wm-label input[type=checkbox] {
  width: 20px;
  height: 20px;
  accent-color: #1976d2;
  margin-right: 7px;
  border-radius: 4px;
}
.auto-wm-label:active, .auto-wm-label:hover {
  background: #d0e7fa;
} 
.thumb-card .img-seq {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: #1976d2;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  text-align: center;
  line-height: 22px;
  font-weight: bold;
  font-size: 14px;
  z-index: 2;
  box-shadow: 0 1px 4px #b3c6e0;
}
#fetch-btn {
  display: block;
  margin: 18px auto 18px auto;
  font-size: 20px !important;
  font-weight: bold;
  padding: 12px 0 !important;
  height: 48px !important;
  width: 320px !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px #b3c6e0 !important;
  background: linear-gradient(90deg, #1976d2 60%, #5faaff 100%) !important;
  color: #fff !important;
  letter-spacing: 2px;
}