:root {
    --cf-primary: #ff6a00;
    --cf-text: #222;
    --cf-text-sub: #666;
    --cf-text-mute: #999;
    --cf-border: #eee;
    --cf-bg: #f5f6f8;
    --cf-radius: 10px;
    --cf-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.cf-main, .cf-single-main { background: var(--cf-bg); }

.cf-alert { padding: 12px 20px; border-radius: 8px; margin: 0 0 20px; font-size: 14px; }
.cf-alert-error { background: #fef0f0; color: #f56c6c; border: 1px solid #fde2e2; }

/* 发布页 */
.cf-publish-page { background: #fff; border-radius: var(--cf-radius); padding: 32px; box-shadow: var(--cf-shadow); }
.cf-publish-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--cf-border); }
.cf-publish-header h1 { font-size: 24px; margin: 0 0 6px; color: var(--cf-text); }
.cf-publish-sub { font-size: 13px; color: var(--cf-text-mute); margin: 0; }

.cf-form-section { margin-bottom: 28px; }
.cf-form-section-title {
    font-size: 16px; font-weight: 600; color: var(--cf-text);
    margin-bottom: 16px; padding-left: 10px;
    border-left: 3px solid var(--cf-primary); line-height: 1.2;
}
.cf-form-section-title i { color: #f56c6c; font-style: normal; }

.cf-field { margin-bottom: 18px; }
.cf-label { display: block; font-size: 13px; color: var(--cf-text-sub); margin-bottom: 8px; }
.cf-label i { color: #f56c6c; font-style: normal; }

.cf-input {
    width: 100%; height: 44px; padding: 0 14px;
    border: 1px solid #e0e0e0; border-radius: 6px;
    font-size: 14px; background: #fff;
    transition: border-color .2s; box-sizing: border-box;
}
.cf-input:focus { border-color: var(--cf-primary); outline: none; box-shadow: 0 0 0 3px rgba(255,106,0,.08); }
textarea.cf-input { height: auto; padding: 12px 14px; }
.cf-input-short { width: 140px; }

.cf-field-row { display: flex; gap: 20px; }
.cf-field-half { flex: 1; min-width: 0; }
.cf-field-third { flex: 1; min-width: 0; }

.cf-region-selects { display: flex; gap: 12px; }
.cf-region-selects select { flex: 1; }

.cf-tips { font-size: 12px; color: var(--cf-text-mute); margin: 8px 0 0; }
.cf-tips-inline { font-size: 12px; color: var(--cf-text-mute); margin-left: 10px; }

/* 图集上传 */
.cf-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.cf-gallery-item { position: relative; padding-top: 100%; border-radius: 8px; overflow: hidden; border: 1px solid var(--cf-border); background: #fafafa; }
.cf-gallery-item img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.cf-gallery-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; line-height: 20px; text-align: center; background: rgba(0,0,0,.5); color: #fff; border-radius: 50%; cursor: pointer; font-size: 14px; }
.cf-gallery-add {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding-top: 100%; position: relative;
    border: 1px dashed #d0d0d0; border-radius: 8px;
    color: var(--cf-text-mute); font-size: 12px; cursor: pointer; background: #fafafa;
}
.cf-gallery-add:hover { border-color: var(--cf-primary); color: var(--cf-primary); }
.cf-gallery-add > * { position: absolute; }
.cf-gallery-add i { top: 50%; transform: translateY(-40px); font-size: 20px; }
.cf-gallery-add span { top: 50%; transform: translateY(6px); }

.cf-form-submit { text-align: center; padding: 20px 0 0; border-top: 1px solid var(--cf-border); }
.cf-submit-btn {
    min-width: 220px; height: 50px;
    background: linear-gradient(135deg, #ff8a3d, #ff6a00);
    color: #fff; border: none; border-radius: 25px;
    font-size: 16px; font-weight: 600; cursor: pointer;
    box-shadow: 0 6px 16px rgba(255,106,0,.3);
}
.cf-submit-btn:hover { transform: translateY(-2px); }

/* 详情页 */
.cf-single-container { max-width: 1200px; }
.cf-detail-top {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
    background: #fff; border-radius: var(--cf-radius);
    padding: 24px; box-shadow: var(--cf-shadow); margin-bottom: 20px;
}

.cf-gallery-viewer { position: relative; }
.cf-gallery-main { position: relative; width: 100%; padding-top: 72%; background: #fafafa; border-radius: 8px; overflow: hidden; }
.cf-gallery-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .3s; pointer-events: none; }
.cf-gallery-slide.active { opacity: 1; pointer-events: auto; }
.cf-gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.cf-gallery-prev, .cf-gallery-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; line-height: 40px; text-align: center;
    background: rgba(0,0,0,.4); color: #fff; border-radius: 50%; cursor: pointer; z-index: 3;
}
.cf-gallery-prev { left: 12px; }
.cf-gallery-next { right: 12px; }
.cf-gallery-counter {
    position: absolute; bottom: 12px; right: 12px;
    background: rgba(0,0,0,.5); color: #fff;
    padding: 4px 10px; border-radius: 12px; font-size: 12px; z-index: 3;
}
.cf-gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; }
.cf-gallery-thumb { width: 72px; height: 72px; flex-shrink: 0; border-radius: 6px; overflow: hidden; cursor: pointer; border: 2px solid transparent; }
.cf-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cf-gallery-thumb.active { border-color: var(--cf-primary); }
.cf-gallery-empty { display: flex; align-items: center; justify-content: center; color: var(--cf-text-mute); font-size: 14px; padding-top: 72%; position: relative; }
.cf-gallery-empty span { position: absolute; top: 50%; transform: translateY(-50%); }

.cf-detail-info { display: flex; flex-direction: column; }
.cf-detail-title { font-size: 22px; line-height: 1.45; color: var(--cf-text); margin: 0 0 16px; font-weight: 700; }
.cf-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; vertical-align: middle; margin-right: 6px; }
.cf-badge-expired { background: #f5f5f5; color: #999; border: 1px solid #e5e5e5; }
.cf-detail-price { font-size: 32px; font-weight: 700; color: var(--cf-primary); margin-bottom: 20px; line-height: 1; }

.cf-detail-attrs {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 20px;
    padding: 16px 0; border-top: 1px solid var(--cf-border); border-bottom: 1px solid var(--cf-border);
    margin-bottom: 20px;
}
.cf-attr { display: flex; font-size: 13px; }
.cf-attr .label { color: var(--cf-text-mute); width: 60px; flex-shrink: 0; }
.cf-attr .value { color: var(--cf-text); font-weight: 500; }

.cf-contact-card { margin-top: auto; }
.cf-contact-unlocked { background: linear-gradient(135deg, #fff8f0, #fff2e3); border: 1px solid #ffe0b8; border-radius: 10px; padding: 18px 22px; }
.cf-contact-row { display: flex; align-items: center; padding: 6px 0; font-size: 14px; }
.cf-contact-row + .cf-contact-row { border-top: 1px dashed #f0d9ba; }
.cf-contact-label { color: var(--cf-text-mute); width: 70px; flex-shrink: 0; font-size: 13px; }
.cf-contact-value { color: var(--cf-text); font-weight: 600; }
.cf-contact-phone-row .cf-phone-big { font-size: 22px; color: var(--cf-primary); font-weight: 700; letter-spacing: 1px; }

.cf-contact-locked { background: #fafafa; border: 1px dashed #e0e0e0; border-radius: 10px; padding: 26px 20px; text-align: center; }
.cf-contact-expired { color: var(--cf-text-mute); }
.cf-contact-expired i { font-size: 28px; color: #ccc; display: block; margin-bottom: 8px; }
.cf-contact-expired p { font-size: 14px; color: var(--cf-text-sub); margin: 6px 0; }

.cf-author-actions { display: flex; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--cf-border); }
.cf-act { display: inline-flex; align-items: center; gap: 4px; padding: 8px 16px; background: #f7f8fa; border-radius: 6px; font-size: 13px; color: var(--cf-text-sub) !important; text-decoration: none; }
.cf-act:hover { background: var(--cf-primary); color: #fff !important; }

.cf-detail-body { background: #fff; border-radius: var(--cf-radius); padding: 28px 32px; box-shadow: var(--cf-shadow); margin-bottom: 20px; }
.cf-detail-section { margin-bottom: 28px; }
.cf-detail-section:last-child { margin-bottom: 0; }
.cf-detail-section-title { font-size: 17px; color: var(--cf-text); margin: 0 0 16px; padding-left: 10px; border-left: 3px solid var(--cf-primary); line-height: 1.2; font-weight: 600; }
.cf-detail-content { font-size: 15px; line-height: 1.9; color: #333; word-break: break-word; }
.cf-detail-content img { max-width: 100%; height: auto; border-radius: 6px; }

.cf-attr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 20px; }
.cf-attr-item { display: flex; padding: 12px 16px; background: #f7f8fa; border-radius: 6px; font-size: 14px; }
.cf-attr-label { color: #999; width: 70px; flex-shrink: 0; }
.cf-attr-value { color: #333; font-weight: 500; }

@media (max-width: 992px) {
    .cf-detail-top { grid-template-columns: 1fr; }
    .cf-attr-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .cf-publish-page { padding: 20px 16px; }
    .cf-field-row { display: block; }
    .cf-field-half, .cf-field-third { width: 100%; }
    .cf-region-selects { flex-direction: column; }
    .cf-detail-top { padding: 16px; gap: 16px; }
    .cf-detail-title { font-size: 18px; }
    .cf-detail-price { font-size: 26px; }
    .cf-detail-attrs { grid-template-columns: 1fr; }
    .cf-detail-body { padding: 20px 16px; }
    .cf-attr-grid { grid-template-columns: 1fr; }
}