/* ============================================================
   云黑管理系统 · 首页样式（重设计版）
   ============================================================ */
* {
    padding: 0;
    margin: 0;
    outline: none;
    box-sizing: border-box;
}

p {
    font-family: inherit;
}

input {
    outline: none;
}

a {
    color: #334155;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

a:focus {
    outline: none;
    -moz-outline: none;
}

body {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    background-color: #f3f5f4;
    background-image: linear-gradient(180deg, #e8f5ee 0%, #f3f5f4 220px);
    background-repeat: no-repeat;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

header {
    width: 100%;
    height: 44px;
    background-color: #f0fdf4;
}

.head-bg {
    width: 100%;
    height: 300px;
}

.head-bg img {
    width: 100%;
    height: 100%;
}

/* ---------- 顶部搜索区 ---------- */
.main-top {
    position: relative;
    width: 94%;
    margin: 14px auto;
    border-radius: 18px;
    padding: 28px 20px 26px;
    background: linear-gradient(150deg, #059669 0%, #10b981 55%, #34d399 100%);
    box-shadow: 0 16px 40px -16px rgba(5, 150, 105, .55);
    overflow: hidden;
}

/* 背景光斑装饰 */
.main-top::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}

.main-top::after {
    content: "";
    position: absolute;
    bottom: -70px;
    left: -40px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.main-top .top-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 0;
}

.main-top .top-bg img {
    width: 100%;
}

.title-text {
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.title-text h2 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.title-text h4 {
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
    font-weight: 400;
    margin-top: 6px;
    letter-spacing: 1px;
}

/* ---------- 搜索表单 ---------- */
.form-group {
    width: 92%;
    margin: 22px auto 0;
    position: relative;
    z-index: 1;
}

.form-group .input-tiem {
    width: 100%;
    height: 46px;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px -10px rgba(0, 0, 0, .25);
    overflow: hidden;
}

.input-tiem input {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background-color: #ffffff;
    border: none;
    text-indent: 16px;
    font-size: 14px;
    color: #0f172a;
    caret-color: #10b981;
}

.input-tiem input::placeholder {
    color: #94a3b8;
}

.form-type {
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin: 16px auto;
}

.form-type a {
    background-color: rgba(255, 255, 255, .94);
    color: rgba(255, 255, 255, .9);
    font-size: 12px;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1.5px solid rgba(255, 255, 255, .85);
    box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .18);
    transition: all .25s ease;
}

.form-type a img {
    display: block;
}

.form-type a:active {
    transform: scale(.92);
}

.form-type .active {
    background-color: #ffffff;
    color: #059669;
    border: 1.5px solid #0f172a;
    font-weight: 600;
    box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .3);
}

.btn-box button {
    display: block;
    width: 100%;
    height: 44px;
    margin: 0 auto;
    border: none;
    border-radius: 12px;
    background-color: #0f172a;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 8px 20px -8px rgba(15, 23, 42, .5);
}

.btn-box button:active {
    transform: scale(.97);
    background-color: #1e293b;
}

/* ---------- 数据列表 ---------- */
.list-box {
    width: 94%;
    margin: 0 auto 90px;
    background-color: rgba(255, 255, 255, .98);
    position: relative;
    padding: 14px 0;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, .05);
    box-shadow: 0 8px 28px -16px rgba(15, 23, 42, .18);
}

.list-tiem {
    display: flex;
    position: relative;
    width: 90%;
    margin: 0 auto 14px;
    padding: 12px;
    border-radius: 14px;
    background-color: #f1f5f9;
    border: none;
    overflow: hidden;
    align-items: center;
    /* 拟态按钮：左上高光 + 右下投影，形成凸起立体感 */
    box-shadow: 5px 5px 12px rgba(148, 163, 184, .35), -5px -5px 12px rgba(255, 255, 255, .95);
    transition: box-shadow .18s ease, transform .12s ease, background-color .18s ease;
}

.list-tiem:active,
a:active .list-tiem {
    transform: translateY(1px) scale(.985);
    background-color: #eef2f6;
    /* 按压态：外阴影收为内阴影，呈现向下塌陷的按键效果 */
    box-shadow: inset 5px 5px 10px rgba(148, 163, 184, .45), inset -5px -5px 10px rgba(255, 255, 255, .96);
}

.list-tiem .list-img {
    display: inline-block;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    margin-right: 10px;
    flex-shrink: 0;
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.list-tiem .list-img img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

.list-tiem .list-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    font-size: 13px;
    color: #475569;
}

.list-tiem .list-text p {
    line-height: 1.5;
}

.list-tiem .list-text span {
    color: #0f172a;
    font-weight: 500;
}

.list-tiem .types {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #f43f5e, #fb7185);
    padding: 4px 10px;
    border-radius: 0 0 0 10px;
    color: #ffffff;
    font-size: 11px;
    letter-spacing: 1px;
}

.list-tiem .dates {
    position: absolute;
    bottom: 6px;
    right: 14px;
    color: #94a3b8;
    font-size: 11px;
}

/* ---------- 分页 ---------- */
.pagers {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 14px auto;
    gap: 6px;
}

.pagers a {
    background-color: #e2e8f0;
    color: #64748b;
    font-size: 12px;
    height: 30px;
    width: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 10px;
    transition: all .2s ease;
}

.pagers a:active {
    transform: scale(.9);
}

.pagers .active {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px -4px rgba(5, 150, 105, .5);
}

/* ---------- 搜索聚合卡片 ---------- */
.list-tiem .rec-count {
    color: #059669;
    font-weight: 600;
}

/* ---------- 详情弹层：单条记录块 ---------- */
.record-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    background-color: #f8fafc;
}

