/* huanghua 登录/注册弹层 · 独立样式（2026-11-14，不依赖 chigua）
   仅在 /popup/login 页面加载；主站页面不引入 */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: transparent;
    color: #f2f1ed;
    font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* 独立访问时给个深色底；被 iframe 嵌入时（embed）透明 */
html:not(.is-embed) body {
    background: radial-gradient(circle at 50% 0%, #1c1d20 0%, #0e0f11 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.hh-login {
    width: min(380px, 100%);
    padding: 28px 26px 24px;
    background: #191a1c;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .5);
    position: relative;
}

body.is-embed .hh-login {
    border: 0;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
}

/* 关闭按钮 */
.hh-close {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    color: #b6b6b6;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s, color .18s;
}
.hh-close:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* 品牌 */
.hh-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.hh-mark {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #e3c795, #b28e5c);
    clip-path: polygon(0 0, 100% 50%, 0 100%, 22% 50%);
}
.hh-brand-name {
    font-family: "Songti SC", "SimSun", serif;
    font-size: 20px;
    letter-spacing: 2px;
    color: #f2f1ed;
}

/* Tab：登录 / 注册 */
.hh-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    padding: 4px;
    background: #212225;
    border-radius: 8px;
}
.hh-tabs button {
    flex: 1;
    padding: 9px 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #8e8f92;
    font-size: 13px;
    cursor: pointer;
    transition: background .18s, color .18s;
}
.hh-tabs button.on {
    background: linear-gradient(135deg, #e3c795, #b28e5c);
    color: #12130f;
    font-weight: 600;
}

/* 表单 */
.hh-field { margin-bottom: 12px; }
.hh-field input {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    background: #212225;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 7px;
    color: #f2f1ed;
    font-size: 13px;
    outline: none;
    transition: border-color .18s, background .18s;
}
.hh-field input::placeholder { color: #6c6d70; }
.hh-field input:focus { border-color: rgba(212, 181, 133, .5); background: #242528; }
.hh-field input[readonly] { background: #1b1c1e; color: #7c7c80; cursor: not-allowed; }

.hh-verify { display: flex; gap: 8px; }
.hh-verify input { flex: 1; }
.hh-verify img {
    width: 96px;
    height: 42px;
    border-radius: 7px;
    cursor: pointer;
    object-fit: cover;
    background: #212225;
    flex-shrink: 0;
}

/* 提交按钮 */
.hh-submit {
    width: 100%;
    height: 44px;
    margin-top: 6px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #e3c795, #b28e5c);
    color: #12130f;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: filter .18s, opacity .18s;
}
.hh-submit:hover { filter: brightness(1.06); }
.hh-submit:disabled { opacity: .55; cursor: not-allowed; filter: none; }

/* 消息 */
.hh-msg {
    min-height: 18px;
    margin: 10px 0 0;
    font-size: 12px;
    text-align: center;
    color: #e2705f;
}
.hh-msg.ok { color: #d4b585; }

/* 提示 */
.hh-tips {
    margin: 18px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    font-size: 11px;
    line-height: 1.9;
    color: #6c6d70;
}
.hh-tips b { display: block; margin-bottom: 4px; color: #8e8f92; font-weight: 400; }

/* 隐藏 */
.hh-hidden { display: none !important; }

@media (max-width: 420px) {
    .hh-login { padding: 22px 18px 18px; }
    .hh-brand-name { font-size: 18px; }
}


/* ===== hh-embed-reset v2（2026-11-14）=====
   iframe 的"透明"在部分浏览器不透传 ⇒ 露白底 ✗
   改为：**iframe 内自己铺满卡片底色**，父页 iframe 圆角裁剪
   ⇒ 视觉上就是一张圆角卡片，不会有白边 */
html.is-embed,
html.is-embed body {
    background: #191a1c !important;
    background-color: #191a1c !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    display: block !important;
    height: auto !important;
    overflow: hidden;
    border-radius: 14px;
}
html.is-embed .hh-login {
    margin: 0 auto;
    width: 100%;
    max-width: none;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: #191a1c;
}
