/* ============================================================
   幸运 · 情侣纪念墙 — 后台重设计主题 (custom.css)
   设计语言：玫瑰金 / 暖奶油 / 卡片式 / 柔和阴影 / 马善政手写字体
   ============================================================ */

:root {
    --lw-rose:        #d4879a;
    --lw-rose-deep:   #b76e79;
    --lw-rose-soft:   #f3d9e0;
    --lw-blush:       #fceff2;
    --lw-cream:       #fbf6f3;
    --lw-card:        #ffffff;
    --lw-ink:         #5c514e;
    --lw-muted:       #a89b96;
    --lw-line:        #f0e2e5;
    --lw-gold:        #d9a441;
    --lw-green:       #6fae7d;
    --lw-red:         #d67a7a;
    --lw-grad:        linear-gradient(135deg, #e8a0b0 0%, #d4879a 100%);
    --lw-grad-deep:   linear-gradient(135deg, #d4879a 0%, #b76e79 100%);
    --lw-shadow:      0 6px 24px rgba(180, 120, 140, 0.10);
    --lw-shadow-sm:   0 2px 10px rgba(180, 120, 140, 0.08);
    --lw-radius:      16px;
    --lw-radius-sm:   10px;
}

body { background: var(--lw-cream); color: var(--lw-ink); }
a { color: var(--lw-rose-deep); }
a:hover { color: var(--lw-rose); text-decoration: none; }

/* ---------- 顶部导航栏 —— 玫瑰金渐变悬浮条 ---------- */
.typecho-head-nav {
    background: var(--lw-grad-deep) !important;
    padding: 10px 18px !important;
    position: sticky;
    top: 8px;
    z-index: 100;
    border-radius: var(--lw-radius);
    margin: 12px auto 0;
    max-width: 1280px;
    box-shadow: 0 8px 26px rgba(183, 110, 121, 0.28);
}
.typecho-head-nav nav > menu {
    background: transparent !important;
}
.typecho-head-nav a,
.typecho-head-nav .menu-bar summary {
    color: rgba(255, 255, 255, 0.92) !important;
    border-radius: var(--lw-radius-sm);
    height: 36px;
    line-height: 36px;
    padding: 0 16px;
    transition: background .25s ease, color .25s ease;
}
.typecho-head-nav a:hover,
.typecho-head-nav a:focus,
.typecho-head-nav .menu-bar summary:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.16) !important;
    text-decoration: none;
}
.typecho-head-nav nav > menu > li:first-child { border-left: none !important; }
.typecho-head-nav nav > menu > li > a { border-right: none !important; }
.typecho-head-nav nav > menu > li:not(.operate).focus > a,
.typecho-head-nav nav > menu > li:not(.operate) > a:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    font-weight: bold;
}
.typecho-head-nav nav > menu > li menu {
    top: 46px;
    background: #fff !important;
    border-radius: var(--lw-radius-sm);
    box-shadow: var(--lw-shadow);
    overflow: hidden;
    border: 1px solid var(--lw-line);
}
/* 顶层带下拉的 li 设为定位上下文，并用透明桥接块填补按钮与下拉面板之间的悬停空隙 */
.typecho-head-nav nav > menu > li:not(.operate) {
    position: relative;
}
.typecho-head-nav nav > menu > li:not(.operate)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 14px;
    background: transparent;
}
.typecho-head-nav nav > menu > li menu > li a { color: var(--lw-ink) !important; }
.typecho-head-nav nav > menu > li menu > li a:hover,
.typecho-head-nav nav > menu > li menu > li a:focus {
    background: var(--lw-blush) !important;
    color: var(--lw-rose-deep) !important;
}
.typecho-head-nav nav > menu > li menu > li.focus a { color: var(--lw-rose-deep) !important; }
.typecho-head-nav nav > menu > li.operate a:first-child { border-left: none !important; }
.typecho-head-nav nav > menu > li.operate a { color: #fff !important; }
.typecho-head-nav nav > menu > li.operate a.author { font-weight: bold; }
.typecho-head-nav nav > menu > li.operate a.exit { opacity: .85; }

/* ---------- 主内容容器 ---------- */
.main { padding-bottom: 20px; }
.container { max-width: 1280px; margin: 0 auto; }

/* 页面标题 */
.typecho-page-title { margin: 28px 4px 18px; }
.typecho-page-title h2 {
    font-size: 1.55em;
    color: var(--lw-rose-deep);
    font-weight: bold;
    position: relative;
    padding-left: 16px;
}
.typecho-page-title h2::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 6px; height: 1.1em;
    border-radius: 4px;
    background: var(--lw-grad);
}
.typecho-page-title a {
    background: var(--lw-grad) !important;
    color: #fff !important;
    padding: 5px 16px;
    border-radius: 30px;
    font-weight: bold;
    box-shadow: var(--lw-shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}
.typecho-page-title a:hover { transform: translateY(-1px); box-shadow: var(--lw-shadow); text-decoration: none; }

/* ---------- 仪表盘 ---------- */
.welcome-board {
    background: var(--lw-card);
    border-radius: var(--lw-radius);
    box-shadow: var(--lw-shadow);
    padding: 26px 30px;
    margin-bottom: 22px;
    color: var(--lw-muted);
    border: 1px solid var(--lw-line);
}
.welcome-board em { color: var(--lw-rose-deep); font-family: Georgia, serif; }
#start-link { border-bottom: none; padding-bottom: 6px; gap: 12px; }
#start-link li { margin-right: 0; }
#start-link li a {
    display: inline-block;
    background: var(--lw-blush);
    color: var(--lw-rose-deep);
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: bold;
    transition: background .25s ease, color .25s ease, transform .2s ease;
}
#start-link li a:hover { background: var(--lw-grad); color: #fff; text-decoration: none; transform: translateY(-1px); }
.latest-link {
    background: var(--lw-card);
    border-radius: var(--lw-radius);
    box-shadow: var(--lw-shadow-sm);
    padding: 20px 24px;
    margin-bottom: 20px;
    border: 1px solid var(--lw-line);
}
.latest-link h3 {
    color: var(--lw-rose-deep);
    font-size: 1.1em;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--lw-blush);
}
.latest-link span { border-right-color: var(--lw-line); color: var(--lw-muted); }
.latest-link a.title { color: var(--lw-ink); }
.latest-link a.title:hover { color: var(--lw-rose-deep); }

