/* =========================================================
   登录/注册页独立样式（不依赖后台 CSS 与 Bootstrap）
   ========================================================= */

/* FontAwesome 图标字体 */
@font-face {
  font-family: 'FontAwesome';
  src: url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'),
       url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'),
       url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');
  font-weight: normal;
  font-style: normal;
}
.fa {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.fa-user:before { content: "\f007"; }
.fa-asterisk:before { content: "\f069"; }
.fa-envelope:before { content: "\f003"; }

/* ---------- 页面与居中布局 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background: #26303c url("https://koke.cc/img.php") center center / cover no-repeat fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 40px;
}
#login {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ---------- 卡片 ---------- */
.login-card {
  position: relative;
  width: 360px;
  max-width: 100%;
  margin-top: 60px;              /* 给探出卡片的猫头鹰留空间 */
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .4);
}
.login-card form { display: block; }

/* ---------- 猫头鹰动画（沿用原模板结构） ---------- */
#owl-login {
  width: 211px;
  height: 108px;
  background-image: url("../images/owl-login.png");
  position: absolute;
  top: -100px;
  left: 50%;
  margin-left: -111px;
  pointer-events: none;
}
@media (min-resolution: 1.5dppx), (-webkit-min-device-pixel-ratio: 1.5) {
  #owl-login {
    background-image: url("../images/owl-login@2x.png");
    background-size: 211px 108px;
  }
}
#owl-login .hand {
  width: 34px;
  height: 34px;
  border-radius: 40px;
  background-color: #472d20;
  transform: scaleY(0.6);
  transition: 0.3s ease-out;
  position: absolute;
  left: 14px;
  bottom: -8px;
}
#owl-login .hand.hand-r { left: 170px; }
#owl-login.password .hand {
  transform: translateX(42px) translateY(-15px) scale(0.7);
}
#owl-login.password .hand.hand-r {
  transform: translateX(-42px) translateY(-15px) scale(0.7);
}
#owl-login .arms {
  top: 58px;
  position: absolute;
  width: 100%;
  height: 41px;
  overflow: hidden;
}
#owl-login .arms .arm {
  width: 40px;
  height: 65px;
  position: absolute;
  left: 20px;
  top: 40px;
  background-image: url("../images/owl-login-arm.png");
  transition: 0.3s ease-out;
  transform: rotate(-20deg);
}
@media (min-resolution: 1.5dppx), (-webkit-min-device-pixel-ratio: 1.5) {
  #owl-login .arms .arm {
    background-image: url("../images/owl-login-arm@2x.png");
    background-size: 40px 65px;
  }
}
#owl-login .arms .arm.arm-r {
  transform: rotate(20deg) scaleX(-1);
  left: 158px;
}
#owl-login.password .arms .arm {
  transform: translateY(-40px) translateX(40px);
}
#owl-login.password .arms .arm.arm-r {
  transform: translateY(-40px) translateX(-40px) scaleX(-1);
}

/* ---------- 表单 ---------- */
.login-card h3 {
  margin: 0 0 18px;
  text-align: center;
  color: #333;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2px;
}
.pad { padding: 26px 30px 6px; }
.control-group { position: relative; margin-bottom: 16px; }
.control-label {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 15px;
  z-index: 1;
  pointer-events: none;
}
.form-control {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 38px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 14px;
  color: #444;
  outline: none;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-control:focus {
  border-color: #4a90d9;
  box-shadow: 0 0 0 3px rgba(74, 144, 217, .15);
}
.form-control::placeholder { color: #b3b3b3; }

/* ---------- 底部操作栏 ---------- */
.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 14px 20px;
  background: #f7f7f7;
  border-top: 1px solid #e4e4e4;
  border-radius: 0 0 12px 12px;
}
.form-actions input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex: 0 0 auto;
}
.form-actions > span {
  font-size: 13px;
  color: #666;
  white-space: nowrap;
}
.btn-link {
  font-size: 13px;
  color: #999;
  text-decoration: none;
  white-space: nowrap;
}
.btn-link:hover { color: #666; }
.btn-primary {
  background: #4a90d9;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 24px;
  font-size: 14px;
  cursor: pointer;
  flex: 0 0 auto;
  margin-left: auto;              /* 始终推到右侧，没有注册链接时也不挤 */
  transition: background .2s;
}
.btn-primary:hover { background: #3a7fc4; }
.btn-primary:active { transform: scale(.97); }

/* ---------- 返回提示 ---------- */
.more-link {
  text-align: center;
  margin-top: 14px;
}
.more-link a {
  font-size: 14px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .55);
  text-decoration: none;
}
.more-link a:hover { text-decoration: underline; }

/* ---------- 移动端 ---------- */
@media (max-width: 480px) {
  body { padding: 16px 12px 32px; }
  .login-card { width: 100%; margin-top: 56px; }
  .pad { padding: 22px 20px 4px; }
  .form-actions { padding: 12px 14px; flex-wrap: wrap; }
}

/* ---------- 登录失败等消息提示（typecho.js 注入 .message.popup） ---------- */
.message.popup {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  max-width: calc(100vw - 32px);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
  display: none;                  /* 由 typecho.js slideDown 展开 */
  box-shadow: 0 8px 28px rgba(0, 0, 0, .3);
}
.message.popup ul { list-style: none; margin: 0; padding: 0; }
.message.popup.error {
  background: #fdecea;
  color: #a31717;
  border: 1px solid #f5c6c0;
}
.message.popup.notice {
  background: #fff7dd;
  color: #8a6d00;
  border: 1px solid #f0dc9c;
}
.message.popup.success {
  background: #e6f6e6;
  color: #2e7d32;
  border: 1px solid #bfe3bf;
}
