/* 微信社群管理系统自定义样式 */


/* 消息卡片悬停效果 */

.message-card {
    transition: all 0.3s ease;
}

.message-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    border-color: #818cf8 !important;
}


/* 搜索高亮文本效果 */

.highlight {
    background-color: rgba(250, 204, 21, 0.4);
    padding: 0 2px;
    border-radius: 2px;
}


/* URL卡片样式 */

.url-card {
    border-left: 4px solid #3b82f6;
    transition: all 0.2s ease;
}

.url-card:hover {
    border-left-width: 6px;
    background-color: #f8fafc;
}


/* 消息内容区域 */

#message-list {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f3f4f6;
}

#message-list::-webkit-scrollbar {
    width: 8px;
}

#message-list::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

#message-list::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 4px;
}

#message-list::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}


/* 消息日期样式 */

.message-date {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5rem 0;
    position: relative;
}

.message-date:before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background-color: #e5e7eb;
    z-index: 0;
}

.message-date span {
    background-color: #f8fafc;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    color: #6b7280;
    border-radius: 9999px;
    position: relative;
    z-index: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}


/* 图表容器样式 */


/* 链接总结组件样式 */

.link-summary-component .auto-play-toggle {
    position: relative;
    transition: all 0.3s ease;
}

.link-summary-component .auto-play-toggle.auto-playing {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    }
}

.link-summary-component .cards-container.transitioning {
    pointer-events: none;
}

.link-summary-component .link-card {
    transition: all 0.3s ease;
}

.link-summary-component .link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.link-summary-component .formatted-text .content-preview.line-clamp-4 {
    /* 预览阶段尽量多展示内容 */
    display: -webkit-box;
    -webkit-line-clamp: 16 !important;
    -webkit-box-orient: vertical;
    /* 初始卡片高度略微增大，以展示更多文字（卡片间距不变） */
    max-height: 24vh;
    overflow: hidden;
}

.link-summary-component .formatted-text .content-preview {
    /* 保留换行和空行，避免样式错乱 */
    white-space: pre-line;
    word-break: break-word;
    /* 直接使用内部滚动，取消行数裁剪 */
    display: block !important;
    -webkit-line-clamp: unset !important;
    max-height: 26vh;
    overflow-y: auto;
}

.link-summary-component .formatted-text .content-preview.expanded {
    /* 展开后可滚动查看内容，避免父容器截断 */
    display: block !important;
    -webkit-line-clamp: unset !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

.link-summary-component .pagination-controls button:disabled {
    transition: all 0.2s ease;
}

.link-summary-component .page-transition-feedback {
    animation: fadeInOut 1s ease-in-out;
}

@keyframes fadeInOut {
    0%,
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.chart-container {
    position: relative;
    height: 100%;
    width: 100%;
}


/* 加载动画 */

.loading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
}

.loading:after {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: loading-spin 1s linear infinite;
}

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


/* Toast通知 */

@keyframes slide-in {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#toast-notification {
    animation: slide-in 0.3s ease forwards;
}


/* 按钮动画 */

.animate-spin {
    animation: loading-spin 1s linear infinite;
}


/* 暗黑模式样式 */

.dark {
    background-color: #111827;
    color: #f3f4f6;
}

.dark .bg-white {
    background-color: #1f2937;
}

.dark .text-gray-800 {
    color: #f3f4f6;
}

.dark .text-gray-700 {
    color: #e5e7eb;
}

.dark .text-gray-600 {
    color: #d1d5db;
}

.dark .text-gray-500 {
    color: #9ca3af;
}

.dark .border-gray-200 {
    border-color: #374151;
}

.dark .border-gray-300 {
    border-color: #4b5563;
}

.dark input,
.dark select {
    background-color: #374151;
    color: #f3f4f6;
    border-color: #4b5563;
}

.dark input::placeholder {
    color: #9ca3af;
}


/* 暗黑模式下的Toast */

.dark #toast-notification {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}


/* 响应式调整 */

@media (max-width: 768px) {
    .chart-container {
        height: 250px;
    }
}


/* 消息类型图标样式 */

.msg-type-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
}

