/* ============================================================
 * components.css - 组件（首页、卡片、按钮、表单、楼层等）
 * 完美还原一线天风格截图
 * ============================================================ */

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    min-height: 44px;
    padding: 0 var(--spacing-lg);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--border-radius-pill);
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: #FF5068;
    color: #fff;
    box-shadow: 0 3px 10px rgba(255,80,104,0.25);
}

.btn-primary:hover,
.btn-primary:active {
    background: #E64258;
    color: #fff;
}

.btn-secondary {
    background: #fff;
    color: #333;
    border: 1.5px solid #eee;
}

.btn-secondary:hover,
.btn-secondary:active {
    background: #fafafa;
    border-color: #FF5068;
}

.btn-danger {
    background: linear-gradient(135deg, #ff4d4f, #ff7875);
    color: #fff;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-lg {
    min-height: 50px;
    font-size: 17px;
    padding: 0 28px;
}

.btn-sm {
    min-height: 34px;
    padding: 0 14px;
    font-size: 13px;
}

.btn.disabled,
.btn[disabled] {
    opacity: 0.45;
    pointer-events: none;
}

.btn-link {
    background: none;
    color: #FF5068;
    padding: 4px 8px;
    min-height: auto;
    font-size: 13px;
    font-weight: 600;
}

.btn-link:hover,
.btn-link:active {
    color: #E64258;
}

.btn-danger-text {
    color: #ff4d4f !important;
}

/* ===== 首页 Banner ===== */
.home-banner {
    margin: 12px 16px;
    height: 160px;
    background: linear-gradient(135deg, #FFE8EC 0%, #FFD1DC 30%, #FFB8C9 60%, #FF9EAF 100%);
    border-radius: 16px; /* 大圆角匹配截图 */
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(255,80,104,0.1);
}

.banner-placeholder {
    text-align: center;
    color: #FF5068;
    font-size: 36px;
    font-weight: 700;
    opacity: 0.2;
    letter-spacing: 3px;
}

/* ===== 快捷入口（3个药丸按钮）===== */
.quick-entry-row {
    display: flex;
    gap: 10px;
    padding: 0 16px 16px;
}

.quick-entry-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: var(--border-radius-pill); /* 药丸形圆角 */
    background: #fff; /* 白色底 */
    border: 1.5px solid #FF5068; /* 粉红色边框 */
    color: #FF5068; /* 粉红色文字 */
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.quick-entry-btn:hover,
.quick-entry-btn:active {
    background: #FFF5F6; /* 极浅粉色背景 */
    box-shadow: 0 2px 8px rgba(255,80,104,0.15);
}

/* ===== 分类区块（白色卡片）===== */
.category-section {
    margin-bottom: 10px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin-left: 16px;
    margin-right: 16px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 8px;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* "更多+" 小标签（右上角粉红圆角标签）*/
.section-more {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #FF5068;
    background: #FFF0F2;
    border-radius: 20px; /* 药丸形 */
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.section-more:hover,
.section-more:active {
    background: #FFE8EC;
}

/* 分类折叠 */
.category-section.collapsed .category-body {
    display: none;
}

.category-body {
    padding: 0 16px 14px 16px;
}

/* ===== 城市列表（"标签名: 城市 城市 ..." 格式）===== */
.city-group-row {
    display: flex;
    align-items: baseline;
    padding: 7px 0;
    line-height: 1.8;
}

.city-group-label {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    flex-shrink: 0;
    min-width: 64px;
    letter-spacing: 0.5px;
}

.city-list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    flex: 1;
}

.city-item {
    font-size: 14px;
    color: #555;
    text-decoration: none;
    padding: 0;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.city-item:hover,
.city-item:active {
    color: #FF5068;
}

.city-item-text {
    position: relative;
}

.city-item-hot::after {
    content: '🔥';
    font-size: 11px;
    margin-left: 1px;
}

.forum-link {
    display: inline-block;
    text-decoration: none;
}

/* 横幅通知条 */
.notice-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 16px;
    padding: 12px 24px;
    background: linear-gradient(90deg, #FFE8EC, #FFF0F3, #FFE8EC);
    border-radius: var(--border-radius-pill);
    color: #FF5068;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 1px;
}

/* ===== 论坛板块卡片（热门板块详细卡片）===== */
.forum-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #F8F8F8;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.forum-card:hover,
.forum-card:active {
    background: #FFF0F2;
}

.forum-card-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FF5068, #FF7A90);
    color: #fff;
    border-radius: 10px;
    font-size: 16px;
}

.forum-card-content {
    flex: 1;
    min-width: 0;
}

.forum-card-name {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin-bottom: 3px;
}

.forum-card-desc {
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-card-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #bbb;
}

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.required {
    color: #ff4d4f;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    font-size: 15px;
    color: #333;
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: #FF5068;
    box-shadow: 0 0 0 3px rgba(255,80,104,0.1);
    background: #fff;
}

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

.form-select {
    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='%23FF5068' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #999;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.form-actions .btn {
    flex: 1;
}

.form-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.toolbar-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
    transition: all 0.2s ease;
}

.toolbar-btn:hover,
.toolbar-btn:active {
    background: #FFF0F2;
    color: #FF5068;
}

/* ===== 提示框 ===== */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

.alert-success {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

/* ===== 标签 ===== */
.tag {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    vertical-align: middle;
}

.tag-admin {
    background: linear-gradient(135deg, #FF5068, #FF7A90);
    color: #fff;
}

.tag-author {
    background: #FFF0F2;
    color: #FF5068;
}

/* ===== 楼层 ===== */
.floor {
    background: #fff;
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
}

.floor-header {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    gap: 12px;
}

.floor-avatar {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    background: #FFF0F2;
}

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

.floor-user-info {
    flex: 1;
    min-width: 0;
}

.floor-username {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.floor-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 8px;
    align-items: center;
}

.edit-mark {
    color: #faad14;
}

.floor-number {
    flex-shrink: 0;
    font-size: 13px;
    color: #bbb;
    font-weight: 600;
}

.floor-content {
    padding: 0 16px 12px;
}

.thread-title-detail {
    font-size: 19px;
    font-weight: 700;
    color: #222;
    margin-bottom: 12px;
    line-height: 1.4;
}

.thread-content-body,
.floor-content-body {
    font-size: 15px;
    color: #333;
    line-height: 1.75;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.thread-content-body a,
.floor-content-body a {
    color: #FF5068;
    word-break: break-all;
}

.floor-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 12px;
    border-top: 1px solid #f2f2f2;
    font-size: 12px;
    color: #bbb;
}

.floor-stat {
    margin-right: 4px;
}

/* ===== 引用块 ===== */
.quote-block {
    background: #FFF8F9;
    border-left: 3px solid #FF5068;
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 14px;
}

.quote-header {
    color: #FF5068;
    margin-bottom: 4px;
    font-weight: 600;
}

.quote-content {
    color: #777;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ===== 帖子详情页（底部留出快捷回复栏空间）===== */
.thread-page {
    padding-bottom: 100px;
}

/* ===== 快捷回复 ===== */
.quick-reply {
    position: fixed;
    bottom: var(--tabbar-height);
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    padding: 8px 16px;
    z-index: 99;
}

@media (min-width: 768px) {
    .quick-reply {
        max-width: var(--max-width);
        margin: 0 auto;
    }
}

.quick-reply-quote {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #888;
}

.quote-cancel {
    background: none;
    color: #bbb;
    font-size: 18px;
    line-height: 1;
    padding: 0 4px;
}

.quick-reply-form {
    display: block;
}

.quick-reply-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.quick-reply-input {
    flex: 1;
    padding: 8px 14px;
    min-height: 40px;
    max-height: 120px;
    background: #f5f5f5;
    border-radius: 10px;
    font-size: 14px;
    resize: none;
    border: 1px solid #e8e8e8;
}

.quick-reply-btn {
    flex-shrink: 0;
    min-height: 40px;
    padding: 0 18px;
}

/* 验证码弹层 */
.captcha-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.captcha-modal-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px 28px;
    width: 280px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.captcha-modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    text-align: center;
}

.captcha-modal-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.captcha-modal-row .captcha-img {
    height: 40px;
    width: 160px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.captcha-modal-row .captcha-input {
    flex: 1;
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
    border-radius: 6px;
    text-align: center;
}

.captcha-modal-actions {
    display: flex;
    gap: 10px;
}

.captcha-modal-actions .btn {
    flex: 1;
}

.quick-reply-guest {
    position: fixed;
    bottom: var(--tabbar-height);
    left: 0;
    right: 0;
    padding: 8px 16px;
    background: #fff;
    z-index: 99;
}

@media (min-width: 768px) {
    .quick-reply-guest {
        max-width: var(--max-width);
        margin: 0 auto;
    }
}

/* ===== 分页 ===== */
.pagination {
    padding: 16px;
    text-align: center;
}

.pagination-info {
    display: block;
    font-size: 12px;
    color: #bbb;
    margin-bottom: 8px;
}

.pagination-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.pagination-page:hover,
.pagination-page:active {
    background: #FFF0F2;
}

.pagination-page.active {
    background: #FF5068;
    color: #fff;
    font-weight: 600;
}

.pagination-ellipsis {
    color: #ccc;
    padding: 0 4px;
}

.pagination .btn-secondary {
    min-height: 36px;
    padding: 0 14px;
    font-size: 14px;
}

.pagination .disabled {
    opacity: 0.35;
    pointer-events: none;
}

.load-more-btn {
    margin: 16px auto;
    display: flex;
}

.load-more-end {
    text-align: center;
    padding: 16px;
    color: #bbb;
    font-size: 13px;
}

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 48px 16px;
    color: #bbb;
}

.empty-state p {
    margin-bottom: 16px;
    font-size: 15px;
}

.empty-state-sm {
    text-align: center;
    padding: 16px;
    color: #bbb;
    font-size: 13px;
}

/* ===== 认证页 ===== */
.auth-page {
    padding: 24px 16px;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo {
    font-size: 24px;
    font-weight: 700;
    color: #FF5068;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 15px;
    color: #888;
}

.auth-form {
    margin-bottom: 24px;
}

.auth-footer {
    text-align: center;
    font-size: 13px;
    color: #888;
}

/* ===== 个人中心 ===== */
.profile-page {
    padding-bottom: 24px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 16px;
    background: linear-gradient(135deg, #FFF5F6 0%, #fff 100%);
    margin-bottom: 10px;
    border-radius: 14px;
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #FF5068, #FF7A90);
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(255,80,104,0.15);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 3px;
    color: #222;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.profile-meta {
    font-size: 12px;
    color: #999;
    line-height: 1.6;
}

.profile-signature {
    font-size: 14px;
    color: #777;
}

.profile-stats {
    display: flex;
    background: #fff;
    margin-bottom: 10px;
    border-radius: 14px;
    overflow: hidden;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 12px 4px;
    border-right: 1px solid #f0f0f0;
}

.stat-item:last-child {
    border-right: none;
}

.stat-value {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: #FF5068;
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: #999;
}

.profile-menu {
    background: #fff;
    margin-bottom: 10px;
    border-radius: 14px;
    overflow: hidden;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.15s ease;
    text-decoration: none;
}

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

.menu-item:hover,
.menu-item:active {
    background: #FFF8F9;
}

.menu-item span {
    flex: 1;
}

.menu-arrow {
    color: #ddd;
}

.menu-item-danger {
    color: #ff4d4f;
}

/* ===== 标签导航（通用）===== */
.tab-nav {
    display: flex;
    background: #fff;
    margin-bottom: 8px;
    border-radius: 10px;
    overflow: hidden;
}

.tab-nav-item {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    color: #888;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-nav-item.active {
    color: #FF5068;
    border-bottom-color: #FF5068;
    font-weight: 600;
}

/* ===== 错误页 ===== */
.error-page {
    text-align: center;
    padding: 48px 16px 16px;
}

.error-code {
    font-size: 72px;
    font-weight: 700;
    color: #ddd;
    margin-bottom: 12px;
}

.error-title {
    font-size: 19px;
    color: #333;
    margin-bottom: 8px;
}

.error-desc {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

.message-icon {
    margin-bottom: 16px;
}

.message-icon.success {
    color: #52c41a;
}

.message-icon.error {
    color: #ff4d4f;
}

.message-redirect {
    font-size: 13px;
    color: #bbb;
    margin-top: 16px;
}

/* ===== 板块详情页 ===== */
.forum-page {
    padding: 8px 0;
}

.forum-header {
    padding: 16px;
    background: #fff;
    margin-bottom: 8px;
    border-radius: 12px;
}

.forum-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #222;
}

.forum-desc {
    font-size: 14px;
    color: #777;
    margin-bottom: 8px;
}

.forum-stats {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #bbb;
}

.new-thread-btn {
    margin: 8px 16px;
}

.thread-list {
    padding: 0 16px;
}

.post-item {
    display: block;
    padding: 14px 16px;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 8px;
    color: inherit;
    transition: all 0.2s ease;
}

.post-item:hover,
.post-item:active {
    background: #FFF8F9;
}

.post-item-title {
    font-size: 14px;
    color: #222;
    margin-bottom: 8px;
    line-height: 1.4;
}

.post-item-content {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    line-height: 1.5;
}

.post-item-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #bbb;
}

/* ===== 搜索页 ===== */
.search-page {
    padding: 16px;
}

.search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.search-input-full {
    flex: 1;
    min-height: 44px;
    padding: 0 14px;
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    font-size: 15px;
}

.search-input-full:focus {
    border-color: #FF5068;
    box-shadow: 0 0 0 3px rgba(255,80,104,0.1);
}

/* ===== 通知页 ===== */
.notification-page {
    padding: 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
    color: inherit;
}

.notification-item:hover,
.notification-item:active {
    background: #FFF8F9;
}

.notification-item.unread {
    background: #FFF8F9;
}

.notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #FF5068;
    flex-shrink: 0;
    margin-top: 6px;
}

.notification-dot.read {
    background: transparent;
    border: 1px solid #ddd;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    color: #222;
    margin-bottom: 4px;
}

.notification-desc {
    font-size: 12px;
    color: #bbb;
}

.notification-time {
    font-size: 12px;
    color: #ddd;
    margin-top: 4px;
}

/* ============================================================
 * 板块列表页 — 双排网格布局（匹配截图风格）
 * ============================================================ */
.forum-index-page {
    padding: 8px 0 16px;
}

.forum-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 16px;
}

.forum-grid-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.forum-grid-card:hover,
.forum-grid-card:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255,80,104,0.15);
}

/* 板块卡片图片区 */
.forum-grid-img-wrap {
    position: relative;
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #FFE8EC 0%, #FFD1DC 40%, #FFB8C9 70%, #FF9EAF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.forum-grid-icon {
    display: block;
    width: 76%;
    max-width: 132px;
    height: 88%;
    object-fit: contain;
    filter: drop-shadow(0 6px 10px rgba(170, 54, 78, 0.18));
}

.forum-grid-img-placeholder {
    font-size: 32px;
    opacity: 0.25;
    color: #FF5068;
}

/* 置顶/推荐标签（卡片左上角）*/
.forum-grid-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #FF5068, #FF7A90);
    border-radius: 4px;
    z-index: 2;
}

