/* ============================================
   855hi.com v3 - Modern Gradient Design
   仿制参考图：蓝紫渐变现代风格
   ============================================ */

/* ============================================
   1. Design Tokens
   ============================================ */
:root {
    /* 品牌蓝 */
    --brand-blue: #4A6CF7;
    --brand-blue-light: #6B8AF8;
    --brand-blue-dark: #3856D9;

    /* 渐变色系 */
    --gradient-start: #2B4BF2;
    --gradient-mid: #5B4DF2;
    --gradient-end: #9B4DF2;

    /* 胶囊高亮色 */
    --pill-bg: #EEF2FF;
    --pill-text: #4A6CF7;

    /* 中性色 */
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --bg-white: #FFFFFF;
    --bg-gray: #F3F4F6;
    --bg-light: #F9FAFB;
    --border-color: #E5E7EB;

    /* 语义色 */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.06);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.08);

    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 9999px;

    /* 间距 */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* 字体 */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;

    /* 过渡 */
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   2. Base Reset
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-white);
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
    transition: var(--transition);
}

/* ============================================
   3. Header (导航栏 - 白色极简)
   ============================================ */
.site-header {
    background: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    height: 64px;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-5);
    display: flex;
    align-items: center;
    height: 100%;
    gap: var(--space-6);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--brand-blue);
    letter-spacing: -0.5px;
}

.logo:hover {
    color: var(--brand-blue-dark);
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 1;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar { display: none; }

.nav-item {
    padding: var(--space-2) 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    white-space: nowrap;
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-light);
}

.nav-item.active {
    color: var(--pill-text);
    background: var(--pill-bg);
    font-weight: 600;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    padding: 2px;
    flex-shrink: 0;
}

.lang-btn {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-pill);
    transition: var(--transition);
    line-height: 1.4;
}

.lang-btn:hover {
    background: var(--bg-gray);
    color: var(--text-primary);
}

.lang-btn.active {
    background: var(--primary);
    color: #fff;
}

.search-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
}

.search-icon-btn:hover {
    background: var(--bg-gray);
    color: var(--text-primary);
}

.btn-login {
    padding: var(--space-2) var(--space-5);
    background: var(--text-primary);
    color: var(--bg-white);
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-login:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-post {
    padding: var(--space-2) var(--space-5);
    background: var(--brand-blue);
    color: var(--bg-white);
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-post:hover {
    background: var(--brand-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.3);
}

.btn-register {
    padding: var(--space-2) var(--space-5);
    background: transparent;
    color: var(--brand-blue);
    border: 1.5px solid var(--brand-blue);
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-register:hover {
    background: var(--brand-blue);
    color: #fff;
    transform: translateY(-1px);
}

.user-greeting {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    padding: 4px 10px;
    background: var(--bg-gray);
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    background: none;
    border: none;
}

/* ============================================
   4. Hero Section (蓝紫渐变卡片)
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-mid) 50%, var(--gradient-end) 100%);
    border-radius: var(--radius-xl);
    margin: var(--space-5);
    padding: var(--space-10) var(--space-8);
    color: var(--bg-white);
    position: relative;
    overflow: hidden;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 装饰光晕 */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 50%;
    height: 100%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-left {
    /* full width */
}

.hero-row {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--bg-white);
    margin-bottom: var(--space-4);
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero-sub {
    font-size: 16px;
    color: rgba(255,255,255,0.75);
    margin-bottom: var(--space-8);
    line-height: 1.6;
    font-weight: 400;
}

/* Search Box */
.search-form {
    width: 100%;
    max-width: 440px;
    flex-shrink: 0;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-pill);
    overflow: hidden;
    transition: var(--transition);
}

.search-box:focus-within {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.1);
}

.search-box-icon {
    padding-left: var(--space-5);
    color: rgba(255,255,255,0.6);
    font-size: 18px;
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    background: transparent;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--bg-white);
    min-width: 0;
}