.record-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.record-type {
    background: #FF4668;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    letter-spacing: 1px;
}

.record-date {
    color: #94a3b8;
    font-size: 12px;
}

.record-liyou {
    font-size: 13px;
    color: #334155;
    margin-bottom: 8px;
    line-height: 1.7;
    /* 长文本/长链接自动断行，防止溢出容器 */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.record-item .pimg {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 8px 8px 0;
}

/* ---------- 点赞 / 分享按钮（圆形） ---------- */
.alerts .btnw .like-btn,
.alerts .btnw .share-btn {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    color: #94a3b8;
    border-color: #e2e8f0;
    background-color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.alerts .btnw .like-btn.liked {
    color: #f43f5e;
    border-color: #fecdd3;
    background-color: #fff1f2;
}

.alerts .btnw .like-btn:active {
    transform: scale(.94);
}

.alerts .btnw .share-btn {
    color: #2563eb;
    border-color: #bfdbfe;
    background-color: #eff6ff;
}

.alerts .btnw .share-btn:active {
    transform: scale(.94);
    background-color: #dbeafe;
}

.like-btn svg,
.share-btn svg {
    flex-shrink: 0;
}

.like-count {
    display: none;
    font-weight: 600;
    min-width: 14px;
}

.pagers .pg-ellipsis {
    color: #94a3b8;
    font-size: 12px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    padding: 0 2px;
    user-select: none;
}

/* ============================================================
   动态效果
   ============================================================ */

/* ---------- 列表卡片：弹簧式逐张渐显 ---------- */
.list-tiem.xq-reveal {
    opacity: 0;
}

.list-tiem.xq-in {
    animation: xqCardIn .62s cubic-bezier(.3, 1.25, .55, 1) both;
}

@keyframes xqCardIn {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(.96);
    }

    55% {
        opacity: 1;
        transform: translateY(-4px) scale(1.02);
    }

    76% {
        transform: translateY(1px) scale(.998);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---------- 详情展开时首页退场（保留占位，避免页面跳动） ---------- */
#main {
    transition: opacity .28s ease, filter .28s ease;
}

#main.xq-dim {
    opacity: 0;
    filter: blur(2px);
    pointer-events: none;
}