/* 图片数量角标（右上角）*/
.forum-grid-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    background: rgba(255,255,255,0.92);
    border-radius: 10px;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* 板块信息文字区 */
.forum-grid-body {
    padding: 10px 12px 12px;
}

.forum-grid-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    line-height: 1.35;
    margin-bottom: 5px;
    /* 限制两行溢出省略 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.forum-grid-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #bbb;
}

.forum-grid-stat {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* 多列布局时卡片自适应缩小 */
.forum-grid[style*="repeat(6,"] .forum-grid-img-wrap,
.forum-grid[style*="repeat(7,"] .forum-grid-img-wrap { height: 96px; }
.forum-grid[style*="repeat(6,"] .forum-grid-icon,
.forum-grid[style*="repeat(7,"] .forum-grid-icon { max-width: 104px; }
.forum-grid[style*="repeat(6,"] .forum-grid-title,
.forum-grid[style*="repeat(7,"] .forum-grid-title { font-size: 13px; }

.forum-grid[style*="repeat(8,"] .forum-grid-img-wrap,
.forum-grid[style*="repeat(9,"] .forum-grid-img-wrap,
.forum-grid[style*="repeat(10,"] .forum-grid-img-wrap { height: 80px; }
.forum-grid[style*="repeat(8,"] .forum-grid-icon,
.forum-grid[style*="repeat(9,"] .forum-grid-icon,
.forum-grid[style*="repeat(10,"] .forum-grid-icon { max-width: 84px; }
.forum-grid[style*="repeat(8,"] .forum-grid-title,
.forum-grid[style*="repeat(9,"] .forum-grid-title,
.forum-grid[style*="repeat(10,"] .forum-grid-title { font-size: 12px; -webkit-line-clamp: 1; }
.forum-grid[style*="repeat(8,"] .forum-grid-stats,
.forum-grid[style*="repeat(9,"] .forum-grid-stats,
.forum-grid[style*="repeat(10,"] .forum-grid-stats { font-size: 11px; gap: 6px; }
.forum-grid[style*="repeat(8,"] .forum-grid-body,
.forum-grid[style*="repeat(9,"] .forum-grid-body,
.forum-grid[style*="repeat(10,"] .forum-grid-body { padding: 8px 10px 10px; }