.msg-type-text {
    background-color: rgba(79, 70, 229, 0.2);
    color: #4f46e5;
}

.msg-type-image {
    background-color: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.msg-type-link {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.msg-type-video {
    background-color: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.msg-type-other {
    background-color: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
}


/* 无内容状态 */

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #9ca3af;
}

.empty-state svg {
    display: inline-block;
    margin-bottom: 1rem;
}


/* 交互过渡效果 */

button,
select,
input {
    transition: all 0.2s ease;
}


/* 消息卡片骨架屏效果 */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

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


/* 微信风格的自定义样式补充 */


/* 消息列表样式优化 */

.wechat-style-messages::-webkit-scrollbar {
    width: 6px;
}

.wechat-style-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.wechat-style-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.wechat-style-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}


/* 空状态样式 */

.empty-state {
    min-height: 300px;
}


/* 链接消息特殊样式 */

.message-bubble img {
    border-radius: 2px;
}


/* 文本内容自动换行 */

.message-bubble {
    white-space: pre-wrap;
    word-break: break-word;
}


/* 图片消息动效 */

.message-bubble.image img {
    transition: transform 0.2s ease;
}

.message-bubble.image img:hover {
    transform: scale(1.02);
    cursor: pointer;
}


/* 文本多行截断 */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* 截断长链接 */

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* 链接总
结组件样式 */

.link-summary-component {
    width: 100%;
}

.link-summary-component .component-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.link-summary-component .date-filter {
    min-width: 140px;
}

.link-summary-component .auto-play-toggle {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.link-summary-component .auto-play-toggle.active {
    background-color: #4f46e5;
    color: white;
}

.link-summary-component .auto-play-toggle.active:hover {
    background-color: #4338ca;
}

.link-summary-component .reset-filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0;
}

.link-summary-component .reset-filter-btn:hover {
    background-color: #e5e7eb;
    transform: rotate(180deg);
    transition: all 0.3s ease;
}

.link-summary-component .reset-filter-btn i {
    transition: transform 0.3s ease;
}


/* 筛选状态指示器 */

.link-summary-component .date-filter.border-indigo-500 {
    box-shadow: 0 0 0 1px #6366f1;
}

.link-summary-component .date-filter.bg-indigo-50 {
    background-color: #eef2ff;
}

.dark .link-summary-component .date-filter.bg-indigo-50 {
    background-color: #312e81;
    color: #e0e7ff;
}

.dark .link-summary-component .reset-filter-btn.bg-indigo-100 {
    background-color: #3730a3;
    color: #c7d2fe;
}

.dark .link-summary-component .reset-filter-btn.bg-indigo-100:hover {
    background-color: #4338ca;
}


/* 链接卡片样式 */

.link-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e5e7eb;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: #4f46e5;
}

.link-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.link-card .link-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    flex: 1;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-card .link-url {
    color: #4f46e5;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 4px 8px;
    border-radius: 6px;
    background-color: #f0f9ff;
    border: 1px solid #e0e7ff;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.link-card .link-url:hover {
    background-color: #dbeafe;
    border-color: #c7d2fe;
    text-decoration: underline;
}

.link-card .card-content {
    color: #4b5563;
}

