/* 中介导航主页样式 - 设计感质感豪华版 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 30%, #e2e8f0 100%);
    min-height: 100vh;
    padding-bottom: 70px;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    max-width: 720px;
    margin: 0 auto;
}

/* 置顶栏 */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px 19px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.95) 100%);
    box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 7px 26px rgba(0,0,0,0.04), 0 -1px 0 rgba(255,255,255,0.9) inset;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(59,130,246,0.08);
}

.top-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 31px;
    height: 3px;
    background: linear-gradient(90deg, rgba(59,130,246,0.4), rgba(59,130,246,0.1), rgba(59,130,246,0.4));
    border-radius: 2px;
    opacity: 0.8;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.top-bar-right {
    display: flex;
    align-items: center;
}

.top-bar .avatar {
    width: 50px;
    height: 50px;
    border-radius: 17px;
    overflow: hidden;
    border: 1px solid rgba(59,130,246,0.15);
    box-shadow: 0 3px 15px rgba(0,0,0,0.08), 0 1px 0 rgba(255,255,255,0.8) inset;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    position: relative;
}

.top-bar .avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 100%);
    border-radius: 17px 17px 0 0;
    pointer-events: none;
}

.top-bar .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-badge {
    width: 75px;
    height: auto;
    display: block;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    filter: drop-shadow(0 3px 10px rgba(59,130,246,0.18));
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-name {
    color: #1e293b;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.user-name::after {
    content: '';
    width: 14px;
    height: 14px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%233b82f6"><path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/></svg>') no-repeat center;
    background-size: contain;
    opacity: 0.9;
}

.online-time {
    color: #64748b;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.online-time::before {
    content: '';
    width: 7px;
    height: 7px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(74,222,128,0.15), 0 0 0 1px rgba(34,197,94,0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

/* 联系账号栏 */
.contact-bar {
    margin: 11px 17px 9px;
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.95) 100%);
    border-radius: 19px;
    padding: 9px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04), 0 1px 0 rgba(255,255,255,0.85) inset;
    transition: all 0.35s cubic-bezier(0.2,0.8,0.3,1);
    border: 1px solid rgba(59,130,246,0.06);
    position: relative;
    overflow: hidden;
}

.contact-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, transparent 50%, transparent 100%);
    pointer-events: none;
}

.contact-bar:hover {
    box-shadow: 0 7px 29px rgba(59,130,246,0.12), 0 1px 0 rgba(255,255,255,0.95) inset;
    transform: translateY(-2px);
}

.contact-icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    overflow: visible;
}

.contact-icon img {
    width: 34px;
    height: 34px;
    display: block;
    object-fit: cover;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.contact-label {
    font-size: 9px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.contact-label::before {
    content: '';
    width: 3px;
    height: 3px;
    background: #3b82f6;
    border-radius: 50%;
    opacity: 0.8;
}

.contact-value {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.2px;
}

.contact-spacer {
    flex: 1;
}

.btn-copy {
    padding: 7px 13px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2,0.8,0.3,1);
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(59,130,246,0.3), 0 1px 0 rgba(255,255,255,0.2) inset;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-copy::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.5s ease;
}

.btn-copy:hover::after {
    left: 100%;
}

.btn-copy:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 7px 19px rgba(59,130,246,0.4), 0 1px 0 rgba(255,255,255,0.25) inset;
}

.btn-copy:active {
    transform: translateY(0) scale(0.98);
}

.btn-download {
    padding: 7px 13px;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2,0.8,0.3,1);
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(31,41,55,0.3), 0 1px 0 rgba(255,255,255,0.1) inset;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-download::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-download:hover::after {
    left: 100%;
}

.btn-download:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 7px 19px rgba(31,41,55,0.4), 0 1px 0 rgba(255,255,255,0.15) inset;
}

.btn-download:active {
    transform: translateY(0) scale(0.98);
}

/* 流动公告栏 */
.notice-bar {
    margin: 0 17px 14px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 15px;
    padding: 9px 15px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(59,130,246,0.1), 0 1px 0 rgba(255,255,255,0.7) inset;
    border: 1px solid rgba(59,130,246,0.15);
    position: relative;
}

.notice-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 50%, transparent 100%);
    pointer-events: none;
}

.notice-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notice-icon {
    font-size: 15px;
    flex-shrink: 0;
    opacity: 0.95;
    filter: drop-shadow(0 1px 2px rgba(59,130,246,0.2));
}

.notice-text-wrapper {
    flex: 1;
    overflow: hidden;
}

.notice-text {
    display: flex;
    gap: 60px;
    animation: scrollNotice 30s linear infinite;
    white-space: nowrap;
}

.notice-text span {
    color: #1e40af;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

@keyframes scrollNotice {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 群聊推荐区 */
.group-section {
    padding: 0 17px;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.section-title-note {
    font-size: 10px;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 19px;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 3px;
    box-shadow: 0 3px 9px rgba(59,130,246,0.25);
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(59,130,246,0.3), transparent);
    margin-left: 7px;
}

.group-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.group-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.95) 100%);
    border-radius: 20px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 3px 15px rgba(0,0,0,0.03), 0 1px 0 rgba(255,255,255,0.9) inset;
    border: 1px solid rgba(59,130,246,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.group-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, transparent 100%);
    pointer-events: none;
}