/* ============================================================
 * 板块详情页 — 完美还原截图
 * ============================================================ */

/* 论坛头部：头像 + 统计 + 关注按钮 */
.forum-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    margin-bottom: 8px;
}

.forum-avatar-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFE8EC, #FFD1DC);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    border: 2px solid #FFF0F3;
}

.forum-detail-info {
    flex: 1;
    min-width: 0;
}

.forum-detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #666;
}

.forum-follow-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #FF5068;
    background: #fff;
    border: 1.5px solid #FF5068;
    border-radius: var(--border-radius-pill);
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.forum-follow-btn:hover,
.forum-follow-btn:active,
.forum-follow-btn.following {
    background: #FF5068;
    color: #fff;
}

/* 区域筛选标签栏（粉色区域: + 城市标签流式排列）*/
.filter-section {
    background: #fff;
    padding: 12px 16px 10px;
    margin-bottom: 8px;
}

.filter-row {
    display: flex;
    align-items: flex-start;
    line-height: 1.9;
}

.filter-label {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    font-size: 13px;
    font-weight: 700;
    color: #FF5068;
    background: #FFF0F2;
    border-radius: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 44px;
    letter-spacing: 0.5px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    flex: 1;
    padding-left: 4px;
}

.filter-tag {
    font-size: 14px;
    color: #555;
    padding: 0;
    transition: all 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
}