.link-card .link-summary {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-card .formatted-text {
    font-size: 0.875rem;
    color: #6b7280;
    background-color: #f9fafb;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #e5e7eb;
    line-height: 1.4;
    max-height: none;
    overflow: visible;
    position: relative;
}

.link-card .formatted-text.expanded {
    max-height: none;
}

.link-card .expand-btn {
    color: #4f46e5;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    margin-top: 8px;
    padding: 0;
    text-decoration: underline;
}

.link-card .expand-btn:hover {
    color: #4338ca;
}


/* 翻页控制样式 */

.pagination-controls {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
    transition: opacity 0.3s ease;
}

.pagination-controls button {
    display: flex;
    align-items: center;
    min-width: 80px;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.pagination-controls button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-controls button:not(:disabled):active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.pagination-controls button:disabled {
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.pagination-controls .page-info {
    font-weight: 500;
    min-width: 60px;
    text-align: center;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
}


/* 页面切换动画增强 */

.cards-container {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    min-height: 200px;
}

.cards-container.transitioning {
    pointer-events: none;
}


/* 分页按钮加载状态 */

.pagination-controls button.loading {
    pointer-events: none;
}

.pagination-controls button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: button-spin 1s linear infinite;
}

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


/* 键盘导航焦点样式 */

.link-summary-component:focus {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

.link-summary-component:focus-visible {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}


/* 分页状态指示器 */

.pagination-controls .page-info.active {
    background-color: #eef2ff;
    border-color: #c7d2fe;
    color: #4338ca;
    font-weight: 600;
}


/* 分页按钮状态样式 */

.pagination-controls button.first-page {
    border-left: 3px solid #10b981;
}

.pagination-controls button.last-page {
    border-right: 3px solid #f59e0b;
}


/* 响应式分页控制 */

@media (max-width: 640px) {
    .pagination-controls {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    .pagination-controls button {
        min-width: 120px;
    }
    .pagination-controls .page-info {
        order: -1;
        min-width: 80px;
    }
}


/* 加载和空状态样式 */

.loading-state,
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.loading-state i,
.empty-state i {
    margin-bottom: 1rem;
}


/* 暗黑模式适配 */

.dark .link-card {
    background-color: #374151;
    border-color: #4b5563;
}

.dark .link-card:hover {
    border-color: #6366f1;
}

.dark .link-card .link-title {
    color: #f3f4f6;
}

.dark .link-card .card-content {
    color: #d1d5db;
}

.dark .link-card .link-summary {
    color: #d1d5db;
}

.dark .link-card .formatted-text {
    background-color: #4b5563;
    color: #e5e7eb;
    border-left-color: #6b7280;
}

.dark .link-card .link-url {
    background-color: #1e293b;
    border-color: #475569;
    color: #60a5fa;
}

.dark .link-card .link-url:hover {
    background-color: #334155;
    border-color: #64748b;
}

.dark .component-header {
    border-bottom-color: #4b5563;
}

.dark .pagination-controls {
    border-top-color: #4b5563;
}


/* 响应式设计 */

@media (max-width: 768px) {
    .link-summary-component .component-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .link-summary-component .controls {
        justify-content: space-between;
    }
    .link-card {
        padding: 16px;
    }
    .link-card .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .link-card .link-url {
        align-self: flex-start;
    }
    .pagination-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}


/* 动画效果 */

.link-card {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* 页面切换动画 */

.cards-container {
    transition: opacity 0.3s ease-in-out;
}

.cards-container.loading {
    opacity: 0.6;
}


/* 文本展开/收起功能增强 */


/* 关闭滚动遮罩渐变，避免内部滚动被遮挡 */

.link-card .formatted-text::after {
    content: none !important;
    display: none !important;
}

.link-card .formatted-text.expanded::after {
    opacity: 0;
}

.dark .link-card .formatted-text::after {
    content: none !important;
    display: none !important;
}


/* 链接卡片加载骨架屏 */

.link-card.skeleton {
    pointer-events: none;
}

.link-card.skeleton .link-title,
.link-card.skeleton .link-summary,
.link-card.skeleton .formatted-text {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    color: transparent;
    border-radius: 4px;
}

.dark .link-card.skeleton .link-title,
.dark .link-card.skeleton .link-summary,
.dark .link-card.skeleton .formatted-text {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}


/* 链接卡片焦点状态 */

.link-card:focus-within {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}


/* 改进的文本截断处理 */

.link-card .link-title {
    word-break: break-word;
    hyphens: auto;
}

.link-card .link-summary {
    word-break: break-word;
    hyphens: auto;
}


/* 链接URL的域名提取显示 */

.link-card .link-url::before {
    content: '🔗 ';
    opacity: 0.7;
}


/* 卡片进入动画的延迟效果 */

.link-card:nth-child(1) {
    animation-delay: 0ms;
}

.link-card:nth-child(2) {
    animation-delay: 100ms;
}

.link-card:nth-child(3) {
    animation-delay: 200ms;
}

.link-card:nth-child(4) {
    animation-delay: 300ms;
}

.link-card:nth-child(5) {
    animation-delay: 400ms;
}


/* 链接
总结组件样式 */

.link-summary-component {
    font-family: inherit;
}

.link-card {
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: #6366f1;
}

.link-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.link-summary {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.content-preview {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.content-preview.expanded {
    -webkit-line-clamp: unset;
    display: block;
}

.link-url {
    text-decoration: none;
    transition: color 0.2s ease;
}

.link-url:hover {
    text-decoration: underline;
}

.auto-play-toggle {
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.auto-play-toggle:hover {
    transform: translateY(-1px);
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.pagination-controls button:not(:disabled):hover {
    transform: translateY(-1px);
}


/* 加载和空状态样式 */

.loading-state,
.empty-state,
.error-state {
    min-height: 200px;
}

.loading-state i,
.empty-state i,
.error-state i {
    animation: pulse 2s infinite;
}

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


/* 响应式设计 */

@media (max-width: 768px) {
    .link-card {
        padding: 16px;
        margin-bottom: 12px;
    }
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .card-header .link-url {
        margin-top: 8px;
        align-self: flex-end;
    }
    .component-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .controls {
        justify-content: space-between;
    }
}


/* 暗黑模式支持 */

.dark .link-card {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .link-card:hover {
    border-color: #818cf8;
    background-color: #4b5563;
}

.dark .link-title {
    color: #f9fafb;
}

.dark .link-summary {
    color: #d1d5db;
}

.dark .formatted-text {
    background-color: #4b5563;
    color: #e5e7eb;
}

.dark .loading-state,
.dark .empty-state,
.dark .error-state {
    color: #d1d5db;
}


/* 链接总
结组件样式 */

.link-summary-component {
    transition: all 0.3s ease;
}

.link-summary-component .link-card {
    transition: all 0.2s ease;
}

.link-summary-component .link-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


/* 链接交互功能样式 */

.link-summary-component .link-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.link-summary-component .copy-url-btn {
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
}

.link-summary-component .copy-url-btn:hover {
    background-color: rgba(79, 70, 229, 0.1);
    transform: scale(1.1);
}

.link-summary-component .invalid-link {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.link-summary-component .invalid-url-notice {
    animation: fadeInUp 0.3s ease-out;
}

.link-summary-component .link-url.visited-link {
    color: #7c3aed !important;
}

.link-summary-component .access-feedback {
    animation: accessFeedbackSlide 0.3s ease-out;
}

@keyframes accessFeedbackSlide {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* 链接总结组件暗黑模式样式 */

.dark .link-summary-component .link-card {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .link-summary-component .link-card:hover {
    background-color: #4b5563;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}


/* 暗黑模式下的链接交互样式 */

.dark .link-summary-component .copy-url-btn:hover {
    background-color: rgba(99, 102, 241, 0.2);
}

.dark .link-summary-component .invalid-link {
    color: #f87171;
}

.dark .link-summary-component .invalid-url-notice {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.dark .link-summary-component .invalid-url-notice p {
    color: #f87171;
}

.dark .link-summary-component .link-title {
    color: #f9fafb;
}

.dark .link-summary-component .link-summary {
    color: #d1d5db;
}

.dark .link-summary-component .formatted-text {
    background-color: #4b5563;
    color: #e5e7eb;
}

.dark .link-summary-component .link-url {
    color: #93c5fd;
}

.dark .link-summary-component .link-url:hover {
    color: #dbeafe;
}

.dark .link-summary-component .expand-btn {
    color: #93c5fd;
}

.dark .link-summary-component .expand-btn:hover {
    color: #dbeafe;
}

.dark .link-summary-component .date-filter {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark .link-summary-component .date-filter:focus {
    border-color: #6366f1;
    background-color: #4b5563;
}

.dark .link-summary-component .reset-filter-btn,
.dark .link-summary-component .auto-play-toggle,
.dark .link-summary-component .prev-btn,
.dark .link-summary-component .next-btn {
    background-color: #4b5563;
    color: #e5e7eb;
    border-color: #6b7280;
}

.dark .link-summary-component .reset-filter-btn:hover,
.dark .link-summary-component .auto-play-toggle:hover,
.dark .link-summary-component .prev-btn:hover,
.dark .link-summary-component .next-btn:hover {
    background-color: #6b7280;
}

.dark .link-summary-component .auto-play-toggle.auto-playing {
    background-color: #6366f1;
    color: white;
}

.dark .link-summary-component .page-info {
    color: #d1d5db;
}

.dark .link-summary-component .loading-state,
.dark .link-summary-component .empty-state,
.dark .link-summary-component .error-state {
    color: #d1d5db;
}

.dark .link-summary-component .error-state p {
    color: #f87171;
}

.dark .link-summary-component .retry-btn {
    color: #93c5fd;
}

.dark .link-summary-component .retry-btn:hover {
    color: #dbeafe;
}


/* 页面切换动画优化 */

.link-summary-component .cards-container.transitioning {
    pointer-events: none;
}


/* 响应式设计优化 */

@media (max-width: 768px) {
    .link-summary-component .component-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .link-summary-component .controls {
        width: 100%;
        justify-content: space-between;
    }
    .link-summary-component .pagination-controls {
        flex-wrap: wrap;
        gap: 8px;
    }
    .link-summary-component .link-card {
        padding: 16px;
    }
    .link-summary-component .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}


/* 强制隐藏链接总结组件底部分页栏，防止被其他样式覆盖 */

.link-summary-component .pagination-controls {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}


/* ===== 群聊总结功能样式 ===== */

/* 紧凑型控制面板 */
#chat-summary-tab > div:first-child {
    border: 1px solid #e5e7eb;
}

/* 总结类型按钮样式增强 */
.summary-type-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.summary-type-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.summary-type-btn:hover::before {
    width: 300px;
    height: 300px;
}

.summary-type-btn.active {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.3);
}

.summary-type-btn:not(.active):hover {
    transform: translateY(-2px);
    border-color: #818cf8 !important;
    background-color: rgba(79, 70, 229, 0.05) !important;
}

/* 时间范围按钮样式 */
.time-range-btn {
    transition: all 0.2s ease;
    font-weight: 500;
}

.time-range-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.time-range-btn.bg-indigo-50 {
    font-weight: 600;
    box-shadow: 0 0 0 1px #6366f1 inset;
}

/* 开始总结按钮增强 */
#create-summary-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#create-summary-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#create-summary-btn:hover::after {
    width: 400px;
    height: 400px;
}

#create-summary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

#create-summary-btn:active {
    transform: translateY(0);
}

/* 最新总结和历史总结容器样式 */
#latest-summary-container,
#history-summary-container {
    transition: all 0.3s ease;
}

/* 总结卡片动画 */
@keyframes summaryCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#latest-summary-container > div,
#history-summary-container > div {
    animation: summaryCardSlideIn 0.5s ease-out;
}

/* 话题卡片渐变色增强 */
.bg-gradient-to-r {
    background-size: 200% 100%;
    transition: background-position 0.5s ease;
}

.bg-gradient-to-r:hover {
    background-position: 100% 0;
}

/* 频率限制提示样式 */
#frequency-hint {
    animation: pulseWarning 2s infinite;
}

@keyframes pulseWarning {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 选择框样式增强 */
#summary-group-filter {
    transition: all 0.3s ease;
    cursor: pointer;
}

#summary-group-filter:hover {
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

#summary-group-filter:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* 日期选择器样式 */
#summary-start-date,
#summary-end-date {
    transition: all 0.3s ease;
}

#summary-start-date:hover,
#summary-end-date:hover {
    border-color: #818cf8;
}

#summary-start-date:focus,
#summary-end-date:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* 历史记录查看详情按钮 */
#history-summary-container button {
    transition: all 0.2s ease;
}

#history-summary-container button:hover {
    transform: translateX(4px);
}

/* 最新总结和历史总结区域增强 */
#latest-summary-container {
    min-height: 300px;
    max-height: 600px;
    overflow-y: auto;
}

#history-summary-container {
    min-height: 250px;
    max-height: 500px;
    overflow-y: auto;
}

/* 总结卡片内容样式 */
#latest-summary-container > div,
#history-summary-container > div {
    line-height: 1.6;
}

/* 总结内容文字大小增强 */
#latest-summary-container p,
#history-summary-container p {
    font-size: 0.95rem;
}

/* 总结列表项样式 */
#latest-summary-container ul,
#history-summary-container ul {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* 响应式优化 */
@media (max-width: 1024px) {
    #chat-summary-tab .lg\\:w-1\\/3,
    #chat-summary-tab .lg\\:w-2\\/3 {
        width: 100%;
    }
    
    #chat-summary-tab .lg\\:flex-row {
        flex-direction: column;
    }
    
    /* 移动端减小最小高度 */
    #latest-summary-container {
        min-height: 200px;
    }
    
    #history-summary-container {
        min-height: 150px;
    }
}

