/**
 * Topic Tracker Styles
 * Styles for topic tracking feature in viewer.html
 */

/* Topic Tab in Sub Tabs - 纯文字样式，不再使用特殊背景 */
/* topic-tab 样式由 .sub-tab 统一管理 */

/* Topic Pane - no header needed, use right-click menu */

/* Topic Section Container */
.topic-section {
    margin-bottom: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.topic-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.topic-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.topic-section-icon {
    font-size: 20px;
}

.topic-section-actions {
    display: flex;
    gap: 8px;
}

.topic-section-btn {
    padding: 4px 8px;
    border: none;
    background: #f3f4f6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.topic-section-btn:hover {
    background: #e5e7eb;
}

/* Topic Cards Grid */
.topic-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

/* New Topic Button in Tab Bar */
.new-topic-tab {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7) !important;
    color: #15803d !important;
    border: 1px solid #86efac !important;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.new-topic-tab:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    background: linear-gradient(135deg, #dcfce7, #bbf7d0) !important;
}

.new-topic-tab .category-tab-icon,
.new-topic-tab .category-tab-name {
    color: #15803d !important;
}

/* Original New Topic Button (kept for compatibility) */
.new-topic-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.new-topic-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Topic Modal */
.topic-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.topic-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.topic-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.2s;
}

.topic-modal-overlay.active .topic-modal {
    transform: translateY(0);
}

.topic-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.topic-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.topic-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topic-modal-close:hover {
    background: #e5e7eb;
}

.topic-modal-body {
    padding: 24px;
}

.topic-form-group {
    margin-bottom: 20px;
}

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

.topic-form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.topic-form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* AI Generate Button */
.topic-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #86efac;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.topic-ai-btn:hover {
    background: #dcfce7;
}

.topic-ai-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.topic-ai-btn.loading {
    color: #6b7280;
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* Generated Icon Display */
.topic-icon-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    margin-top: 8px;
}

.topic-icon-preview {
    font-size: 32px;
}

.topic-icon-label {
    font-size: 13px;
    color: #6b7280;
}

/* Keywords Tags */
.topic-keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    min-height: 60px;
}

.topic-keyword-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    color: #374151;
}

.topic-keyword-remove {
    width: 16px;
    height: 16px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.topic-keyword-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

.topic-keyword-add {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: transparent;
    border: 1px dashed #d1d5db;
    border-radius: 20px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
}

.topic-keyword-add:hover {
    border-color: #4f46e5;
    color: #4f46e5;
}

/* Recommended Sources */
.topic-sources-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.topic-source-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

/* 已验证的源 - 绿色边框 */
.topic-source-item.verified {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
}

/* 待验证的源 - 黄色边框 */
.topic-source-item.unverified {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
}

.topic-source-checkbox {
    margin-top: 2px;
}

.topic-source-info {
    flex: 1;
}

.topic-source-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.topic-source-url {
    font-size: 12px;
    color: #6b7280;
    word-break: break-all;
}

.topic-source-desc {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.topic-source-type {
    padding: 2px 8px;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.topic-source-type.wechat {
    background: #dcfce7;
    color: #15803d;
}

/* 数据源分组标题 */
.topic-sources-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 12px 0 8px 0;
    padding-bottom: 4px;
}

.topic-sources-section-title:first-child {
    margin-top: 0;
}

/* 空状态提示 */
.topic-sources-empty-hint {
    text-align: center;
    padding: 24px 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 12px;
}

.topic-sources-empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.topic-sources-empty-text {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.topic-sources-empty-tip {
    font-size: 12px;
    color: #6b7280;
}

/* 数据源较少提示 */
.topic-sources-few-hint {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    font-size: 13px;
    color: #92400e;
    text-align: center;
}

/* Source Actions */
.topic-sources-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.topic-sources-action-btn {
    font-size: 12px;
    color: #4f46e5;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.topic-sources-action-btn:hover {
    text-decoration: underline;
}

/* Fetch Progress Bar */
.topic-fetch-progress {
    padding: 12px 24px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.topic-fetch-progress-text {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
    text-align: center;
}

.topic-fetch-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.topic-fetch-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Modal Footer */
.topic-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
}

.topic-modal-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.topic-modal-btn.cancel {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    color: #374151;
}

.topic-modal-btn.cancel:hover {
    background: #e5e7eb;
}

.topic-modal-btn.primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    color: white;
}

.topic-modal-btn.primary:hover {
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.topic-modal-btn.primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading Spinner */
.topic-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: topic-spin 0.8s linear infinite;
}

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

/* Empty State */
.topic-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.topic-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.topic-empty-text {
    font-size: 14px;
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 640px) {
    .topic-modal {
        width: 95%;
        max-height: 85vh;
    }
    
    .topic-cards-grid {
        grid-template-columns: 1fr;
    }
}


/* Topic context menu is now handled by category-tab-reorder.js */


/* Sources Add Section */
.topic-sources-add {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e5e7eb;
    text-align: center;
}

.topic-sources-empty {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    font-size: 14px;
}

.topic-ai-btn.small {
    padding: 6px 12px;
    font-size: 13px;
}


/* Manual Add Form */
.topic-manual-add-form {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
}

.topic-manual-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}

.topic-manual-tab {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.2s;
}

.topic-manual-tab:hover {
    background: #f3f4f6;
}

.topic-manual-tab.active {
    background: #3b82f6;
    color: white;
}

.topic-form-group.compact {
    margin-bottom: 8px;
}

.topic-form-group.compact label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    display: block;
}