.search-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.search-btn {
    padding: var(--space-3) var(--space-6);
    background: rgba(255,255,255,0.2);
    color: var(--bg-white);
    font-size: 15px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
    margin: 3px;
    border-radius: var(--radius-pill);
}

.search-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Page-level search form (white bg, not hero) */
.page-search-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
}

.page-search-form {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    align-items: center;
}

.page-search-form .search-input-page {
    flex: 2;
    min-width: 220px;
    padding: 10px 16px;
    background: var(--bg-light);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
}

.page-search-form .search-input-page:focus {
    border-color: var(--brand-blue);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(74,108,247,0.1);
}

.page-search-form .search-input-page::placeholder {
    color: var(--text-muted);
}

.page-search-form .search-select {
    flex: 1;
    min-width: 140px;
    padding: 10px 14px;
    background: var(--bg-light);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.page-search-form .search-select:focus {
    border-color: var(--brand-blue);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(74,108,247,0.1);
}

.page-search-form .search-btn-page {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(74,108,247,0.2);
}

.page-search-form .search-btn-page:hover {
    box-shadow: 0 4px 16px rgba(74,108,247,0.35);
    transform: translateY(-1px);
}

/* Search results header */
.search-result-header {
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-5);
    border-bottom: 2px solid var(--bg-light);
}

.search-result-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    letter-spacing: -0.3px;
}

.search-result-header .search-result-summary {
    font-size: 14px;
    color: var(--text-secondary);
}

.search-result-header .search-result-summary strong {
    color: var(--brand-blue);
    font-weight: 700;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-shrink: 0;
    margin-left: auto;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0;
    white-space: nowrap;
}

.stat-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    backdrop-filter: blur(5px);
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.stat-number {
    font-size: 18px;
    font-weight: 800;
    color: var(--bg-white);
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: rgba(255,255,255,0.65);
    font-weight: 500;
    line-height: 1.2;
}

/* ============================================
   5. Main Content
   ============================================ */
.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-5);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-5);
}

/* ============================================
   6. Section Title
   ============================================ */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-4);
    margin-bottom: var(--space-3);
}

/* First section-title in a container — no extra top gap */
.container > .section-title:first-of-type {
    margin-top: 0;
}

.section-title h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.section-meta {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   7. Category Grid
   ============================================ */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-4);
    margin-bottom: 0;
}

.cat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-4) var(--space-5);
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--cat-color, var(--brand-blue));
    opacity: 0;
    transition: opacity 0.3s;
}

.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.cat-card:hover::before {
    opacity: 1;
}

.cat-icon {
    width: 56px;
    height: 56px;
    background: var(--pill-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-2);
    font-size: 28px;
    transition: var(--transition);
}

.cat-card:hover .cat-icon {
    background: var(--brand-blue);
    color: var(--bg-white);
    transform: scale(1.05);
}

.cat-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.cat-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: var(--space-2);
}

.cat-count {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--pill-bg);
    color: var(--pill-text);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
}

/* ============================================
   8. Post List
   ============================================ */
.post-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: var(--space-5);
}

.post-item {
    display: flex;
    gap: 10px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 10px;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.post-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: transparent;
}

.post-item-img {
    width: 120px;
    height: 90px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-gray);
}

.post-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-item:hover .post-item-img img {
    transform: scale(1.05);
}

.post-item-avatar {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-gray);
    margin-right: 8px;
}

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

.post-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.post-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.35;
    letter-spacing: -0.2px;
    transition: var(--transition);
}

.post-item:hover .post-item-title {
    color: var(--brand-blue);
}

.post-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    gap: var(--space-1);
}

.badge-cat {
    background: var(--pill-bg);
    color: var(--pill-text);
}

.badge-price {
    background: #FEF3C7;
    color: #92400E;
}

.badge-salary {
    background: #DCFCE7;
    color: #166534;
}

.badge-loc {
    background: var(--bg-light);
    color: var(--text-secondary);
}

