/* ============================================
   Topic Page Styles - 帖子详情页样式
   ============================================ */

/* Hero区域 */
.topic-hero {
    text-align: center;
    padding: 40px 40px;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    border-radius: 20px;
    margin-bottom: 40px;
    border: 1px solid #dbeafe;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.topic-hero h2 {
    font-size: 28px;
    color: #1e40af;
    margin-bottom: 12px;
    font-weight: 800;
    line-height: 1.4;
}

.breadcrumb {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 15px;
}

.breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
}

/* 主网格布局 */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}

/* 策略卡片 */
.strategy-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
    margin-bottom: 24px;
    overflow: hidden;
}

.strategy-card-head {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.strategy-card-head-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.strategy-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.strategy-card-head h4 {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
}

.strategy-card-head p {
    color: rgba(255,255,255,.7);
    font-size: 13px;
}

.strategy-price-badge {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 12px;
    padding: 8px 18px;
    color: #fff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: .5px;
}

.strategy-price-badge.free {
    background: rgba(16,185,129,.25);
    border-color: rgba(16,185,129,.5);
    color: #6ee7b7;
    font-size: 18px;
}

.strategy-card-body {
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.s-info-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px 18px;
    border: 1px solid #f1f5f9;
}

.s-info-item .s-label {
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.s-info-item .s-value {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    word-break: break-all;
}

.strategy-card-foot {
    padding: 0 24px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(59,130,246,.35);
    transition: all .25s;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59,130,246,.4);
}

.contact-btn-tg {
    background: linear-gradient(135deg, #0088cc, #006699);
}

.contact-btn-qq {
    background: linear-gradient(135deg, #12b7f5, #0e8fc4);
}

.free-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: #ecfdf5;
    color: #059669;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid #a7f3d0;
}

/* 帖子卡片 */
.post-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.post-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.author-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 15px;
}

.post-time {
    font-size: 13px;
    color: #94a3b8;
}

.post-content {
    padding: 30px;
    line-height: 1.8;
    color: #374151;
}

.post-content p {
    margin-bottom: 16px;
}

.post-image {
    max-width: 100%;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 隐藏内容 */
.hidden-content-box {
    background: #f0fdf4;
    border: 1px dashed #86efac;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
}

.hidden-content-box.locked {
    background: #f8fafc;
    border-color: #cbd5e1;
    text-align: center;
    color: #94a3b8;
}

.hidden-content-box.locked .lock-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.hidden-content-box h5 {
    color: #16a34a;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 700;
}

/* 回复区域 */
#replies {
    margin-bottom: 24px;
}

#replies h3 {
    font-size: 20px;
    color: #1e293b;
    margin-bottom: 20px;
    font-weight: 700;
}

.reply-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.reply-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.reply-num {
    font-size: 13px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
}

.reply-content {
    color: #374151;
    line-height: 1.8;
}

.reply-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    margin-top: 12px;
}

/* 回复表单 */
.reply-form-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.reply-form-card h3 {
    font-size: 20px;
    color: #1e293b;
    margin-bottom: 20px;
    font-weight: 700;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: #334155;
    transition: border-color .2s;
    margin-bottom: 16px;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

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

.btn-reply {
    padding: 12px 32px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-reply:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.locked-notice {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    color: #94a3b8;
    font-size: 15px;
}

/* 侧边栏 */
.sidebar-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.sidebar-card h4 {
    font-size: 16px;
    color: #1e293b;
    margin-bottom: 16px;
    border-bottom: 2px solid #eff6ff;
    padding-bottom: 10px;
    font-weight: 700;
}

.sidebar-stat {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-stat:last-child {
    border: none;
}

.sidebar-stat .val {
    font-weight: 700;
    color: #3b82f6;
}

/* 标签 */
.pin-tag {
    background: #f59e0b;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.locked-tag {
    background: #94a3b8;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

/* 提示框 */
.error-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 14px;
    color: #dc2626;
    margin-bottom: 16px;
    font-size: 14px;
}

.success-box {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 14px;
    color: #16a34a;
    margin-bottom: 16px;
    font-size: 14px;
}

.login-notice {
    text-align: center;
    padding: 30px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

.login-notice .icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.login-notice p {
    color: #64748b;
    margin-bottom: 16px;
}

/* 浏览量显示 */
.views-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
}

.views-display .hot-icon {
    color: #f59e0b;
    font-size: 16px;
}

.views-display .virtual-views {
    font-weight: 700;
    color: #dc2626;
    font-size: 15px;
}

.popular-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 10px;
    animation: pulse 2s infinite;
}

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

.hot-flame {
    display: inline-block;
    animation: flame 1s ease-in-out infinite alternate;
}

@keyframes flame {
    0% { transform: scale(1) rotate(-5deg); }
    100% { transform: scale(1.2) rotate(5deg); }
}

.admin-views {
    font-size: 11px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

/* 热门帖子卡片 */
.hot-topics-card {
    background: linear-gradient(135deg, #fff 0%, #fff7ed 100%);
    border-color: #fed7aa;
}

.hot-topics-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hot-topic-item {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

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

.hot-topic-item:hover {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    margin: 0 -8px;
    padding: 0 8px;
}

.hot-topic-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    text-decoration: none;
    color: inherit;
}

.hot-topic-rank {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
    background: #f1f5f9;
    color: #64748b;
}

.hot-topic-rank.rank-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.hot-topic-rank.rank-2 {
    background: linear-gradient(135deg, #e5e7eb, #9ca3af);
    color: #fff;
    box-shadow: 0 2px 8px rgba(156, 163, 175, 0.4);
}

.hot-topic-rank.rank-3 {
    background: linear-gradient(135deg, #fdba74, #ea580c);
    color: #fff;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.4);
}

.hot-topic-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.hot-topic-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hot-flame-mini {
    font-size: 12px;
    animation: flame 1s ease-in-out infinite alternate;
}

.hot-topic-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #94a3b8;
}

.hot-views {
    color: #dc2626;
    font-weight: 600;
}

.hot-replies {
    color: #3b82f6;
}

.hot-topic-link:hover .hot-topic-title {
    color: #3b82f6;
}

/* 响应式 */
@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    .sidebar-order {
        order: 1;
    }
    .topic-hero h2 {
        font-size: 24px;
    }
}