.topic-manual-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.topic-modal-btn.small {
    padding: 6px 12px;
    font-size: 13px;
}

.topic-ai-btn.secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.topic-ai-btn.secondary:hover {
    background: #e5e7eb;
}


/* WeChat MP Search */
.topic-mp-search-wrapper {
    position: relative;
}

.topic-mp-search-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-top: 8px;
    background: white;
}

.topic-mp-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}

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

.topic-mp-item:hover {
    background: #f9fafb;
}

.topic-mp-item.selected {
    background: #eff6ff;
}

.topic-mp-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.topic-mp-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.topic-mp-info {
    flex: 1;
    min-width: 0;
}

.topic-mp-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.topic-mp-sig {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topic-mp-check {
    color: #3b82f6;
    font-weight: bold;
    width: 20px;
    text-align: center;
}

.topic-mp-empty {
    padding: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

.topic-mp-selected {
    margin-top: 12px;
}

.topic-mp-selected-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}

.topic-mp-selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.topic-mp-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    font-size: 12px;
    color: #1d4ed8;
}

.topic-mp-tag button {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
}

.topic-mp-tag button:hover {
    color: #ef4444;
}


/* MP Search Box */
.topic-mp-search-box {
    display: flex;
    gap: 8px;
}

.topic-mp-search-box .topic-form-input {
    flex: 1;
}

.topic-mp-search-btn {
    padding: 8px 16px;
    background: #22c55e;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.topic-mp-search-btn:hover {
    background: #16a34a;
}


/* Sources Section Title */
.topic-sources-section-title {
    font-size: 12px;
    color: #6b7280;
    margin: 12px 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px dashed #e5e7eb;
}

.topic-sources-section-title:first-child {
    margin-top: 0;
}


/* 无新闻关键词折叠区域 - 已废弃，改用编辑页面显示 */

/* 关键词新闻数量标签 */
.topic-keyword-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 500;
}

.topic-keyword-count.has-news {
    background: #dcfce7;
    color: #15803d;
}

.topic-keyword-count.no-news {
    background: #fef2f2;
    color: #dc2626;
}

/* 没有新闻的关键词标签 - 半透明 */
.topic-keyword-tag.inactive {
    opacity: 0.6;
    border-color: #fecaca;
}