.post-item-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.45;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.post-item-foot {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* ============================================
   8b. List Layout — Main + Sidebar
   ============================================ */
.list-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.list-main {
    flex: 1;
    min-width: 0;
}
.list-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 16px;
}

/* Quick Location Card */
.quick-loc-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.quick-loc-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand-blue);
}
.quick-loc-tags {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.quick-loc-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    transition: all .15s;
    cursor: pointer;
}
.quick-loc-tag:hover {
    background: var(--brand-blue);
    color: #fff;
    border-color: var(--brand-blue);
    box-shadow: 0 2px 8px rgba(30,144,255,.22);
}
.quick-loc-tag.active {
    background: var(--brand-blue);
    color: #fff;
    border-color: var(--brand-blue);
}

/* ── Yellow Pages Widget ── */
.yellow-pages-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.yellow-pages-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand-blue);
}
.yellow-pages-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.yellow-pages-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    transition: all .15s;
    cursor: pointer;
}
.yellow-pages-item:hover {
    background: var(--brand-blue);
    color: #fff;
    border-color: var(--brand-blue);
    box-shadow: 0 2px 8px rgba(30,144,255,.22);
}
.yellow-pages-item:hover .yp-phone {
    color: rgba(255,255,255,.85);
}
.yp-name {
    font-weight: 600;
}
.yp-phone {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Ad Display ── */
.ad-unit {
    text-align: center;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border-radius: var(--radius-md);
}
.ad-unit img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    display: block;
    margin: 0 auto;
}
.ad-link {
    display: block;
    transition: opacity 0.2s;
}
.ad-link:hover {
    opacity: 0.92;
}
/* Ad in sidebar area */
.list-sidebar .ad-unit {
    margin-bottom: 16px;
}
.quick-loc-tag .loc-count {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.7;
    background: rgba(0,0,0,.06);
    padding: 1px 6px;
    border-radius: 10px;
}
.quick-loc-tag:hover .loc-count,
.quick-loc-tag.active .loc-count {
    background: rgba(255,255,255,.2);
}

@media (max-width: 768px) {
    .list-layout {
        flex-direction: column;
    }
    .list-sidebar {
        width: 100%;
        position: static;
        order: -1;
    }
    .quick-loc-tags {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .quick-loc-tag {
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }
    .quick-loc-tag .loc-count {
        margin-left: 4px;
    }
}

/* ============================================
   9. Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    background: var(--brand-blue);
    color: var(--bg-white);
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    gap: var(--space-2);
}

.btn:hover {
    background: var(--brand-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--brand-blue);
    border: 1.5px solid var(--brand-blue);
}

.btn-outline:hover {
    background: var(--pill-bg);
    color: var(--brand-blue-dark);
    transform: translateY(-1px);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 13px;
    border-radius: var(--radius-md);
}

.btn-primary {
    background: var(--brand-blue);
    color: var(--bg-white);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

/* ============================================
   10. Forms
   ============================================ */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-white);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.form-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin: var(--space-4) 0 var(--space-2) 0;
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.form-section-title::before {
    content: '💝';
    font-size: 16px;
}

.required {
    color: var(--danger);
    margin-left: var(--space-1);
}

/* ============================================
   11. Filter Bar
   ============================================ */
.page-top-ad {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.page-top-ad img {
    max-height: 60px;
    width: auto;
    display: block;
    object-fit: contain;
}

.filter-bar {
    margin-bottom: var(--space-4);
    background: var(--bg-white);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.filter-row {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.filter-input {
    padding: var(--space-3) var(--space-4);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    outline: none;
    flex: 1;
    min-width: 200px;
    transition: var(--transition);
}

.filter-input:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.filter-actions {
    margin-top: var(--space-3);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}
.filter-actions .btn { white-space: nowrap; flex-shrink: 0; padding: 6px 12px; font-size: 13px; }
.filter-actions .btn-sort:first-of-type { margin-left: auto; }

.filter-select {
    flex: 0 1 auto;
    min-width: 130px;
}

/* ============================================
   12. Pagination
   ============================================ */
.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-10);
    padding: var(--space-6) 0;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.pager-info {
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
}

.pager-links {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    justify-content: center;
}

.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 var(--space-3);
    background: var(--bg-white);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.pager-btn:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background: var(--pill-bg);
    box-shadow: 0 4px 12px rgba(74,108,247,0.15);
    transform: translateY(-1px);
}

.pager-btn.active {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-mid));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(43,75,242,0.35);
    cursor: default;
}

