/* 页面整体字体和背景颜色 */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f8f2ef; /* 公司站 secondary 背景色 */
    color: #232323;            /* 公司站 primary 字体色 */
}

/* 顶部导航条 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030;
    padding: 1rem 0;
    transition: background-color 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
    min-height: 70px;
}

.top-nav.transparent {
    background: transparent;
    box-shadow: none;
}

.top-nav.transparent.scrolled {
    background: rgba(35, 35, 35, 0.96); /* 对应 #232323 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.top-nav.solid {
    background: #232323;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.top-nav .navbar-brand,
.top-nav .nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
}

.top-nav .nav-link {
    font-weight: 500;
    padding: 0.8rem 1rem;
    position: relative;
}

.top-nav .nav-small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem !important;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    line-height: 1;
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
}

.top-nav .nav-small-button:hover {
    border-color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
}

/* 右上角用户名下拉菜单 */
.nav-user {
    position: relative;
}

.nav-username {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-username::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.82);
    transform: translateY(1px);
    opacity: 0.9;
}

.nav-user-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 160px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
    z-index: 2000;
}

.nav-user:hover .nav-user-menu,
.nav-user:focus-within .nav-user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-user-menu-item {
    display: block;
    padding: 10px 10px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 500;
}

.nav-user-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.top-nav .nav-link.active::after,
.top-nav .nav-link:hover::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.35rem;
    height: 2px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 999px;
}

/* 首页大横幅（Banner） */
.home-banner {
    min-height: 100vh;
    background: linear-gradient(120deg, #2563eb, #1d4ed8);
    color: #fff;
    position: relative;
    overflow: hidden;
    padding-top: 90px; /* 留出导航高度，避免被遮住 */
    padding-bottom: 60px; /* 不做重叠，正常留白 */
    display: flex;
    align-items: center;
}

.home-banner > .container {
    position: relative;
    z-index: 2;
}

.home-banner-text-box {
    max-width: 640px;
}

.home-banner::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -80px;
    width: 360px;
    height: 360px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3), transparent 70%);
    opacity: 0.7;
}

.home-banner-bg {
    background: #111827;
    background-image: url("https://tc-new.z.wiki/autoupload/Dx4Nks0S7QIuP-1A4yThKk50XNvH7SFq10KSpAxmNmg/20250828/SJOE/4000X2250/banner%E5%B0%8F.jpeg/webp");
    background-size: cover;
    background-position: center;
}

.home-banner-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.home-banner-bg::after {
    content: none;
}

.home-banner-big-title {
    font-size: 2.4rem;
    font-weight: 800;
}

.home-banner-small-title {
    font-size: 1.05rem;
    max-width: 520px;
}

/* Banner 下面的主体内容区域 */
.main-container {
    margin-top: 0;
    position: relative;
    z-index: 2;
    padding-top: 90px; /* 给非首页页面留出导航高度 */
}

/* 首页的 main 顶部可以小一点，因为上面有大横幅 */
.main-home {
    padding-top: 40px;
}

.banner-button-outline {
    border-width: 2px;
}

/* 首页四个功能卡片的外层间距 */
.home-section {
    margin-bottom: 32px;
}

/* 首页卡片外观 */
.home-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 18px 45px -20px rgba(15, 23, 42, 0.35);
}

.home-card-text {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.6;
}

.home-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 60px -28px rgba(15, 23, 42, 0.45);
}

.home-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
}

.home-card-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.home-card-more {
    font-size: 0.9rem;
}

/* 电商风格卡片：二手 / 超市 / 失物 */
.market-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

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

@media (max-width: 576px) {
    .market-grid {
        grid-template-columns: 1fr;
    }
}

.market-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 45px -28px rgba(15, 23, 42, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.market-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 60px -32px rgba(15, 23, 42, 0.38);
}

.market-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f3f4f6;
    display: block;
    object-fit: cover;
}

.market-body {
    padding: 12px 14px 14px;
}

.market-title {
    font-size: 0.98rem;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}

.market-desc {
    color: #6b7280;
    font-size: 0.86rem;
    line-height: 1.4;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.3em;
}

.market-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.market-price {
    font-weight: 800;
    font-size: 1.05rem;
    color: #ef4444;
    white-space: nowrap;
}

.market-submeta {
    color: #6b7280;
    font-size: 0.78rem;
    white-space: nowrap;
}

/* 信息流卡片：活动 / 论坛（偏 X/INS 的 feed） */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feed-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 45px -30px rgba(15, 23, 42, 0.25);
    padding: 14px 16px;
}

.feed-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.feed-title {
    font-weight: 800;
    font-size: 1.02rem;
    margin: 0;
    line-height: 1.25;
}

.feed-title a {
    color: #111827;
    text-decoration: none;
}

.feed-title a:hover {
    color: #2563eb;
}

.feed-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.feed-text {
    color: #374151;
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 0 0 10px;
}

.feed-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: #6b7280;
    font-size: 0.82rem;
}

/* 小列表：活动 / 二手 / 失物 / 帖子 */
.item-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.item-row:last-child {
    border-bottom: none;
}

.item-title-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: #111827;
    text-decoration: none;
}

.item-title-link:hover {
    color: #2563eb;
}

.item-meta-text {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
    margin-left: 12px;
}

/* 小圆角标签，例如“已解决/紧急” */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
}

.status-badge-success {
    background-color: #dcfce7;
    color: #15803d;
}

.status-badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge-muted {
    background-color: #e5e7eb;
    color: #4b5563;
}

/* 页面底部区域 */
.page-footer {
    background-color: #232323;
    color: #f8f2ef;
}

.page-footer-links a {
    color: rgba(248, 242, 239, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
}

.page-footer-links a:hover {
    color: #f8f2ef;
}

@media (max-width: 768px) {
    .home-banner {
        height: auto;
        min-height: 100vh;
        padding: 90px 0 48px;
    }

    .main-container {
        margin-top: 0;
        padding-top: 24px;
    }
}

@media (max-width: 992px) {
    .top-nav .navbar-collapse {
        background: rgba(35, 35, 35, 0.92);
        border: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 0.75rem;
        border-radius: 14px;
        margin-top: 0.75rem;
    }

    .top-nav .navbar-nav .nav-link {
        padding: 0.85rem 0.9rem;
        border-radius: 10px;
    }

    .top-nav .navbar-nav .nav-link:hover,
    .top-nav .navbar-nav .nav-link:focus-visible {
        background: rgba(255, 255, 255, 0.08);
    }
}