/* 暗黑模式适配 */
.dark #chat-summary-tab > div:first-child {
    background: linear-gradient(135deg, #4c1d95 0%, #5b21b6 100%);
}

.dark .summary-type-btn:not(.active) {
    background-color: #374151;
    border-color: #4b5563;
    color: #e5e7eb;
}

.dark .summary-type-btn:not(.active):hover {
    background-color: #4b5563;
    border-color: #6366f1;
}

.dark #summary-group-filter {
    background-color: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.dark #summary-group-filter:hover {
    border-color: #818cf8;
}

/* ===== 群聊总结展开/收起功能样式 ===== */

/* 收起状态：限制高度，显示滚动条 */
.summary-container-collapsed {
    max-height: 600px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

/* 展开状态：无高度限制，不显示滚动条 */
.summary-container-expanded {
    max-height: none;
    overflow-y: visible;
    transition: max-height 0.3s ease;
}

/* 展开状态覆盖：提升选择器优先级，移除高度与滚动条 */
#latest-summary-container.summary-container-expanded {
    max-height: none;
    height: auto;
    overflow: visible;
}

/* 收起状态覆盖：避免被基础ID规则干扰 */
#latest-summary-container.summary-container-collapsed {
    max-height: 600px;
    overflow-y: auto;
}

/* 自定义滚动条样式（收起状态） */
.summary-container-collapsed::-webkit-scrollbar {
    width: 8px;
}

.summary-container-collapsed::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.summary-container-collapsed::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 4px;
}

.summary-container-collapsed::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}

/* 展开/收起按钮样式 */
#toggle-summary-btn {
    transition: all 0.2s ease;
}

#toggle-summary-btn:hover {
    transform: scale(1.05);
}

#toggle-summary-icon {
    transition: transform 0.3s ease;
}

/* 图标旋转动画 */
#toggle-summary-icon.rotated {
    transform: rotate(180deg);
}

/* 暗黑模式支持 */
.dark .summary-container-collapsed::-webkit-scrollbar-track {
    background: #374151;
}

.dark .summary-container-collapsed::-webkit-scrollbar-thumb {
    background-color: #6b7280;
}

.dark .summary-container-collapsed::-webkit-scrollbar-thumb:hover {
    background-color: #9ca3af;
}