/* ============================================
   13. Detail Page
   ============================================ */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-8);
    margin-top: var(--space-6);
}

.detail-main {
    min-width: 0;
}

.detail-sidebar {
    position: sticky;
    top: calc(64px + var(--space-6));
    align-self: start;
}

.detail-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    border: 1px solid var(--border-color);
    margin-bottom: var(--space-5);
}

.detail-header {
    display: flex;
    gap: var(--space-5);
    align-items: flex-start;
    margin-bottom: var(--space-6);
}

.detail-header-main {
    flex: 1;
    min-width: 0;
}

.detail-header-avatar {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--brand-gold);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.25);
}

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

.detail-category {
    font-size: 12px;
    color: var(--brand-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-3);
}

.detail-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    letter-spacing: -0.5px;
    margin-bottom: var(--space-4);
}

.detail-meta-top {
    display: flex;
    gap: var(--space-5);
    font-size: 14px;
    color: var(--text-muted);
}

.detail-price-box {
    background: var(--pill-bg);
    border: 1px solid rgba(74, 108, 247, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
}

.detail-price-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.detail-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--brand-blue);
    letter-spacing: -1px;
}

.detail-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding: var(--space-5);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.df-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: 14px;
}

.df-label {
    color: var(--text-muted);
    font-weight: 500;
    min-width: 80px;
}

.df-value {
    color: var(--text-primary);
    font-weight: 600;
}

.detail-images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-5);
    margin-bottom: var(--space-8);
    padding: var(--space-4) 0;
}

.detail-img-item {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 4px solid #D4AF37;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: #f0ede5;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08), 0 0 0 8px #f5f0e8;
    position: relative;
}

.detail-img-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(212,175,55,0.3), inset 0 0 30px rgba(0,0,0,0.06);
    pointer-events: none;
    z-index: 2;
}

.detail-img-item:hover {
    border-color: #C5A028;
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 32px rgba(212,175,55,0.2), 0 0 0 10px #f5f0e8;
}

.detail-img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    position: relative;
    z-index: 1;
}

.detail-img-item:hover img {
    transform: scale(1.08);
}

@media (max-width: 768px) {
    .detail-images {
        gap: var(--space-3);
    }
    .detail-img-item {
        width: 140px;
        height: 140px;
        border-width: 3px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 0 0 5px #f5f0e8;
    }
    .detail-img-item:hover {
        box-shadow: 0 4px 20px rgba(212,175,55,0.15), 0 0 0 6px #f5f0e8;
    }
}

/* ========== 交友详情页图片 — 旧版矩形网格 ========== */
.detail-images-rect {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding: 0;
    justify-content: stretch;
}

