@charset "utf-8";
/* ============================================================
   交友盲盒 · 公共视觉主题（全站共享，移动端优先）
   只做渐进增强：不改变任何 JS 依赖的 id / class / 结构
   ============================================================ */

:root {
    --mh-bg: #020617;
    --mh-bg-soft: #0b1224;
    --mh-card: rgba(15, 23, 42, .88);
    --mh-card-border: rgba(148, 163, 184, .24);
    --mh-text: #e5e7eb;
    --mh-text-dim: #94a3b8;
    --mh-accent: #818cf8;
    --mh-accent-2: #ec4899;
    --mh-gold: #fbbf24;
    --mh-radius-lg: 24px;
    --mh-radius-md: 16px;
    --mh-shadow-lg: 0 24px 60px rgba(2, 6, 23, .72);
    --mh-ease: cubic-bezier(.22, .61, .36, 1);
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

::selection {
    background: rgba(129, 140, 248, .45);
    color: #fff;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
}

/* 隐藏移动端滚动条，避免破坏沉浸式布局 */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.mh-home,
.mh-record-scroll,
.mh-user-scroll,
.mh-form-page {
    animation: mh-page-in .42s var(--mh-ease) both;
}

@keyframes mh-page-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 底部导航：适配 iOS 安全区 + 玻璃质感增强 */
.aui-footer {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    padding-bottom: 10px;
}

.aui-tabBar-item {
    -webkit-user-select: none;
    user-select: none;
}

.aui-tabBar-item:active .aui-tabBar-item-icon {
    transform: scale(.92);
}

.aui-tabBar-item-icon {
    transition: transform .16s var(--mh-ease), background .2s ease, border-color .2s ease;
}

/* 通用卡片浮起反馈 */
.mh-section-card,
.mh-record-card,
.mh-info-card,
.jq22-invitation-item {
    transition: transform .2s var(--mh-ease), box-shadow .2s var(--mh-ease);
}

.mh-record-card:active {
    transform: scale(.985);
}

/* 统一按钮点击反馈 */
.mh-btn,
.mh-link-btn,
.mh-record-btn,
.mh-save-btn,
.mh-action-tile,
.jq22-tabBar-item {
    -webkit-user-select: none;
    user-select: none;
}

.mh-btn:focus-visible,
.mh-save-btn:focus-visible,
.mh-record-btn:focus-visible,
.mh-link-btn:focus-visible {
    outline: 2px solid rgba(251, 191, 36, .8);
    outline-offset: 3px;
}

/* ---------- 省市选择弹层 ---------- */
.mh-city-layer {
    border-radius: var(--mh-radius-lg) !important;
}

.mh-city-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 4px 0 2px;
}

.mh-city-picker .mh-city-hint {
    flex: 0 0 100%;
    margin: 0 0 2px;
    font-size: 12px;
    color: var(--mh-text-dim);
}

.mh-city-picker select.shortselect {
    flex: 1 1 44%;
    width: auto;
    min-width: 0;
    min-height: 42px;
    padding: 0 34px 0 12px;
    color: #f1f5f9;
    font-size: 14px;
    background-color: rgba(2, 6, 23, .7);
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 12px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%),
        linear-gradient(135deg, #94a3b8 50%, transparent 50%);
    background-position: calc(100% - 18px) 19px, calc(100% - 12px) 19px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.mh-city-picker select.shortselect:focus {
    border-color: rgba(129, 140, 248, .85);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .18);
}

/* ---------- layer 弹层暗色主题（layer.css 未引入时的兜底） ---------- */
.layui-layer {
    background: linear-gradient(165deg, rgba(15, 23, 42, .97), rgba(2, 6, 23, .95)) !important;
    color: var(--mh-text);
    border-radius: var(--mh-radius-lg) !important;
    border: 1px solid rgba(148, 163, 184, .28);
    box-shadow: 0 32px 80px rgba(2, 6, 23, .82) !important;
    overflow: hidden;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

.layui-layer.beijing_kong,
.layui-layer.beijing_kong .layui-layer-content {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.layui-layer-title {
    height: 48px !important;
    line-height: 48px !important;
    padding: 0 54px 0 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    letter-spacing: .04em;
    color: #f8fafc !important;
    background: linear-gradient(120deg, rgba(99, 102, 241, .35), rgba(236, 72, 153, .28)) !important;
    border-bottom: 1px solid rgba(148, 163, 184, .16) !important;
}

.layui-layer-content {
    padding: 18px 20px !important;
    color: #e2e8f0 !important;
    line-height: 1.65;
    font-size: 14px;
}

.layui-layer-content a {
    color: #a5b4fc;
}

.layui-layer-content img {
    border-radius: 10px;
}

.layui-layer-content h1,
.layui-layer-content h2 {
    color: #f8fafc;
}

.layui-layer-btn {
    padding: 4px 20px 18px !important;
    text-align: right;
    border-top: 1px solid rgba(148, 163, 184, .14);
    margin-top: 4px;
}

.layui-layer-btn a {
    display: inline-block;
    height: 38px !important;
    line-height: 38px !important;
    padding: 0 22px !important;
    margin: 8px 0 0 10px !important;
    border: 0 !important;
    border-radius: 999px !important;
    font-size: 14px !important;
    font-weight: 600;
    color: #e2e8f0 !important;
    background: rgba(148, 163, 184, .16) !important;
    cursor: pointer;
}

.layui-layer-btn .layui-layer-btn0 {
    color: #fff !important;
    background: linear-gradient(135deg, #6366f1, #8b5cf6 45%, #ec4899) !important;
    box-shadow: 0 12px 26px rgba(99, 102, 241, .38);
}

.layui-layer-setwin {
    position: absolute;
    top: 13px;
    right: 14px;
    z-index: 10;
}

.layui-layer-setwin a {
    display: inline-block;
    width: 26px;
    height: 26px;
    line-height: 24px;
    margin-left: 8px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .35);
    text-align: center;
    font-size: 16px;
    font-style: normal;
    color: #cbd5e1 !important;
    background: rgba(2, 6, 23, .5);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.layui-layer-setwin .layui-layer-close1::after {
    content: "\00d7";
}

.layui-layer-setwin .layui-layer-close2::after {
    content: "\00d7";
}

.layui-layer-title + .layui-layer-content {
    padding-top: 20px !important;
}

.layui-layer-loading,
.layui-layer-loading .layui-layer-content {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* 图片弹层里的关闭按钮保持浅色 */
.layui-layer.beijing_kong .layui-layer-setwin a {
    background: rgba(15, 23, 42, .65);
}

/* 小屏幕与低端设备适配 */
@media (prefers-reduced-motion: reduce) {
    .mh-home,
    .mh-record-scroll,
    .mh-user-scroll,
    .mh-form-page,
    .mh-avatar-sphere {
        animation: none !important;
    }

    * {
        transition-duration: .01ms !important;
    }
}