/* ---------- 数据表格 ---------- */
.typecho-list-table {
    background: var(--lw-card);
    border: 16px solid var(--lw-card);
    border-radius: var(--lw-radius);
    box-shadow: var(--lw-shadow);
    overflow: hidden;
}
.typecho-list-table th { border-bottom: 2px solid var(--lw-blush); color: var(--lw-rose-deep); font-weight: bold; }
.typecho-list-table td { border-top: 1px solid var(--lw-line); color: var(--lw-ink); }
.typecho-list-table tbody tr:hover { background: var(--lw-blush); }
.typecho-list-table tbody tr:has(input[type="checkbox"]:checked) { background: #fff3d6; }
.operate-edit { color: var(--lw-green); }
.operate-delete, .operate-button-delete { color: var(--lw-red); }

/* ---------- 按钮体系 ---------- */
.btn, input[type="submit"], button[type="submit"] {
    border: none;
    background: #f0e6e8;
    color: var(--lw-ink);
    border-radius: 30px;
    padding: 0 18px;
    height: 36px;
    font-weight: bold;
    transition: all .25s ease;
}
.btn:hover { background: #e6d7da; }
.primary, .btn.primary {
    background: var(--lw-grad) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(212, 135, 154, 0.35);
}
.primary:hover, .btn.primary:hover {
    background: var(--lw-grad-deep) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(183, 110, 121, 0.4);
}
.btn-warn { background: var(--lw-red) !important; color: #fff !important; }
.btn-warn:hover { background: #c76a6a !important; }
a.balloon-button { background: var(--lw-blush); color: var(--lw-rose-deep); border-radius: 30px; }
a.balloon-button:hover { background: var(--lw-rose); color: #fff; }
.balloon { background: var(--lw-rose); color: #fff; border-radius: 20px; }

/* ---------- 表单控件 ---------- */
input[type=text], input[type=url], input[type=password], input[type=email],
input[type=number], input[type=date], textarea, select {
    background: #fff;
    border: 1.5px solid var(--lw-line);
    border-radius: var(--lw-radius-sm);
    padding: 9px 12px;
    color: var(--lw-ink);
    transition: border-color .25s ease, box-shadow .25s ease;
}
input[type=text]:focus, input[type=url]:focus, input[type=password]:focus,
input[type=email]:focus, input[type=number]:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--lw-rose);
    box-shadow: 0 0 0 4px rgba(212, 135, 154, 0.14);
}
.typecho-option label.typecho-label { color: var(--lw-rose-deep); font-weight: bold; }
.typecho-option .description { color: var(--lw-muted); }
.typecho-option-tabs li a { border-color: var(--lw-line); color: var(--lw-muted); background: #fff; }
.typecho-option-tabs li.current a, .typecho-option-tabs li.active a {
    background: var(--lw-grad) !important;
    color: #fff !important;
    border-color: transparent;
}

/* ---------- 提示消息 ---------- */
.message { border-radius: var(--lw-radius-sm); }
.error   { background: #fbe7e7; color: #a85454; }
.notice  { background: #fdf3d6; color: #9a7b28; }
.success { background: #e6f3e9; color: #4a7d57; }

/* ---------- 分页 ---------- */
.typecho-pager li a { border-radius: 30px; color: var(--lw-muted); }
.typecho-pager li a:hover { background: var(--lw-blush); color: var(--lw-rose-deep); }
.typecho-pager li.current a { background: var(--lw-grad); color: #fff; }

/* ---------- 页脚 ---------- */
.typecho-foot { padding: 40px 0 30px; color: var(--lw-muted); text-align: center; }
.typecho-foot .resource a { color: var(--lw-muted); margin: 0 4px; }
.typecho-foot .resource a:hover { color: var(--lw-rose-deep); }
.typecho-foot .copyright a { color: var(--lw-muted); }

/* ============================================================
   登录页重设计 —— 全屏渐变 + 玻璃拟态卡片 + 品牌动画
   ============================================================ */

/* 关键帧 */
@keyframes lw-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes lw-heartbeat {
    0%, 100% { transform: scale(1); }
    15%      { transform: scale(1.25); }
    30%      { transform: scale(1); }
    45%      { transform: scale(1.18); }
    60%      { transform: scale(1); }
}
@keyframes lw-float-a {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, -30px) scale(1.12); }
}
@keyframes lw-float-b {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-50px, 40px) scale(1.18); }
}

/* 全屏渐变背景 */
body.body-100 {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1200px 600px at 12% 8%, rgba(255, 214, 224, 0.55), transparent 60%),
        radial-gradient(1000px 520px at 88% 92%, rgba(233, 186, 201, 0.5), transparent 60%),
        linear-gradient(135deg, #fbeff2 0%, #f6dbe4 45%, #f3d0dd 100%);
}
/* 漂浮光斑 */
body.body-100::before,
body.body-100::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
    pointer-events: none;
    z-index: 0;
}
body.body-100::before {
    width: 320px; height: 320px;
    top: -60px; right: -40px;
    background: radial-gradient(circle, rgba(212,135,154,0.35), transparent 70%);
    animation: lw-float-a 14s ease-in-out infinite;
}
body.body-100::after {
    width: 380px; height: 380px;
    bottom: -100px; left: -60px;
    background: radial-gradient(circle, rgba(217,164,65,0.22), transparent 70%);
    animation: lw-float-b 18s ease-in-out infinite;
}

/* 居中容器 —— 改用 flex 替换原 display:table */
.typecho-login-wrap {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    padding: 24px;
}

/* 玻璃拟态卡片 */
.typecho-login {
    display: block !important;
    width: 400px;
    max-width: 100%;
    margin: auto;
    padding: 44px 40px 36px !important;
    text-align: center;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(183, 110, 121, 0.24);
    animation: lw-fade-up .7s cubic-bezier(.22,1,.36,1) both;
}
.typecho-login h1 { margin: 0 0 .2em !important; }

/* 品牌标题 —— 玫瑰金渐变文字 */
.lw-brand {
    font-size: 2.6em;
    font-weight: bold;
    letter-spacing: 2px;
    background: var(--lw-grad-deep);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}
/* 心形 —— 独立实色 + 心跳动画 */
.lw-heart {
    display: block;
    width: 54px;
    height: 50px;
    margin: 12px auto 6px;
    animation: lw-heartbeat 1.8s ease-in-out infinite;
    filter: drop-shadow(0 4px 14px rgba(224, 80, 122, 0.4));
}
.lw-heart svg {
    width: 100%;
    height: 100%;
    display: block;
}
/* 副标题 */
.lw-sub {
    margin: 0 0 28px;
    color: var(--lw-muted);
    font-size: 1.02em;
    letter-spacing: 3px;
}

/* 登录输入框 */
.typecho-login input[type=text],
.typecho-login input[type=password] {
    width: 100%;
    height: 50px;
    padding: 0 18px !important;
    margin-bottom: 16px;
    font-size: 1.05em;
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid var(--lw-line);
    border-radius: 14px;
    color: var(--lw-ink);
    box-sizing: border-box;
    transition: border-color .25s ease, box-shadow .25s ease;
}
.typecho-login input[type=text]:focus,
.typecho-login input[type=password]:focus {
    outline: none;
    border-color: var(--lw-rose);
    box-shadow: 0 0 0 4px rgba(212, 135, 154, 0.18);
    background: #fff;
}
.typecho-login input::placeholder { color: var(--lw-muted); }

/* 登录按钮 */
.typecho-login .submit { margin: 6px 0 0; }
.typecho-login button.btn.primary {
    width: 100%;
    height: 50px;
    font-size: 1.12em;
    letter-spacing: 4px;
    border: none;
    border-radius: 14px;
    background: var(--lw-grad-deep);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(183, 110, 121, 0.38);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.typecho-login button.btn.primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
    box-shadow: 0 14px 30px rgba(183, 110, 121, 0.48);
}
.typecho-login button.btn.primary:active { transform: translateY(0); }

/* 记住我 */
.typecho-login label { color: var(--lw-muted); font-size: .96em; }
.typecho-login .checkbox { accent-color: var(--lw-rose); }

/* 底部链接 */
.typecho-login .more-link {
    margin-top: 26px !important;
    color: var(--lw-muted) !important;
    font-size: .92em;
}
.typecho-login .more-link a {
    color: var(--lw-rose-deep);
    margin: 0 5px;
    transition: color .2s ease;
}
.typecho-login .more-link a:hover { color: var(--lw-rose); text-decoration: none; }

/* ---------- 响应式微调 ---------- */
@media (max-width: 640px) {
    .typecho-login { padding: 34px 24px 28px !important; border-radius: 20px; }
    .lw-brand { font-size: 2.2em; }
    body.body-100::before, body.body-100::after { display: none; }
    .typecho-head-nav { border-radius: 0; margin-top: 0; top: 0; }
    .container { padding-left: 14px; padding-right: 14px; }
    .typecho-list-table { border-width: 0; }
}

/* ---------- 刘海屏 / 灵动岛 / 圆角安全区（配合 viewport-fit=cover） ---------- */
/* 防止移动端浏览器自动放大正文字号（微信/UC/Chrome 等），并约束媒体不超出容器 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video { max-width: 100%; height: auto; }
/* 横屏时避免内容被刘海/挖孔（华为/苹果/三星/小米/OPPO/VIVO 等）遮挡，纵屏底部避免被手势条压住 */
@supports (padding: max(0px)) {
    .typecho-head-nav { padding-left: max(0px, env(safe-area-inset-left)); padding-right: max(0px, env(safe-area-inset-right)); }
    .typecho-page-main, .body.container > .row { padding-left: max(0px, env(safe-area-inset-left)); padding-right: max(0px, env(safe-area-inset-right)); }
    main .body.container { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
    .typecho-foot { padding-left: max(0px, env(safe-area-inset-left)); padding-right: max(0px, env(safe-area-inset-right)); padding-bottom: env(safe-area-inset-bottom); }
}
/* 小屏 + 横屏（手机躺倒）：顶部导航可横向滚动，不挤压 */
@media (max-width: 900px) and (orientation: landscape) {
    .typecho-head-nav .nav-menu, .typecho-head-nav ul { flex-wrap: wrap; }
}


/* ---------- 收尾：表单页卡片 + 原生控件配色 ---------- */
/* 设置/编辑表单页(role=form)内容装进白色圆角卡片，与仪表盘/列表视觉统一 */
.typecho-page-main[role="form"] {
    background: var(--lw-card);
    border: 1px solid var(--lw-line);
    border-radius: var(--lw-radius);
    box-shadow: var(--lw-shadow);
    padding: 28px 30px;
    margin-bottom: 22px;
}
.typecho-page-main[role="form"] .typecho-option-tabs { margin-bottom: 20px; }

/* 复选框 / 单选框：跟随玫瑰金主题，替换浏览器默认蓝灰 */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--lw-rose);
    width: 16px;
    height: 16px;
    vertical-align: -2px;
    cursor: pointer;
}

/* 下拉框：预留箭头空间，交互更柔和 */
select { padding-right: 30px; cursor: pointer; }


/* ---------- 字体：后台界面用清晰无衬线，仅品牌/标题点缀马善政 ---------- */
:root {
    --lw-ui-font: system-ui, -apple-system, "Segoe UI", "PingFang SC",
                  "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
                  "Noto Sans CJK SC", "WenQuanYi Micro Hei", sans-serif;
}
/* 界面功能文字统一无衬线（覆盖 style.css 的 Ma Shan Zheng） */
body, .typecho-head-nav, .typecho-head-nav a, .main, .container,
.typecho-list-table, .typecho-list-table th, .typecho-list-table td,
.typecho-page-title, .typecho-page-title a,
.welcome-board, .latest-link, .btn, .primary, .message,
.typecho-pager, .typecho-foot, .typecho-option, .typecho-option label,
.description, input, textarea, select, button {
    font-family: var(--lw-ui-font) !important;
}
/* 数字统计保持 Georgia（清晰衬线数字，比毛笔数字好读） */
.welcome-board em { font-family: Georgia, "Times New Roman", serif !important; }
/* 品牌与页面大标题保留马善政手写体做点缀 */
.typecho-login, .typecho-login *,
.lw-brand, .lw-sub, .typecho-page-title h2 {
    font-family: "Ma Shan Zheng", cursive !important;
}