.detail-images-rect .detail-img-item {
    width: auto;
    height: auto;
    aspect-ratio: 4/3;
    border-radius: var(--radius-md);
    border: 2px solid var(--bg-light);
    background: var(--bg-gray);
    box-shadow: none;
    position: static;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-images-rect .detail-img-item::after {
    display: none;
}

.detail-images-rect .detail-img-item:hover {
    border-color: var(--brand-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.detail-images-rect .detail-img-item img {
    transition: transform 0.3s ease;
}

.detail-images-rect .detail-img-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .detail-images-rect {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: var(--space-2);
    }
    .detail-images-rect .detail-img-item {
        width: auto;
        height: auto;
        border-width: 2px;
        box-shadow: none;
    }
}

/* 灯箱 */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.lightbox-close {
    position: absolute;
    top: 20px; right: 30px;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
}
.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    cursor: auto;
}

.detail-content {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 2px solid var(--bg-light);
}

.detail-content h3 {
    font-size: 20px;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
    font-weight: 700;
}

/* ============================================
   VIP Badge (统一标识)
   ============================================ */
.crown-badge {
    display: inline-flex !important;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1.5;
    letter-spacing: 1px;
}

.crown-vip {
    background: linear-gradient(135deg, #DC2626, #991B1B);
    color: #fff;
    border: 1px solid #7F1D1D;
    box-shadow: 0 1px 6px rgba(220,38,38,.4);
    animation: vip-pulse 2s ease-in-out infinite;
}

@keyframes vip-pulse {
    0%, 100% { box-shadow: 0 1px 6px rgba(220,38,38,.4); }
    50% { box-shadow: 0 1px 12px rgba(220,38,38,.6); }
}

/* VIP badge on title line (member-only, matches second-line badge style) */
.badge-vip-title {
    background: linear-gradient(135deg, #DC2626, #991B1B);
    color: #fff;
    font-size: 11px;
    padding: 1px 7px;
    vertical-align: middle;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(220,38,38,.3);
}

/* Sticky post title — red */
.sticky-title-red,
.sticky-title-red:visited,
.sticky-title-red:hover,
.sticky-title-red:active {
    color: #DC2626 !important;
    font-weight: 700 !important;
}

/* Ensure sticky title stays red on hover in post lists */
.post-item:hover .sticky-title-red,
.uc-post-card:hover .sticky-title-red {
    color: #DC2626 !important;
}

/* Badge for "已置顶" label */
.badge-top {
    background: linear-gradient(135deg, #F43F5E, #E11D48);
    color: #fff;
}

.content-body {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

/* ============================================
   14. Contact Card
   ============================================ */
.contact-card {
    border-left: 3px solid var(--brand-blue);
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--pill-bg) 100%);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.ci-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-color);
}

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

.ci-label {
    color: var(--text-muted);
    font-size: 13px;
    min-width: 80px;
    font-weight: 500;
}

.ci-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
}

.contact-tip {
    margin-top: var(--space-5);
    padding: var(--space-4);
    background: var(--pill-bg);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    border: 1px solid rgba(74, 108, 247, 0.1);
}

/* ============================================
   15. Sidebar
   ============================================ */
.side-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    border: 1px solid var(--border-color);
    margin-bottom: var(--space-5);
}

.side-card h3 {
    font-size: 16px;
    margin-bottom: var(--space-5);
    color: var(--text-primary);
    font-weight: 700;
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--bg-light);
}

.side-post {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--bg-light);
    text-decoration: none;
    transition: var(--transition);
}

.side-post:last-child {
    border-bottom: none;
}

.side-post:hover {
    padding-left: var(--space-2);
}

.side-post-img {
    width: 72px;
    height: 54px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-gray);
}

.side-post-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: var(--space-1);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.side-post:hover .side-post-title {
    color: var(--brand-blue);
}

.side-post-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   16. Footer
   ============================================ */
.site-footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: var(--space-16) 0 0;
    margin-top: var(--space-3);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-5);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-8);
}

.footer-nav {
    display: flex;
    gap: var(--space-8);
}

.footer-brand {
    max-width: 400px;
    flex: 0 0 auto;
}

.footer-qr {
    flex: 0 0 auto;
    display: flex;
    gap: var(--space-5);
    align-items: flex-start;
}

.qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.qr-placeholder {
    width: 86px;
    height: 86px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
}

.qr-placeholder::before {
    content: attr(data-label);
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    padding: var(--space-1);
}

.qr-placeholder:hover {
    border-color: var(--brand-blue);
    background: var(--pill-bg);
}

.qr-img {
    width: 86px;
    height: 86px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    object-fit: contain;
    display: block;
    transition: var(--transition);
}

