/* 横向拖动标签组件（Topics样式）- 参照piccalil.li */
.tabs-scrollable {
    position: relative;
    margin: 1.5rem 0;
    font-family: var(--font-family-base, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

/* 横向滚动容器 */
.tabs-scrollable-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 0.5rem;
}

/* 隐藏滚动条但保持滚动功能 */
.tabs-scrollable-container::-webkit-scrollbar {
    display: none;
}

/* 横向标签导航 */
.tabs-scrollable-nav {
    display: flex;
    gap: 1rem;
    padding: 0.25rem 0;
    position: relative;
    white-space: nowrap;
}

/* 横向标签按钮 */
.tabs-scrollable-btn {
    padding: 0.65rem 1.75rem;
    background-color: transparent;
    border: 1px solid var(--tab-color-border);
    color: var(--tab-color-text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: 2px solid transparent;
    outline-offset: 2px;
    position: relative;
    border-radius: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    user-select: none;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 横向标签按钮悬停效果 */
.tabs-scrollable-btn:hover:not(:disabled) {
    background-color: var(--tab-color-bg-hover);
    border-color: var(--tab-color-primary);
    color: var(--tab-color-primary);
    transform: translateY(-1px);
}

/* 横向标签按钮激活状态 */
.tabs-scrollable-btn.active {
    background-color: var(--tab-color-primary);
    border-color: var(--tab-color-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.3);
}

/* 横向标签按钮禁用状态 */
.tabs-scrollable-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 滚动指示器（可选，显示可以滚动） */
.tabs-scrollable::before,
.tabs-scrollable::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2rem;
    pointer-events: none;
    z-index: 1;
}

/* 左侧渐变遮罩（仅在有滚动空间时显示） */
.tabs-scrollable::before {
    left: 0;
    background: linear-gradient(to right, var(--tab-color-bg) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 右侧渐变遮罩（默认显示） */
.tabs-scrollable::after {
    right: 0;
    background: linear-gradient(to left, var(--tab-color-bg) 0%, transparent 100%);
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* 当有内容可滚动时显示相应的指示器 */
.tabs-scrollable.has-left-scroll::before {
    opacity: 1;
}

.tabs-scrollable.has-right-scroll::after {
    opacity: 1;
}

.tabs-scrollable.no-right-scroll::after {
    opacity: 0;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .tabs-scrollable {
        margin: 1rem 0;
    }
    
    .tabs-scrollable-nav {
        gap: 0.75rem;
    }
    
    .tabs-scrollable-btn {
        padding: 0.4rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .tabs-scrollable::before,
    .tabs-scrollable::after {
        width: 1rem;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .tabs-scrollable::before {
        background: linear-gradient(to right, var(--tab-color-bg) 0%, transparent 100%);
    }
    
    .tabs-scrollable::after {
        background: linear-gradient(to left, var(--tab-color-bg) 0%, transparent 100%);
    }
}

/* 聚焦状态样式 */
.tabs-scrollable-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.5);
    outline: none;
    z-index: 10;
}

/* CSS变量定义 */
:root {
    --tab-color-primary: #4361ee;
    --tab-color-primary-light: #4895ef;
    --tab-color-secondary: #4cc9f0;
    --tab-color-border: #e5e7eb;
    --tab-color-text-primary: #1f2937;
    --tab-color-text-secondary: #6b7280;
    --tab-color-bg: #ffffff;
    --tab-color-bg-hover: #f9fafb;
}

/* 深色模式变量 */
@media (prefers-color-scheme: dark) {
    :root {
        --tab-color-primary: #4cc9f0;
        --tab-color-primary-light: #4895ef;
        --tab-color-secondary: #4361ee;
        --tab-color-border: #374151;
        --tab-color-text-primary: #f9fafb;
        --tab-color-text-secondary: #d1d5db;
        --tab-color-bg: #111827;
        --tab-color-bg-hover: #1f2937;
    }
}