/* ========== 校园圈圈 · 社团频道 视觉系统 ==========
   基调：暖白米黄，克制主色
   首页 —— 干净的产品列表风（顶部栏 + 欢迎语 + 搜索 + 排序 + 卡片）
   详情 —— 大厂感，白底 + 深色文字强对比，橙色仅做关键点缀
   —— 不再用 emoji 堆砌、花哨渐变、大面积圆角卡片
*/

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
    margin: 0; padding: 0;
    background: #fff8e7;
    color: #1f1a15;
    font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ==================== Hero 欢迎区（紧凑） ==================== */
.xcx-hero {
    padding: 26px 20px 4px;
}
.hero-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.hero-txt { min-width: 0; }
.xcx-hero .greet {
    font-size: 24px; font-weight: 800;
    line-height: 1.3; color: #1f1a15;
    letter-spacing: -0.6px;
}
.xcx-hero .greet .accent { color: #ff6a2a; }
.xcx-hero .greet-sub {
    margin-top: 4px;
    color: #8a7466; font-size: 13px; font-weight: 500;
}
/* 社团入驻入口 */
.join-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    margin-top: 4px;
    padding: 7px 13px;
    border-radius: 999px;
    background: #ff6a2a;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(255, 106, 42, 0.28);
    transition: transform .1s ease, background .15s ease;
}
.join-pill:active { transform: scale(0.94); background: #e85512; }

/* ==================== 搜索框 ==================== */
.xcx-search {
    margin: 12px 18px 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    height: 46px;
    display: flex; align-items: center;
    padding: 0 6px 0 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.xcx-search .icon { color: #ff6a2a; font-size: 15px; margin-right: 8px; }
.xcx-search input {
    flex: 1; border: 0; background: transparent; outline: none;
    font-size: 14.5px; color: #1f1a15;
}
.xcx-search input::placeholder { color: #b5a394; }
.xcx-search .clear { color: #b5a394; padding: 4px 8px; cursor: pointer; display: none; }
.xcx-search.has-value .clear { display: inline; }
.xcx-search .btn {
    background: #1f1a15; color: #fff; font-weight: 700;
    border: 0; height: 34px; padding: 0 18px;
    border-radius: 9px; cursor: pointer; font-size: 14px;
    transition: background .15s, transform .1s;
}
.xcx-search .btn:active { background: #000; transform: scale(0.96); }

/* ==================== 社团卡片 ==================== */
.xcx-cards {
    margin: 14px 18px 40px;
    display: flex; flex-direction: column; gap: 12px;
}
.xcx-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex; flex-direction: column; gap: 10px;
    min-width: 0;
    position: relative;
    overflow: hidden;
    transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s ease, border-color .25s ease;
}
.xcx-card::before {
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #ff6a2a;
    transform: scaleY(0);
    transform-origin: center;
    transition: transform .25s cubic-bezier(.2,.7,.3,1);
}
.xcx-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(20, 14, 10, 0.08);
    border-color: rgba(255, 106, 42, 0.3);
}
.xcx-card:hover::before { transform: scaleY(1); }
.xcx-card:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.xcx-card .head { display: flex; align-items: center; gap: 12px; }
.xcx-card .avatar {
    width: 48px; height: 48px;
    border-radius: 12px; overflow: hidden;
    background: #ffe9d9;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
    transition: transform .3s cubic-bezier(.2,.7,.3,1);
}
.xcx-card:hover .avatar { transform: scale(1.05) rotate(-3deg); }
.xcx-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.xcx-card .head-meta { min-width: 0; }
.xcx-card .name {
    font-weight: 800; color: #1f1a15; font-size: 16px;
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.xcx-card .time { color: #9a8675; font-size: 12.5px; margin-top: 2px; }
.xcx-card .stats {
    margin-left: auto; color: #9a8675; font-size: 13px;
    flex-shrink: 0;
    transition: color .2s, transform .2s;
}
.xcx-card:hover .stats { color: #ff6a2a; transform: translateX(2px); }
.xcx-card .title {
    color: #1f1a15; font-size: 15px; font-weight: 600;
    letter-spacing: -0.2px;
}
.xcx-card .desc {
    color: #5c5148; font-size: 14px; line-height: 1.65;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.xcx-card .photo {
    width: 100%; aspect-ratio: 16 / 9;
    border-radius: 12px; overflow: hidden;
    background: #f3ece2;
    position: relative;
}
.xcx-card .photo img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .5s cubic-bezier(.2,.7,.3,1);
}
.xcx-card:hover .photo img { transform: scale(1.04); }
.xcx-card .meta-row {
    display: flex; gap: 14px;
    color: #9a8675; font-size: 12.5px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.xcx-card .meta-row .item { display: flex; align-items: center; gap: 4px; }

/* ==================== 详情页 ==================== */
.xcx-detail {
    background: #fff;
    min-height: 100vh;
    padding-bottom: 40px;
}
@media (min-width: 560px) {
    .xcx-detail { box-shadow: 0 0 40px rgba(0,0,0,.06); }
}

.xcx-back {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 14px 18px 6px;
    color: #8a7466; font-size: 13.5px; font-weight: 600;
}
.xcx-back:active { color: #1f1a15; }

/* 头部：logo + 标题 */
.d-header {
    display: flex; align-items: center; gap: 16px;
    padding: 8px 20px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}
.d-logo {
    width: 68px; height: 68px;
    border-radius: 16px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 30px; flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0,0,0,.14);
}
.d-logo img { width: 100%; height: 100%; object-fit: cover; }
.d-titles { min-width: 0; }
.d-titles h1 {
    margin: 0; font-size: 23px; font-weight: 800; color: #1f1a15;
    letter-spacing: -0.5px; line-height: 1.25;
    word-break: break-word;
}
.d-titles .d-motto {
    margin: 6px 0 0; color: #7a6a5c; font-size: 14px; font-weight: 500;
}

/* 元信息 chips */
.d-meta {
    display: flex; gap: 8px; flex-wrap: wrap;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}
.d-chip {
    background: #f5ede3; color: #6b5a4b;
    border-radius: 8px; padding: 4px 11px;
    font-size: 12.5px; font-weight: 600;
}

/* 内容区块（分隔线式，非卡片） */
.d-section {
    padding: 22px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}
.d-section h3 {
    margin: 0 0 12px;
    font-size: 16px; font-weight: 800; color: #1f1a15;
    letter-spacing: -0.3px;
}
.d-section .d-body p {
    margin: 0 0 8px; color: #4a423a; font-size: 14.5px; line-height: 1.75;
}
.d-section .d-body p:last-child { margin-bottom: 0; }

/* 照片网格 */
.d-photos {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.d-photo {
    aspect-ratio: 4 / 3;
    border-radius: 12px; overflow: hidden;
    background: #f3ece2;
}
.d-photo img { width: 100%; height: 100%; object-fit: cover; }

/* 部门 */
.d-dept-grid { display: flex; flex-direction: column; gap: 14px; }
.d-dept-name {
    font-weight: 700; color: #1f1a15; font-size: 15px;
    margin-bottom: 4px;
}
.d-dept-desc { color: #5c5148; font-size: 14px; line-height: 1.65; }

/* 加入我们 按钮 */
.d-join-bar {
    padding: 22px 20px 10px;
    text-align: center;
}
.d-join-btn {
    width: 100%; height: 50px;
    background: #ff6a2a; color: #fff;
    border: 0; border-radius: 12px;
    font-size: 16px; font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(255, 106, 42, 0.3);
    transition: transform .15s, box-shadow .15s;
}
.d-join-btn:active { transform: scale(0.98); box-shadow: 0 2px 8px rgba(255,106,42,.3); }
.d-join-hint {
    margin: 10px 0 0; color: #b5a394; font-size: 12px;
}

/* ==================== 底部面板（加入我们） ==================== */
.d-sheet-mask {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(20, 14, 10, 0.45);
    display: none; align-items: flex-end; justify-content: center;
}
.d-sheet-mask.on { display: flex; }
.d-sheet {
    width: 100%; max-width: 480px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 18px 18px max(18px, env(safe-area-inset-bottom));
    box-shadow: 0 -6px 24px rgba(0,0,0,.12);
}
.d-sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.d-sheet-head h4 { margin: 0; font-size: 17px; font-weight: 800; color: #1f1a15; }
.d-sheet-close {
    width: 28px; height: 28px; border-radius: 50%;
    background: #f2eae0; color: #6b5a4b;
    border: 0; font-size: 14px; cursor: pointer;
}
.d-sheet-list { display: flex; flex-direction: column; gap: 8px; }
.d-row {
    display: flex; align-items: center; gap: 12px;
    width: 100%; background: #faf5ef;
    border: 0; border-radius: 12px;
    padding: 14px 16px; cursor: pointer;
    transition: background .15s;
}
.d-row:active { background: #f2eae0; }
.d-row-ic {
    width: 34px; height: 34px; border-radius: 9px;
    background: #1f1a15; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.d-row-lb { font-size: 15px; font-weight: 700; color: #1f1a15; }
.d-row-arrow { margin-left: auto; color: #b5a394; font-size: 18px; }

/* ==================== 弹窗（二维码 / 电话） ==================== */
.d-mask {
    position: fixed; inset: 0; z-index: 110;
    background: rgba(20, 14, 10, 0.5);
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.d-mask.on { display: flex; }
.d-modal {
    background: #fff; border-radius: 18px;
    padding: 26px 22px;
    width: 100%; max-width: 320px;
    text-align: center;
    position: relative;
    box-shadow: 0 16px 40px rgba(0,0,0,.2);
}
.d-modal-close {
    position: absolute; top: 14px; right: 14px;
    width: 28px; height: 28px; border-radius: 50%;
    background: #f2eae0; color: #6b5a4b;
    border: 0; font-size: 14px; cursor: pointer;
}
.d-modal h4 { margin: 0 0 6px; color: #1f1a15; font-size: 17px; font-weight: 800; }
.d-modal p { margin: 0 0 16px; color: #8a7466; font-size: 13px; }
.d-qr {
    width: 200px; height: 200px;
    background: #faf5ef; border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.08);
    margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    color: #b5a394; font-size: 12px; overflow: hidden;
}
.d-qr img { width: 100%; height: 100%; object-fit: contain; }
.d-phone { color: #ff6a2a; font-size: 26px; font-weight: 800; letter-spacing: 0.5px; margin: 4px 0 16px; }
.d-call {
    display: block; margin-top: 6px;
    background: #ff6a2a; color: #fff;
    border-radius: 12px; padding: 12px 0;
    font-weight: 800; font-size: 15px;
}

/* ==================== 空态 ==================== */
.xcx-empty {
    text-align: center; padding: 70px 20px;
    color: #b5a394;
}
.xcx-empty .ic { font-size: 52px; opacity: 0.55; margin-bottom: 12px; }
.xcx-empty .tip { font-size: 14px; }

/* ==================== 桌面/PC 预览时居中窄栏（web-view 恒窄屏，仅调试用） ==================== */
@media (min-width: 560px) {
    body { background: #f1e3d2; display: flex; justify-content: center; }
    .xcx-wrap { max-width: 480px; width: 100%; min-height: 100vh; }
}

/* ==================== 简易动效 ==================== */
@keyframes sheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.d-sheet-mask.on .d-sheet { animation: sheetUp .28s ease-out both; }
@keyframes modalPop {
    from { transform: scale(0.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.d-mask.on .d-modal { animation: modalPop .2s ease-out both; }
@keyframes cardFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.xcx-card { animation: cardFadeUp .32s cubic-bezier(.2,.7,.3,1) both; }
.xcx-cards .xcx-card:nth-child(1)  { animation-delay: 0.01s; }
.xcx-cards .xcx-card:nth-child(2)  { animation-delay: 0.04s; }
.xcx-cards .xcx-card:nth-child(3)  { animation-delay: 0.07s; }
.xcx-cards .xcx-card:nth-child(4)  { animation-delay: 0.10s; }
.xcx-cards .xcx-card:nth-child(5)  { animation-delay: 0.13s; }
.xcx-cards .xcx-card:nth-child(6)  { animation-delay: 0.16s; }
.xcx-cards .xcx-card:nth-child(n+7) { animation-delay: 0.20s; }

.xcx-card { cursor: pointer; }