.qr-img:hover {
    border-color: var(--brand-blue);
    transform: scale(1.03);
}

.qr-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.footer-nav {
    flex: 0 0 auto;
}

.footer-contact {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 200px;
}

.contact-item {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-1);
    white-space: nowrap;
}

.contact-label {
    font-weight: 600;
    color: var(--text-primary);
}

.contact-item a {
    color: var(--brand-blue);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    text-decoration: underline;
    color: var(--brand-blue-hover);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    font-size: 22px;
    font-weight: 800;
    color: var(--brand-blue);
}

.footer-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: var(--space-5);
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-5);
}

.footer-col a {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    padding: var(--space-2) 0;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--brand-blue);
    padding-left: var(--space-2);
}

.footer-bottom {
    margin-top: var(--space-12);
    padding: var(--space-5) var(--space-5);
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   17. Alerts
   ============================================ */
.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    border-left: 3px solid;
}

.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border-color: var(--danger);
}

.alert-success {
    background: #ECFDF5;
    color: #065F46;
    border-color: var(--success);
}

.alert-warning {
    background: #FFFBEB;
    color: #92400E;
    border-color: var(--warning);
}

.alert-info {
    background: var(--pill-bg);
    color: var(--brand-blue-dark);
    border-color: var(--brand-blue);
}

/* ============================================
   18. Breadcrumb
   ============================================ */
.breadcrumb {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: var(--space-5);
    padding: var(--space-3) 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.breadcrumb a {
    color: var(--text-secondary);
}

.breadcrumb a:hover {
    color: var(--brand-blue);
}

.breadcrumb span {
    color: var(--text-muted);
}

/* ============================================
   19. Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--space-16) var(--space-5);
    color: var(--text-muted);
}

.empty-state p:first-child {
    font-size: 48px;
    margin-bottom: var(--space-4);
}

.empty-state p {
    font-size: 16px;
    margin-bottom: var(--space-4);
}

/* ============================================
   20. Upload Area — Modern Drag & Drop
   ============================================ */
.upload-modern {
    margin-top: var(--space-2);
}

/* 拖拽主区域 */
.upload-dropzone {
    border: 2px dashed #c7cdff;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f3ff 100%);
    padding: var(--space-10) var(--space-6);
    text-align: center;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.upload-dropzone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(74, 108, 247, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.upload-dropzone:hover {
    border-color: var(--brand-blue);
    background: linear-gradient(135deg, #eef1ff 0%, #e2e7ff 100%);
    box-shadow: 0 0 0 4px rgba(74, 108, 247, 0.06), 0 4px 12px rgba(74, 108, 247, 0.08);
    transform: translateY(-1px);
}

.upload-dropzone.drag-over {
    border-color: var(--brand-blue);
    border-style: solid;
    background: linear-gradient(135deg, #e4e8ff 0%, #d8ddff 100%);
    box-shadow: 0 0 0 8px rgba(74, 108, 247, 0.1), 0 8px 24px rgba(74, 108, 247, 0.12);
    transform: scale(1.01);
}

.upload-dropzone.drag-over .upload-cloud-icon {
    color: var(--brand-blue);
    transform: translateY(-4px) scale(1.08);
}

.upload-dropzone.drag-over .upload-dropzone-text {
    color: var(--brand-blue-dark);
}

/* 云上传图标 */
.upload-cloud-icon {
    width: 52px;
    height: 52px;
    color: #a5b4fc;
    margin-bottom: var(--space-4);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-dropzone:hover .upload-cloud-icon {
    color: var(--brand-blue);
    transform: translateY(-2px);
}

/* 上传文字 */
.upload-dropzone-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    transition: color 0.25s ease;
}

.upload-dropzone-hint {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* 预览缩略图区 */
.upload-thumbs {
    display: flex;
    gap: 10px;
    margin-top: var(--space-4);
    flex-wrap: wrap;
}

/* 已上传缩略图 */
.upload-thumb {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 2px solid var(--border-color);
    background: var(--bg-light);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.upload-thumb:hover {
    border-color: var(--brand-blue);
    box-shadow: 0 2px 8px rgba(74, 108, 247, 0.15);
}

.upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 移除按钮 */
.upload-thumb .thumb-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.upload-thumb:hover .thumb-remove {
    opacity: 1;
    transform: scale(1);
}

.upload-thumb .thumb-remove:hover {
    background: rgba(239, 68, 68, 0.85);
    transform: scale(1.1);
}

/* 添加按钮 */
.upload-thumb-add {
    width: 96px;
    height: 96px;
    border: 2px dashed #d1d5f0;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
    background: var(--bg-light);
}

.upload-thumb-add:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background: var(--pill-bg);
    box-shadow: 0 2px 8px rgba(74, 108, 247, 0.08);
    transform: translateY(-1px);
}

.upload-thumb-add:hover svg {
    transform: rotate(90deg);
}

/* 压缩中旋转动画 */
.upload-thumb.uploading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--bg-light);
    border-style: solid;
    border-color: #d1d5f0;
}

.upload-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border-color);
    border-top-color: var(--brand-blue);
    border-radius: 50%;
    animation: uploadSpin 0.7s linear infinite;
}

@keyframes uploadSpin {
    to { transform: rotate(360deg); }
}

/* 压缩标签 */
.thumb-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    pointer-events: none;
}

.thumb-badge.compressed {
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
}

.upload-thumb.uploading .thumb-badge {
    position: static;
    background: none;
    color: var(--brand-blue);
    font-size: 12px;
}

/* 会员提示增强 */
#memberTip a {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#memberTip a:hover {
    text-decoration: none;
}

