/* 圈子动态页面专属样式 */
.circle-posts-content {
    min-height: 100vh;
    background: #f5f5f7;
    padding-bottom: 60px;
}

.app-main {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.dark-mode .circle-posts-content {
    background: #0a0a0a;
}

/* 圈子头部 */
.circle-header {
    position: relative;
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 50%, #7dd3fc 100%);
    padding-bottom: 50px;
}

.circle-cover {
    height: 140px;
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 50%, #7dd3fc 100%);
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 16px;
}

.circle-cover.has-image {
    background-size: cover;
    background-position: center;
}

.back-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.back-btn svg {
    width: 18px;
    height: 18px;
}

.back-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.3);
}

.circle-info {
    position: relative;
    margin-top: -35px;
    padding: 0 16px;
}

.circle-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.circle-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 4px solid #fff;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    background: #e5e7eb;
    flex-shrink: 0;
}

.circle-name-wrapper {
    flex: 1;
    min-width: 0;
}

.circle-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.circle-name {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.circle-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    color: #007AFF;
    flex-shrink: 0;
    vertical-align: middle;
}

.circle-verified-badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.verify-type {
    font-size: 12px;
    color: #007AFF;
    white-space: nowrap;
}

.verify-info {
    font-size: 12px;
    color: #007AFF;
    white-space: nowrap;
}

.dark-mode .circle-name {
    color: #f9fafb;
}

.circle-desc {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.dark-mode .circle-desc {
    color: #9ca3af;
}

/* 圈子操作栏 */
.circle-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 16px 16px;
}

.circle-action-btn {
    min-width: 100px;
    max-width: 140px;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.dark-mode .circle-action-btn {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

.circle-action-btn:active {
    transform: scale(0.98);
}

.circle-action-btn svg {
    width: 16px;
    height: 16px;
}

.circle-action-btn.primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.dark-mode .circle-action-btn.primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
}

.circle-action-btn.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.dark-mode .circle-action-btn.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.circle-action-btn.joined {
    background: #e5e7eb;
    color: #6b7280;
    border: none;
}

.dark-mode .circle-action-btn.joined {
    background: #374151;
    color: #9ca3af;
}

/* 圈子信息卡片 */
.circle-info-card {
    background: #fff;
    border-radius: 16px;
    margin: 0 16px 16px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dark-mode .circle-info-card {
    background: #1f2937;
}

.circle-info-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dark-mode .circle-info-title {
    color: #f9fafb;
}

.circle-info-title svg {
    width: 16px;
    height: 16px;
    fill: #6366f1;
}

.circle-info-content {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.dark-mode .circle-info-content {
    color: #9ca3af;
}

.circle-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #6b7280;
}

.dark-mode .meta-item {
    color: #9ca3af;
}

.meta-item strong {
    font-weight: 700;
    color: #1f2937;
}

.dark-mode .meta-item strong {
    color: #f9fafb;
}

.meta-divider {
    width: 1px;
    height: 14px;
    background: #d1d5db;
}

.dark-mode .meta-divider {
    background: #4b5563;
}

/* 动态列表 */
.post-list {
    padding: 16px;
    padding-bottom: 80px;
}

/* 动态卡片 */
.post-card {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.dark-mode .post-card {
    background: #1f2937;
}

.post-card:active {
    transform: scale(0.99);
}

.post-header {
    display: flex;
    padding: 12px 14px;
    gap: 10px;
}

.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    background: #e5e7eb;
}

.post-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-username {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.dark-mode .post-username {
    color: #f9fafb;
}

.post-time {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

.post-content {
    padding: 0 14px 10px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    white-space: pre-wrap;
    word-break: break-all;
}

.dark-mode .post-content {
    color: #e5e7eb;
}

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

.post-image {
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
}

.post-image:active {
    transform: scale(0.98);
}

.post-circle-tag {
    margin: 0 14px 10px;
    display: inline-block;
    padding: 3px 10px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #4f46e5;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
}

.dark-mode .post-circle-tag {
    background: #4338ca;
    color: #e0e7ff;
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-top: 1px solid #f3f4f6;
}

.dark-mode .post-actions {
    border-top-color: #374151;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.2s;
    padding: 4px 8px;
}

.action-btn svg {
    width: 20px;
    height: 20px;
}

.action-btn span {
    font-size: 12px;
}

.action-btn:active {
    opacity: 0.7;
}

.action-btn.liked {
    color: #ef4444;
}

.action-btn.liked svg {
    fill: #ef4444;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    margin: 16px;
}

.dark-mode .empty-state {
    background: #1f2937;
}

.empty-icon {
    font-size: 56px;
    margin-bottom: 12px;
    opacity: 0.6;
}

.empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
}

.dark-mode .empty-title {
    color: #f9fafb;
}

.empty-desc {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}

.empty-action {
    padding: 10px 28px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.empty-action:active {
    opacity: 0.8;
}

/* 加载更多 */
.load-more {
    padding: 16px;
    text-align: center;
}

.load-more-btn {
    padding: 10px 28px;
    background: #fff;
    color: #6366f1;
    border: 1px solid #6366f1;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.dark-mode .load-more-btn {
    background: #1f2937;
    border-color: #6366f1;
}

.load-more-btn:active {
    transform: scale(0.98);
}

/* 加载状态 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px 20px;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: 12px;
    font-size: 13px;
    color: #9ca3af;
}