.filter-tag.active,
.filter-tag:hover,
.filter-tag:active {
    color: #FF5068;
    font-weight: 600;
}

.filter-collapse {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 12px;
    color: #999;
    border: 1px solid #eee;
    border-radius: 14px;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.filter-collapse:active {
    color: #FF5068;
    border-color: #FF5068;
}

/* ============================================================
 * 帖子双排图片卡片瀑布流（板块详情页核心）
 * ============================================================ */

.post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 16px 16px;
}

.post-card {
    display: block;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.post-card:hover,
.post-card:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255,80,104,0.12);
}

/* 广告帖卡片特殊样式 */
.post-card-ad {
    border: 2px solid #ffb347;
    background: linear-gradient(135deg, #fffdf5, #fff8e7);
}
.post-card-ad:hover,
.post-card-ad:active {
    box-shadow: 0 4px 16px rgba(255,140,0,0.2);
}
.post-card-ad .post-card-noimg {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
}

/* 卡片图片区域 */
.post-card-img-wrap {
    position: relative;
    width: 100%;
    height: 220px; /* 默认高度，PHP 动态覆盖 */
    background: #f0f0f0;
    overflow: hidden;
}

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

/* 无图时的渐变占位 */
.post-card-noimg {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5e8ec 0%, #fce4e8 30%, #ffdce4 60%, #ffcdd8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card-noimg-text {
    font-size: 28px;
    opacity: 0.2;
    color: #FF5068;
    letter-spacing: 1px;
}

/* 置顶标签（左上角粉色）*/
.post-card-tag-top {
    position: absolute;
    top: 6px;
    left: 6px;
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #FF5068, #FF7A90);
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(255,80,104,0.3);
}

/* 图片张数角标（右上角）*/
.post-card-img-count {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    background: rgba(255,255,255,0.90);
    border-radius: 10px;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* 卡片底部文字区 */
.post-card-body {
    padding: 9px 10px 10px;
}

.post-card-title {
    font-size: 13px;
    font-weight: 500;
    color: #222;
    line-height: 1.38;
    /* 两行截断 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.post-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #bbb;
}

.post-card-stat {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* 热度标记（右下角浮动图标）*/
.post-card-hot-icon {
    position: absolute;
    bottom: 68px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,80,104,0.88);
    color: #fff;
    border-radius: 50% 50% 50% 2px;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(255,80,104,0.35);
    z-index: 2;
}

/* ============================================
   帖子详情页 — 图片展示区
   ============================================ */
.thread-images {
    margin-top: 16px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.thread-image-item {
    position: relative;
    display: block;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    cursor: zoom-in;
}
.thread-image-item img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}
.thread-image-item:active img {
    transform: scale(0.98);
}

/* ============================================================
 * VIP 购买用户组页（参考截图样式）
 * 标题深粉红/橘红，选项 chip 圆角矩形，选中态为橘红填充
 * ============================================================ */
.vip-page {
    padding: 0 16px 80px;
    background: #fff;
}
.vip-section-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 16px 4px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.vip-section-title {
    font-size: 17px;
    font-weight: 700;
    color: #ff6633;
    border-bottom: 2px solid #ff6633;
    padding-bottom: 6px;
}
.vip-section-desc {
    font-size: 12px;
    color: #999;
}
.vip-form {
    padding-top: 12px;
}
.vip-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 16px 0;
}
.vip-row-price {
    align-items: center;
}
.vip-row-submit {
    margin-top: 6px;
}
.vip-label {
    width: 76px;
    flex-shrink: 0;
    text-align: right;
    color: #333;
    font-size: 14px;
    line-height: 32px;
}
.vip-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}
.vip-chip {
    appearance: none;
    border: 1px solid #d0d0d0;
    background: #fff;
    color: #333;
    font-size: 14px;
    padding: 6px 18px;
    border-radius: 4px;
    cursor: pointer;
    min-height: 32px;
    transition: all .15s ease;
    line-height: 1;
}
.vip-chip:hover {
    border-color: #ff6633;
    color: #ff6633;
}
.vip-chip.active {
    background: #ff6633;
    border-color: #ff6633;
    color: #fff;
    font-weight: 600;
}
.pay-chip.active {
    background: #2b2b2b;
    border-color: #2b2b2b;
    color: #fff;
}
.plan-chip.active {
    background: #ff6633;
    border-color: #ff6633;
    color: #fff;
}
.vip-tip {
    flex: 1 1 100%;
    margin-left: 94px;
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}
.vip-status.expired {
    color: #2faa56;
    font-weight: 600;
}
.vip-status.active {
    color: #ff6633;
    font-weight: 600;
}
.vip-price {
    display: flex;
    align-items: baseline;
    color: #ff3030;
    font-weight: 700;
}
.vip-price-currency {
    font-size: 16px;
    margin-right: 2px;
}
.vip-price-number {
    font-size: 26px;
    line-height: 1;
}
.vip-price-original {
    font-size: 14px;
    font-weight: 400;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}