/* 表单提示文字 */
.form-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: var(--space-2);
    line-height: 1.5;
}

/* ============================================
   21. Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .hero-row {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-5);
    }

    .hero-stats {
        justify-content: center;
        margin-left: 0;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
    }

    .footer-inner {
        flex-wrap: wrap;
        gap: var(--space-8);
    }
    .footer-nav {
        gap: var(--space-6);
    }
    .footer-contact {
        flex: 0 0 100%;
        order: 3;
    }
    .footer-qr {
        order: 2;
    }
}

@media (max-width: 768px) {
    .site-header {
        height: 56px;
    }

    .main-nav {
        display: none;
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: var(--space-4);
        box-shadow: var(--shadow-xl);
        z-index: 999;
        overflow-y: auto;
        gap: var(--space-2);
    }

    .main-nav.open {
        display: flex;
    }

    .nav-item {
        padding: var(--space-3) var(--space-4);
        font-size: 16px;
        border-radius: var(--radius-md);
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        margin: var(--space-3);
        padding: var(--space-8) var(--space-5);
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: var(--space-3);
    }

    .stat-number {
        font-size: 24px;
    }

    .search-box {
        flex-wrap: wrap;
        border-radius: var(--radius-lg);
    }

    .search-input {
        width: 100%;
        order: 2;
        border-top: 1px solid rgba(255,255,255,0.15);
    }

    .search-btn {
        width: 100%;
        order: 3;
        border-radius: var(--radius-md);
        margin: var(--space-2);
    }

    .cat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .cat-card {
        padding: var(--space-5) var(--space-3);
    }

    .post-item {
        flex-direction: column;
        padding: 10px;
    }

    .post-item-img {
        width: 100%;
        height: 140px;
    }

    .post-item-avatar {
        width: 48px;
        height: 48px;
        margin-right: 0;
        margin-bottom: 8px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .detail-fields {
        grid-template-columns: 1fr;
    }

    .detail-price {
        font-size: 28px;
    }

    .detail-title {
        font-size: 22px;
    }

    .detail-header-avatar {
        width: 60px;
        height: 60px;
    }

    .footer-inner {
        flex-direction: column;
        gap: var(--space-6);
    }
    .footer-nav {
        flex-wrap: wrap;
        gap: var(--space-6);
    }
    .footer-contact {
        flex: 0 0 100%;
        margin-top: var(--space-4);
    }
    .footer-qr {
        justify-content: center;
    }
    .qr-placeholder,
    .qr-img {
        width: 79px;
        height: 79px;
    }

    .site-main {
        padding: var(--space-5) var(--space-3);
    }

    .upload-dropzone {
        padding: var(--space-6) var(--space-4);
    }

    .upload-dropzone-text {
        font-size: 14px;
    }

    .upload-thumb,
    .upload-thumb-add {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-wrap: wrap;
        gap: var(--space-2);
    }

    .stat-item {
        padding: 0;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .stat-number {
        font-size: 20px;
    }

    .cat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }

    .cat-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .post-list {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   22. Category Tabs (Button-style)
   ============================================ */
.cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-light);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.cat-tab .tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    line-height: 1;
    background: color-mix(in srgb, var(--tab-color, var(--brand-blue)) 12%, transparent);
    color: var(--tab-color, var(--brand-blue));
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cat-tab:hover {
    background: color-mix(in srgb, var(--tab-color, var(--brand-blue)) 8%, var(--bg-light));
    border-color: color-mix(in srgb, var(--tab-color, var(--brand-blue)) 30%, transparent);
    transform: translateY(-1px);
}

.cat-tab.active {
    background: var(--tab-color, var(--brand-blue));
    color: #fff;
    border-color: var(--tab-color, var(--brand-blue));
    box-shadow: 0 4px 12px color-mix(in srgb, var(--tab-color, var(--brand-blue)) 30%, transparent);
    transform: translateY(-1px);
}

.cat-tab.active .tab-icon {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Tag-style radio/checkbox options */
.tag-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.tag-options label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-light);
    border: 1.5px solid var(--border-color);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.tag-options label:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background: var(--pill-bg);
}

.tag-options input[type="radio"],
.tag-options input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-blue);
    cursor: pointer;
    margin: 0;
    flex-shrink: 0;
}

.tag-options label:has(input:checked) {
    background: var(--brand-blue);
    color: #fff;
    border-color: var(--brand-blue);
    box-shadow: 0 2px 8px rgba(43,75,242,0.25);
}

/* ============================================
   23. Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* ============================================
   23. Accessibility
   ============================================ */
:focus {
    outline: 2px solid var(--brand-blue);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--brand-blue);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   24. Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   25. Selection
   ============================================ */
::selection {
    background: var(--brand-blue);
    color: var(--bg-white);
}

::-moz-selection {
    background: var(--brand-blue);
    color: var(--bg-white);
}

/* ============================================
   26. Button - Danger
   ============================================ */
.btn-danger {
    background: var(--danger);
    color: var(--bg-white);
    border: none;
}
.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239,68,68,.3);
}

/* ============================================
   27. Modal Overlay
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.modal-overlay[style*="flex"] {
    display: flex;
}
.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    width: 90%;
    max-width: 460px;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.25s ease;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-color);
}
.modal-header h3 {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-light);
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.modal-close:hover {
    background: var(--border-color);
    color: var(--text-primary);
}
@keyframes fadeIn {
    from { opacity: 0 }
    to { opacity: 1 }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) }
    to { opacity: 1; transform: translateY(0) }
}

/* ===== 21. Friend Links ===== */
.friend-links {
    background: var(--bg-white);
    padding: var(--space-10) 0 var(--space-3);
    margin-top: var(--space-3);
}
.friend-links .container {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    flex-wrap: wrap;
}
.fl-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}
.fl-list {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    flex-wrap: wrap;
}
.fl-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 13px;
    transition: background .2s;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
}
.fl-item:hover {
    background: var(--gray-50);
    border-color: var(--primary);
    color: var(--primary);
}
.fl-item img {
    height: 20px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    border-radius: 3px;
}