.group-card:hover {
    box-shadow: 0 10px 34px rgba(59,130,246,0.18), 0 1px 0 rgba(255,255,255,0.95) inset;
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(59,130,246,0.2);
}

.card-type-label {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    min-width: 46px;
    padding: 4px 9px 5px;
    border-radius: 20px 0 14px 0;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.2px;
    box-shadow: 0 5px 14px rgba(15,23,42,0.14);
}

.card-type-group {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.card-type-platform {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.group-avatar {
    width: 54px;
    height: 54px;
    border-radius: 19px;
    overflow: hidden;
    box-shadow: 0 5px 17px rgba(0,0,0,0.08), 0 1px 0 rgba(255,255,255,0.75) inset;
    border: 1px solid rgba(59,130,246,0.1);
    position: relative;
}

.group-avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 100%);
    border-radius: 19px 19px 0 0;
    pointer-events: none;
}

.group-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-name {
    font-size: 13px;
    font-weight: 700;
    color: #dc2626;
    letter-spacing: -0.2px;
    text-align: center;
}

.tag {
    margin-top: 3px;
    padding: 5px 13px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #f7d774;
    font-size: 10px;
    border-radius: 17px;
    font-weight: 600;
    box-shadow: 0 3px 12px rgba(249,115,22,0.28), 0 1px 0 rgba(255,255,255,0.22) inset;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.tag::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 群聊详情弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 22px;
    width: 90%;
    max-width: 312px;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalIn 0.5s cubic-bezier(0.2,0.8,0.3,1);
    box-shadow: 0 17px 51px rgba(0,0,0,0.22), 0 1px 0 rgba(255,255,255,0.85) inset;
    border: 1px solid rgba(59,130,246,0.12);
    position: relative;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(26px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: flex-end;
    padding: 6px 10px 2px;
}

.modal-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.03);
    font-size: 16px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0,0,0,0.08);
    color: #1e293b;
    transform: rotate(90deg);
}

.modal-body {
    padding: 0 14px 12px;
}

.modal-header-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 0;
}

.detail-avatar {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1), 0 1px 0 rgba(255,255,255,0.75) inset;
    border: 1px solid rgba(59,130,246,0.15);
    position: relative;
    flex-shrink: 0;
}

.detail-avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 100%);
    border-radius: 13px 13px 0 0;
    pointer-events: none;
}

.detail-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-name {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.3px;
    margin: 0;
}

.detail-welfare, .detail-intro {
    margin-bottom: 10px;
}

.welfare-title, .intro-title {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: -0.2px;
}

.welfare-title::before, .intro-title::before {
    content: '';
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 2px;
    box-shadow: 0 3px 9px rgba(59,130,246,0.25);
}

.welfare-content {
    background: rgba(255,255,255,0.96);
    padding: 10px 12px;
    border-radius: 12px;
    color: #475569;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 500;
    border: 1px solid rgba(59,130,246,0.06);
    box-shadow: 0 3px 12px rgba(0,0,0,0.04), 0 1px 0 rgba(255,255,255,0.85) inset;
    position: relative;
}

.welfare-content::before {
    content: none;
}

.detail-intro img {
    width: 100%;
    border-radius: 12px;
    display: block;
    box-shadow: 0 5px 19px rgba(0,0,0,0.12), 0 1px 0 rgba(255,255,255,0.75) inset;
    border: 1px solid rgba(59,130,246,0.08);
}

.platform-action {
    margin-top: 10px;
}

.platform-btn {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(22,163,74,0.24);
    -webkit-tap-highlight-color: transparent;
}

.platform-btn:active {
    transform: translateY(1px);
    box-shadow: 0 5px 14px rgba(22,163,74,0.22);
}

.intro-images {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.intro-images img {
    width: 100%;
    display: block;
    border-radius: 10px;
    object-fit: contain;
    background: #f8fafc;
}

.intro-image-btn {
    display: block;
    line-height: 0;
}

@media (max-width: 768px) {
    .top-bar-right {
        align-self: stretch;
        overflow: visible;
    }

    .status-badge {
        width: 82px;
        max-height: none;
        object-fit: contain;
    }

    .group-card {
        padding-top: 22px;
    }
    .card-type-label {
        top: 0;
        left: 0;
        width: auto;
        min-width: 0;
        max-width: none;
        padding: 3px 8px 4px 12px;
        border-radius: 0 0 9px 0;
        font-size: 10px;
        line-height: 1.15;
        letter-spacing: 0;
        white-space: nowrap;
        text-align: right;
        box-shadow: none;
        transform: none;
        transform-origin: left top;
    }
    .group-name {
        padding-left: 0;
        min-height: 18px;
    }
}

.intro-images {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
}

.image-zoom-trigger {
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    display: block;
    width: 100%;
    cursor: zoom-in;
    line-height: 0;
}

.image-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, .82);
}

.image-preview-modal.show {
    display: flex;
}

.image-preview-modal img {
    max-width: 96vw;
    max-height: 88vh;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
}

.image-preview-close {
    position: fixed;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: #111827;
    font-size: 24px;
    line-height: 34px;
    cursor: pointer;
}

@media (max-width: 520px) {
    .intro-images {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