.vip-submit-btn {
    appearance: none;
    background: #4a89f7;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 36px;
    font-size: 15px;
    cursor: pointer;
    transition: background .2s ease;
}
.vip-submit-btn:hover {
    background: #3a76e0;
}
.vip-foot-links {
    margin-top: 24px;
    padding: 12px 0;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}
.vip-foot-link {
    color: #999;
    font-size: 13px;
    text-decoration: none;
}
.vip-foot-link:hover { color: #ff6633; }

/* 我的订单 */
.vip-orders-page {
    padding: 0 16px 80px;
    background: #f7f7f7;
    min-height: 100vh;
}
.vip-order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 12px;
}
.vip-order-card {
    background: #fff;
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.vip-order-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px dashed #eee;
    margin-bottom: 8px;
}
.vip-order-no {
    font-size: 12px;
    color: #999;
}
.vip-order-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}
.vip-order-status.status-0 { background: #fff3e0; color: #ff8800; }
.vip-order-status.status-1 { background: #e6f7ed; color: #2faa56; }
.vip-order-status.status-2 { background: #f0f0f0; color: #999; }
.vip-order-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: #333;
}
.vip-order-body .lbl {
    display: inline-block;
    width: 70px;
    color: #999;
}
.vip-order-body .amount {
    color: #ff3030;
    font-weight: 700;
}
.empty-tip {
    padding: 60px 0;
    text-align: center;
    color: #999;
}

/* ===== 用户组横排卡片 ===== */
.vip-row-plans {
    flex-wrap: wrap;
}
.vip-plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    flex: 1;
}
.vip-plan-card {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 12px 8px 10px;
background: #fff;
border: 1.5px solid #e8e8e8;
border-radius: 10px;
cursor: pointer;
transition: all 0.2s ease;
user-select: none;
min-height: 92px;
text-align: center;
overflow: hidden;
}
.vip-plan-card:hover {
border-color: #ffb3c0;
box-shadow: 0 2px 8px rgba(255, 90, 126, 0.08);
}
.vip-plan-card.active {
border-color: #FF5A7E;
background: linear-gradient(135deg, #fff8fa, #faf8ff);
box-shadow: 0 3px 12px rgba(255, 90, 126, 0.15);
}
.vip-plan-card-name {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
}
.vip-plan-card.active .vip-plan-card-name {
color: #FF5A7E;
}
.vip-plan-card-duration {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}
.vip-plan-card-price {
font-size: 20px;
font-weight: 700;
color: #ff3030;
line-height: 1;
}
.vip-plan-card-currency {
    font-size: 14px;
    margin-right: 1px;
}
.vip-plan-card-original {
    font-size: 12px;
    color: #aaa;
    text-decoration: line-through;
    line-height: 1;
    margin-top: 2px;
}
.vip-plan-card-check {
position: absolute;
top: 6px;
right: 6px;
width: 20px;
height: 20px;
background: #FF5A7E;
color: #fff;
border-radius: 50%;
font-size: 11px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
z-index: 2;
}

@keyframes vip-check-pop {
    0% { transform: scale(0); }
    60% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* 卡密兑换页 */
.vip-cdkey-page {
    padding: 0 16px 80px;
    background: #fff;
    min-height: 100vh;
}
.vip-cdkey-form {
    padding: 24px 0;
}
.vip-cdkey-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    letter-spacing: 1.5px;
    font-family: Consolas, 'Courier New', monospace;
    color: #333;
    background: #fafafa;
    text-transform: uppercase;
}
.vip-cdkey-input:focus {
    outline: none;
    border-color: #ff6633;
    background: #fff;
}
.vip-cdkey-hint {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
    line-height: 1.6;
}
.vip-cdkey-submit {
    margin-top: 20px;
    width: 100%;
    padding: 12px;
    background: #4a89f7;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}
.vip-cdkey-submit:hover { background: #3a76e0; }

/* 小屏适配（< 380px） */
@media (max-width: 380px) {
    .vip-label { width: 60px; font-size: 13px; }
    .vip-chip { padding: 6px 12px; font-size: 13px; }
    .vip-tip { margin-left: 78px; }
    .vip-options.vip-plans .plan-chip { padding: 6px 10px; font-size: 12px; }
}

/* 等级标签样式 */
.tag-level {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1.4;
    letter-spacing: 0.5px;
}

/* 等级标签在帖子详情页的样式 */
.thread-author-level {
    display: inline-block;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    border-radius: 8px;
    margin-left: 4px;
    vertical-align: middle;
}

/* ============ 验证码 ============ */
.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-input {
    flex: 1;
    min-width: 0;
}

.captcha-img {
    height: 40px;
    width: 160px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    background: #f5f7fa;
}