/* 主题无新闻提示 */
.topic-no-news-hint {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.topic-no-news-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.topic-no-news-text {
    font-size: 16px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.topic-no-news-tip {
    font-size: 13px;
    color: #9ca3af;
}


/* WeChat Auth QR Code Styles */
.topic-wechat-auth {
    text-align: center;
    padding: 16px;
}

.topic-wechat-qr-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.topic-wechat-qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #6b7280;
    font-size: 14px;
}

.topic-wechat-qr-image {
    width: 180px;
    height: 180px;
    border-radius: 4px;
}

.topic-wechat-qr-status {
    margin-top: 12px;
    font-size: 13px;
    color: #6b7280;
}

.topic-wechat-qr-status.scanned {
    color: #f59e0b;
}

.topic-wechat-qr-status.confirmed {
    color: #22c55e;
}

.topic-wechat-qr-status.expired,
.topic-wechat-qr-status.error {
    color: #ef4444;
}

.topic-wechat-qr-error {
    color: #ef4444;
    font-size: 14px;
    margin-bottom: 12px;
}

.topic-wechat-qr-success {
    color: #22c55e;
    font-size: 16px;
    font-weight: 500;
}

.topic-wechat-qr-refresh {
    margin-top: 12px;
    padding: 6px 14px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.topic-wechat-qr-refresh:hover {
    background: #e5e7eb;
}

.topic-wechat-qr-hint {
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
}

.topic-wechat-qr-note {
    font-size: 12px;
    color: #9ca3af;
}

.topic-wechat-qr-note a {
    color: #3b82f6;
    text-decoration: none;
}

.topic-wechat-qr-note a:hover {
    text-decoration: underline;
}

.topic-mp-loading {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
}


/* Topic Tab Skeleton Loading */
.topic-tab-skeleton {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(90deg, #f0fdf4 25%, #dcfce7 50%, #f0fdf4 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
    border: 1px solid #86efac;
    min-width: 80px;
    height: 40px;
}

.topic-tab-skeleton .skeleton-icon {
    width: 20px;
    height: 20px;
    background: rgba(134, 239, 172, 0.5);
    border-radius: 4px;
}

.topic-tab-skeleton .skeleton-text {
    width: 50px;
    height: 14px;
    background: rgba(134, 239, 172, 0.5);
    border-radius: 4px;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Topic Tabs Loading Container */
.topic-tabs-loading {
    display: inline-flex;
    gap: 8px;
}


/* Wechat Credential Hint */
.wechat-credential-hint {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    margin-bottom: 12px;
}

.wechat-credential-hint .hint-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.wechat-credential-hint .hint-content {
    flex: 1;
}

.wechat-credential-hint .hint-title {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 4px;
}

.wechat-credential-hint .hint-text {
    font-size: 13px;
    color: #a16207;
    margin-bottom: 8px;
}

.wechat-credential-hint .hint-action {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wechat-credential-hint .hint-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #f59e0b;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.wechat-credential-hint .hint-link:hover {
    background: #d97706;
}

.wechat-credential-hint .hint-note {
    font-size: 12px;
    color: #a16207;
}

/* Topic Tabs Loading Skeleton */
.topic-tabs-loading {
    display: flex;
    gap: 8px;
}

.topic-tab-skeleton {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 8px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.topic-tab-skeleton .skeleton-icon {
    width: 16px;
    height: 16px;
    background: #e5e7eb;
    border-radius: 4px;
}

.topic-tab-skeleton .skeleton-text {
    width: 48px;
    height: 14px;
    background: #e5e7eb;
    border-radius: 4px;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}


/* Wechat QRCode Modal */
.wechat-qrcode-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.wechat-qrcode-modal.active {
    display: flex;
}

.wechat-qrcode-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 380px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.wechat-qrcode-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s;
}

.wechat-qrcode-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.wechat-qrcode-header {
    padding: 24px 24px 16px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.wechat-qrcode-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.wechat-qrcode-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.wechat-qrcode-body {
    padding: 20px 24px;
}

.wechat-qrcode-body > p {
    margin: 0 0 16px;
    color: #6b7280;
    font-size: 14px;
    text-align: center;
}

.wechat-qrcode-area {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wechat-qrcode-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
}

.wechat-qrcode-status {
    margin: 12px 0 0;
    font-size: 14px;
    color: #6b7280;
}

.wechat-qrcode-status.scanned {
    color: #f59e0b;
}

.wechat-qrcode-status.confirmed {
    color: #22c55e;
    font-weight: 600;
}

.wechat-qrcode-status.expired,
.wechat-qrcode-status.error {
    color: #ef4444;
}

.wechat-qrcode-error {
    color: #ef4444;
    font-size: 14px;
    margin: 0 0 12px;
}

.wechat-qrcode-refresh {
    padding: 8px 16px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s;
}

.wechat-qrcode-refresh:hover {
    background: #e5e7eb;
}

.wechat-qrcode-tips {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 12px 16px;
}

.wechat-qrcode-tips p {
    margin: 0;
    font-size: 13px;
    color: #166534;
    line-height: 1.6;
}

.wechat-qrcode-footer {
    padding: 16px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.wechat-qrcode-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.wechat-qrcode-btn.secondary {
    background: #f3f4f6;
    color: #374151;
}

.wechat-qrcode-btn.secondary:hover {
    background: #e5e7eb;
}

.wechat-qrcode-btn.primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.wechat-qrcode-btn.primary:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
}


/* Progress Bar */
.topic-progress-container {
    margin-top: 12px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.topic-progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.topic-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease-out;
}

.topic-progress-text {
    font-size: 13px;
    color: #374151;
    text-align: center;
}


/* End of file */

.stale-notice-close {
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #92400e;
    flex-shrink: 0;
    transition: background 0.2s;
}

.stale-notice-close:hover {
    background: rgba(0, 0, 0, 0.2);
}
