/* 前台会员页面样式（注册 / 登录 / 我的图片）
   头部、菜单、白色内容块由 site_chrome.php 统一提供。
   注意：这里不要再改 body 的字体、字号、行高——那会让头部文字跟其他页面不一样，
   全站字体统一以 site_chrome.php 里那份为准。 */

body {
    margin: 0;
    padding: 0;
}

/* 内容块：外层 #page / #page-bg（778px 白底）由 site_chrome.php 统一提供，
   这里只负责内边距和左对齐，不再自己画头部、菜单和白卡片 */
.mf-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.mf-body {
    background: transparent;
    padding: 22px 24px 26px;
    border-radius: 0;
    min-height: 240px;
}

/* 标题与说明 */
.mf-title {
    font-size: 18px;
    color: #0f172a;
    margin: 0 0 6px;
}
.mf-desc {
    color: #64748b;
    margin: 0 0 18px;
    line-height: 1.7;
}

/* 表单 */
.mf-form {
    max-width: 420px;
}
.mf-field {
    margin-bottom: 14px;
}
.mf-field label {
    display: block;
    color: #334155;
    margin-bottom: 6px;
}
.mf-field input[type="text"],
.mf-field input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid #bfcbdb;
    border-radius: 6px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
}
.mf-field input:focus { border-color: #3b82f6; }
.mf-hint {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 5px;
}
.mf-cap-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.mf-cap-row input {
    flex: 1;
}
.mf-cap-img {
    width: 150px;
    height: 44px;
    border: 1px solid #c6d3e3;
    border-radius: 6px;
    cursor: pointer;
    background: #f2f5f9;
    flex: 0 0 auto;
}
.mf-btn {
    display: inline-block;
    white-space: nowrap;
    padding: 10px 22px;
    border: 0;
    border-radius: 6px;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
}
.mf-btn:hover { background: #1d4ed8; }
.mf-btn-ghost {
    background: #f2f5f9;
    color: #334155;
}
.mf-btn-ghost:hover { background: #e6e8eb; }
.mf-btn-danger { background: #dc2626; }
.mf-btn-danger:hover { background: #b91c1c; }
.mf-btn-mini {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
}
.mf-links {
    margin-top: 16px;
    color: #475569;
}
.mf-links a { color: #2563eb; text-decoration: none; }
.mf-links a:hover { text-decoration: underline; }

.mf-flash {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
}
.mf-flash-ok { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.mf-flash-err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.mf-flash-warn { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }

/* 统计 */
.mf-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.mf-stat {
    flex: 1;
    min-width: 110px;
    background: #f8fafc;
    border: 1px solid #c6d3e3;
    border-radius: 8px;
    padding: 12px 16px;
}
.mf-stat b {
    display: block;
    font-size: 20px;
    color: #0f172a;
}
.mf-stat span {
    color: #64748b;
    font-size: 12px;
}

/* 图片卡片 */
.mf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
}
.mf-card {
    border: 1px solid #c6d3e3;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    margin: 0;
}
.mf-thumb {
    display: block;
    width: 100%;
    height: 130px;
    background: #f2f5f9 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><rect width='8' height='8' fill='%23f0f1f3'/><rect x='8' y='8' width='8' height='8' fill='%23f0f1f3'/></svg>") repeat;
    text-align: center;
}
.mf-thumb img {
    max-width: 100%;
    max-height: 130px;
    vertical-align: middle;
}
.mf-card-body {
    padding: 9px 11px 11px;
}
.mf-card-name {
    font-size: 12px;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mf-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #94a3b8;
    font-size: 11px;
    margin-top: 6px;
    gap: 6px;
}
.mf-tag {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    background: #f2f5f9;
    color: #64748b;
}
.mf-tag-private {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.mf-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 9px;
}
.mf-empty {
    text-align: center;
    color: #94a3b8;
    padding: 40px 0;
}
.mf-empty a { color: #2563eb; }

@media (max-width: 640px) {
    .mf-wrap { width: 100%; }
    .mf-body { padding: 18px 14px 22px; }
}

/* ---------------- 移动端（768 及以下） ----------------
   768 这一档放在 640 上面：手机竖屏基本都命中，
   上一档 640 里的规则继续生效，这里补的是"手指点得中"和"不许撑破屏宽"。 */
@media (max-width: 768px) {
    .mf-body { padding: 16px 12px 20px; }
    .mf-title { font-size: 17px; }
    .mf-desc { font-size: 13.5px; }

    /* 表单：手机上不再限宽 420，输入框满宽 */
    .mf-form { max-width: none; }
    .mf-field label { font-size: 14px; }
    .mf-field input[type="text"],
    .mf-field input[type="password"],
    .mf-field input[type="email"],
    .mf-field input[type="number"] { font-size: 16px; padding: 11px 12px; } /* 16px 起 iOS 聚焦不放大 */
    .mf-field textarea, .mf-field select { width: 100%; max-width: 100%; box-sizing: border-box; font-size: 16px; }

    /* 按钮：至少 44px 高，一字排开时满宽更顺手 */
    .mf-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; }
    .mf-btn-mini { min-height: 36px; padding: 0 10px; font-size: 12.5px; }
    .mf-btn-block-m { width: 100%; }

    /* 验证码那一行：输入框和图片不许挤出屏幕 */
    .mf-cap-row { flex-wrap: wrap; }
    .mf-cap-row input { width: 100%; }
    .mf-cap-row img { max-width: 100%; }

    /* 统计块：手机上排两列就够，数字再大一点 */
    .mf-stats { gap: 8px; }
    .mf-stat { flex: 1 1 calc(50% - 6px); min-width: 0; padding: 10px 12px; }
    .mf-stat b { font-size: 18px; }

    /* 图片卡片：手机上至少两列会太挤，改成一列大卡 + 缩略图跟着宽 */
    .mf-grid { grid-template-columns: 1fr; gap: 10px; }
    .mf-thumb { height: 180px; }
    .mf-thumb img { max-height: 180px; }
    .mf-card-actions { flex-wrap: wrap; }
    .mf-card-actions .mf-btn { flex: 1 1 auto; }

    /* 「限时分享」那组小控件：手机上让它换行，输入框别只剩一小条 */
    .mf-share-row { gap: 6px; }
    .mf-share-url { flex: 1 1 100%; font-size: 13px; }

    /* 长链接、长文件名不许撑破屏宽 */
    .mf-wrap { overflow-wrap: break-word; word-break: break-word; }
}

/* 卡片里的小按钮：确保不被上面的 .mf-btn 内边距覆盖 */
.mf-btn.mf-btn-mini, .mf-btn-mini {
    padding: 6px 10px;
    font-size: 12px;
}

/* 私密图的「限时分享」 */
.mf-share-new {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #c6d3e3;
}
.mf-share-label {
    color: #94a3b8;
    font-size: 11px;
}
.mf-share-num {
    width: 46px;
    padding: 4px 6px;
    border: 1px solid #bfcbdb;
    border-radius: 5px;
    font-size: 12px;
    color: #0f172a;
}
.mf-share-unit {
    padding: 4px 4px;
    border: 1px solid #bfcbdb;
    border-radius: 5px;
    font-size: 12px;
    color: #334155;
    background: #ffffff;
}
.mf-share {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #c6d3e3;
}
.mf-share-meta {
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 5px;
    padding: 4px 7px;
    font-size: 11px;
    margin-bottom: 6px;
}
.mf-share-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}
.mf-share-url {
    flex: 1 1 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 4px 6px;
    border: 1px solid #bfcbdb;
    border-radius: 5px;
    font-size: 11px;
    color: #475569;
    background: #fafbfc;
}

/* ================================================================== *
 * 视觉统一：与「我的主页」(profile.php) 同一套立体感
 *   画布微渐变 / 卡片分层阴影 / 标题蓝色竖条 / 统计内凹 / 输入框内阴影
 *   不改色系、不加背景图
 * ================================================================== */

/* 画布：极浅冷灰 + 顶部一层蓝色光晕 */
.mf-body {
    background:
        radial-gradient(1100px 420px at 50% -80px, #e9f1ff 0%, rgba(233, 241, 255, 0) 62%),
        linear-gradient(180deg, #f8fafd 0%, #f4f7fb 100%);
}

/* 页标题：左侧蓝色竖条，和主页卡片标题一个语言 */
.mf-title {
    position: relative;
    padding-left: 11px;
    font-weight: 700;
    letter-spacing: -.01em;
}
.mf-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 17px;
    margin-top: -8.5px;
    border-radius: 2px;
    background: linear-gradient(180deg, #60a5fa, #1d4ed8);
}

/* 统计格：内凹 + 数字走蓝色 */
.mf-stat {
    box-sizing: border-box;   /* flex-basis 按含内边距的整宽算，两列才排得下 */
    background: #f7f9fc;
    border-color: #e3e9f2;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .05);
    transition: box-shadow .16s ease, background .16s ease;
}
.mf-stat:hover {
    background: #fff;
    box-shadow: 0 8px 18px -12px rgba(37, 99, 235, .45);
}
.mf-stat b {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.02em;
    color: #1d4ed8;
}

/* 图片卡片：白卡浮起，悬停抬一点 */
.mf-card {
    border-color: #e3e9f2;
    border-radius: 10px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .04),
        0 12px 28px -18px rgba(15, 23, 42, .22);
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.mf-card:hover {
    border-color: #dbe5f3;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .05),
        0 18px 38px -20px rgba(37, 99, 235, .30);
    transform: translateY(-1px);
}
@media (hover: none) {
    .mf-card:hover { transform: none; }
}

/* 空状态也做成一块卡，别裸在画布上 */
.mf-empty {
    background: #fff;
    border: 1px dashed #dbe4f0;
    border-radius: 12px;
    box-shadow: 0 12px 28px -20px rgba(15, 23, 42, .18);
}

/* 输入框：内阴影，聚焦蓝光圈 */
.mf-field input[type="text"],
.mf-field input[type="password"],
.mf-field input[type="email"],
.mf-field input[type="number"],
.mf-field textarea,
.mf-field select,
.mf-share-num,
.mf-share-unit,
.mf-share-url {
    background: #fbfcfe;
    border-color: #dde4ee;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .06);
    transition: box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.mf-field input:focus,
.mf-field textarea:focus,
.mf-field select:focus,
.mf-share-num:focus,
.mf-share-unit:focus,
.mf-share-url:focus {
    background: #fff;
    border-color: #93c5fd;
    box-shadow:
        inset 0 1px 2px rgba(15, 23, 42, .03),
        0 0 0 3px rgba(37, 99, 235, .14);
    outline: none;
}

/* 主按钮：轻微渐变 + 投影，和主页按钮一致 */
.mf-btn {
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    box-shadow: 0 6px 14px -10px rgba(37, 99, 235, .55);
    transition: box-shadow .16s ease, filter .16s ease;
}
.mf-btn:hover {
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    filter: brightness(1.02);
}
.mf-btn-ghost {
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 2px rgba(15, 23, 42, .05);
}
.mf-btn-ghost:hover { background: #f4f8ff; }
.mf-btn-danger { background: #dc2626; box-shadow: 0 6px 14px -10px rgba(220, 38, 38, .5); }


/* ---------- 注册页人机验证（Cloudflare Turnstile） ---------- */
.mf-ts-field {
    margin-top: 2px;
}
.mf-ts-field .cf-turnstile {
    min-height: 0;
}
.mf-ts-warn {
    color: #b91c1c;
}
.mf-ts-off {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.mf-ts-off b {
    display: block;
    font-size: 15px;
    margin-bottom: 6px;
}
.mf-ts-off p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
}
