/* 竞品分析模态框样式 */
.taobao-competitor-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto; /* Modal itself scrolls vertically if its content is too tall */
    overflow-x: hidden; /* Modal should not scroll horizontally */
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
}

.taobao-competitor-modal-content {
    background-color: #222;
    margin: 2% auto; /* Reduced top/bottom margin */
    padding: 20px; /* Reduced padding */
    border: 1px solid #444;
    width: 96%; /* Increased width slightly */
    max-width: 1800px; /* Increased max-width significantly for wider tables */
    border-radius: 10px; /* Slightly smaller radius */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    color: #eee;
    display: flex; /* Use flexbox to manage direct children's height */
    flex-direction: column;
    max-height: 95vh; /* Limit overall height of modal content */
}

.taobao-competitor-modal h2 {
    color: white;
    margin-top: 0;
    margin-bottom: 15px; /* Reduced margin */
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
    flex-shrink: 0; /* Prevent h2 from shrinking */
}

.competitor-form {
    background-color: #2a2a2a;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #3d3d3d;
    margin-bottom: 15px;
    flex-shrink: 0; /* Prevent form from shrinking */
}

/* 平台选择样式 */
.platform-toggle {
    display: flex;
    gap: 15px;
    margin-top: 8px;
}

.platform-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s ease;
}

.platform-option input[type="radio"] {
    margin-right: 8px;
    accent-color: #5b00d7;
}

.platform-option:hover {
    color: #fff;
}

.platform-option input[type="radio"]:checked + .platform-label {
    color: #5b00d7;
    font-weight: 600;
}

.platform-label {
    transition: color 0.2s ease;
}

/*表单内的元素样式可以保持不变*/

/* 表格整体容器 - Ensuring it fits dark theme */
.competitor-table-container {
    /* Removed max-height and vertical scrolling */
    overflow-y: hidden; /* Hiding vertical scrollbar */
    overflow-x: auto; /* Keep horizontal scroll for wide tables */
    border: 1px solid #444; /* Darker border for dark theme */
    margin-top: 15px;
    background-color: #2a2a2a; /* Dark background for the container */
    border-radius: 6px; /* Consistent rounding */
    max-width: calc(100vw - 50px); /* Ensure container doesn't overflow viewport */
    position: relative; /* For positioning shadow indicators */
}

/* 顶部滚动条包装器 */
.top-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid #444;
    border-radius: 6px 6px 0 0;
    background-color: #333;
    height: 17px; /* 为滚动条预留足够高度 */
    position: relative;
}

/* 顶部滚动条的虚拟内容 */
.top-scroll-content {
    height: 1px;
    background-color: transparent;
    /* 宽度将通过JS动态设置以匹配表格宽度 */
}

/* 美化顶部滚动条 */
.top-scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}

.top-scroll-wrapper::-webkit-scrollbar-track {
    background-color: #2a2a2a;
    border-radius: 4px;
}

.top-scroll-wrapper::-webkit-scrollbar-thumb {
    background-color: #5b00d7;
    border-radius: 4px;
    border: 1px solid #444;
}

.top-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #6c14e8;
}

/* 底部表格容器，隐藏自己的滚动条 */
.bottom-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    border-radius: 0 0 6px 6px; /* 底部圆角 */
    background-color: #2a2a2a;
}

.bottom-table-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/* 确保表格和容器的圆角匹配 */
.competitor-table {
    border-radius: 0; /* 移除表格自身的圆角，由容器处理 */
}

/* Add shadow indicators to show there's more content to scroll */
.competitor-table-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 30px;
    background: linear-gradient(to right, transparent, rgba(42, 42, 42, 0.8));
    pointer-events: none;
    opacity: 0.8;
}

.competitor-table {
    width: 100%;
    min-width: 4500px; /* Increased min-width further to ensure all columns including detail images are visible */
    border-collapse: collapse;
    table-layout: fixed; 
    color: #ccc; /* Light text for dark theme */
}

.competitor-table th,
.competitor-table td {
    border: 1px solid #4f4f4f; /* Darker border for cells */
    padding: 8px; /* Reduced padding to help with fixed dimensions */
    text-align: center; /* Center text horizontally */
    font-size: 13px;
    width: 120px; /* Fixed width for all cells - changed from 150px to 120px */
    min-width: 120px; /* Ensure minimum width */
    max-width: 120px; /* Ensure maximum width */
    height: 180px; /* Fixed height for all cells - changed from 100px to 180px */
    min-height: 180px; /* Ensure minimum height */
    max-height: 180px; /* Ensure maximum height */
    overflow: hidden; /* Hide overflow by default */
    box-sizing: border-box; /* Include padding in width/height calculation */
    vertical-align: middle; /* Vertical centering for table cells */
}

.competitor-table th {
    background-color: #383838; /* Darker header background */
    color: #f0f0f0; /* Light header text */
    font-weight: bold;
    position: sticky;
    top: 0; 
    z-index: 1;
    height: auto; /* Headers don't need fixed height */
    min-height: auto;
    max-height: none;
}

/* Cell content wrapper for overflow and click-to-expand */
.competitor-table td .cell-content-wrapper {
    max-height: 164px; /* Adjusted to account for cell padding (180px - 16px padding) */
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center; /* Center text and inline elements including buttons */
    display: flex; /* Use flexbox for centering */
    flex-direction: column; /* Stack content vertically */
    justify-content: center; /* Center content vertically */
    align-items: center; /* Center content horizontally */
}

/* Numeric values should still be right-aligned */
.competitor-table td.numeric-cell .cell-content-wrapper {
    justify-content: center; /* Keep vertical centering */
    align-items: flex-end; /* Right align numeric content */
    text-align: right;
}

.competitor-table td .cell-content-wrapper.expandable {
    cursor: pointer;
}

.competitor-table td .cell-content-wrapper.expandable::after {
    content: "...";
    position: absolute;
    bottom: 0;
    right: 5px;
    background: #2a2a2a; /* Match cell background */
    padding-left: 3px;
    font-weight: bold;
    color: #8ab4f8; /* A contrasting color for the ellipsis */
}

.competitor-table td .cell-content-wrapper.expanded::after {
    display: none; /* Hide ellipsis when expanded */
}

.competitor-table td .cell-content-wrapper.expandable:not(.expanded).overflowing::after {
    visibility: visible; /* JS would add .overflowing if scrollHeight > clientHeight */
}

.competitor-table td .cell-content-wrapper.expanded {
    position: absolute;
    z-index: 10;
    max-height: none;
    overflow: visible;
    white-space: normal;
    background-color: #2a2a2a;
    border: 1px solid #666;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    width: auto;
    min-width: 120px; /* Updated to match cell width */
    max-width: 400px; /* Limit expanded width */
}

/* Adjust image display for flexbox context */
.competitor-table td .cell-content-wrapper img {
    width: 75px; /* Fixed width 75px */
    height: 75px; /* Fixed height 75px */
    object-fit: contain; /* Maintain aspect ratio without cropping */
    display: block; /* Keep as block */
    margin: 0 auto 5px; /* Keep centered with bottom margin */
    background-color: #fff; /* White background for transparent images */
    border-radius: 3px;
    padding: 2px; /* Add slight padding */
    border: 1px solid #444; /* Add subtle border */
}

.competitor-table td .cell-content-wrapper button,
.competitor-table td .cell-content-wrapper a {
    font-size: 12px;
    padding: 4px 8px;
    margin-top: 5px; 
}

.competitor-table .ai-analyze-btn, 
.competitor-table .view-result-btn {
    background-color: #4a4a4a; /* Darker button background */
    border: 1px solid #666;    /* Matching border */
    color: #d0d0d0;           /* Light text for button */
    cursor: pointer;
    border-radius: 4px;
    display: block; /* Make button a block element */
    margin: 8px auto; /* Center horizontally with top/bottom margin */
    min-width: 60px; /* Ensure minimum width for better appearance */
}

.competitor-table .ai-analyze-btn {
    background-color: #4a4a4a;
}

.competitor-table .view-result-btn {
    background-color: #5b00d7; /* 紫色调背景 */
    border-color: #6c13e8;
    margin-top: 4px;
}

.competitor-table .ai-analyze-btn:hover {
    background-color: #5a5a5a;
    border-color: #777;
}

.competitor-table .view-result-btn:hover {
    background-color: #6c13e8;
    border-color: #7d24f9;
}

/* 添加查看结果按钮的已分析状态样式 */
.competitor-table .view-result-btn.has-result {
    position: relative;
    background-color: #6c13e8;
    animation: pulse 2s infinite;
}

/* 添加脉冲动画效果 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 19, 232, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(108, 19, 232, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(108, 19, 232, 0);
    }
}

/* Links within table */
.competitor-table td a {
    color: #8ab4f8; /* Light blue for links, good on dark backgrounds */
    text-decoration: none;
}
.competitor-table td a:hover {
    text-decoration: underline;
    color: #a1c5ff;
}

/* Adjustments for cells that contain primarily images or compact content */
.competitor-table td.image-cell-custom .cell-content-wrapper,
.competitor-table td.action-cell-buttons .cell-content-wrapper {
    /* If some cells should not be truncated or have different height logic */
    /* max-height: none; */ /* Example: disable truncation for image cells */
}

/* Column width and specific cell styling */
.competitor-table .image-cell-custom { /* 主图、产品样式 */
    width: 70px; 
    text-align: center;
}

.competitor-table .title-cell { /* 产品标题 */
    width: 200px; 
}

.competitor-table .id-cell { /* 宝贝ID */
    width: 120px;
    text-align: center;
}

.competitor-table .link-cell { /* 主流渠道线上链接 */
    width: 100px; /* Wider for "点击查看" */
    text-align: center;
}
.competitor-table .link-cell a {
    display: inline-block; /* Allow padding around link */
    padding: 3px 5px;
}


.competitor-table .price-cell,
.competitor-table .numeric-cell { /* 在售价, SKU价格, 月销量, 累计评价 */
    width: 75px; /* Adjusted width */
    text-align: right;
    white-space: nowrap;
}

.competitor-table .date-time-cell { /* 发货时间 */
    width: 70px;
    text-align: center;
    white-space: nowrap;
}

.competitor-table .sku-layout-cell { /* SKU布局 */
    width: 240px;
}

.sku-layout-cell .sku-info-cell { 
    font-size: 11px;
    text-align: left;
    white-space: pre-wrap; 
    max-height: 120px; /* Limit SKU block height */
    overflow-y: auto; 
    padding: 4px;
    background-color: rgba(0,0,0,0.15);
    border-radius: 3px;
    border: 1px solid #3a3a3a;
}

.competitor-table .ai-cell, /* AI分析按钮 */
.competitor-table .action-cell-buttons { /* 操作按钮 */
    width: 90px; /* Adjusted for potentially shorter button text or button wrapping */
    text-align: center;
}
.competitor-table .ai-cell button,
.competitor-table .action-cell-buttons button {
    padding: 4px 6px; /* Smaller padding for buttons */
    margin: 2px;
    font-size: 10px; /* Smaller font for buttons */
    white-space: normal; /* Allow button text to wrap if needed */
    line-height: 1.2;
    display: inline-block; /* To allow wrapping */
    max-width: 100%; /* Prevent button from overflowing cell */
}

/* Header specific alignments if different from general center */
.competitor-table th.price-cell,
.competitor-table th.numeric-cell {
    text-align: right; /* Align numeric headers right */
    padding-right: 10px;
}

/* --- Remaining CSS from your previous full paste, review if needed --- */
/* 上传区域样式已移除 */

#competitorDataLoading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001; 
    background-color: rgba(43, 43, 43, 0.9);
    padding: 25px 40px;
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    min-width: 250px;
    border: 1px solid rgba(91, 0, 215, 0.3);
    backdrop-filter: blur(5px);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: #5b00d7;
    border-left-color: #5b00d7;
    animation: spin 1s cubic-bezier(0.42, 0.61, 0.58, 0.41) infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.taobao-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #444;
    flex-shrink: 0;
}

.tab-btn {
    padding: 10px 20px;
    background-color: transparent;
    color: #ccc;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #fff;
    background-color: rgba(91, 0, 215, 0.1);
}

.tab-btn.active {
    color: #fff;
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #5b00d7;
    border-radius: 3px 3px 0 0;
}

.tab-btn .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background-color: #5b00d7;
    color: white;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 6px;
}

.tab-content { 
    padding: 20px 15px;
    background-color: #2a2a2a;
    border-radius: 0 0 8px 8px;
    display: none;
    animation: fadeIn 0.3s ease;
    flex-shrink: 0;
}

.tab-content.active { 
    display: block;
}

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

.product-detail-modal {
    display: none; 
    position: fixed;
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.product-detail-content {
    background-color: #1e1e1e; 
    margin: 5% auto; 
    padding: 30px;
    border: 1px solid #555;
    width: 85%;
    max-width: 1000px; 
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 10px;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.6);
    position: relative;
    color: #f0f0f0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.detail-section {
    background-color: #2c2c2c;
    border-radius: 6px;
    padding: 20px;
    border: 1px solid #484848;
}

.detail-section h3 {
    margin-top: 0;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #555;
    color: #ffffff;
    font-size: 17px;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.detail-table th, 
.detail-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #404040; 
    text-align: left;
}
.detail-table tr:last-child td {
    border-bottom: none;
}

.detail-table th { 
    background-color: #333;
    font-weight: 600;
    color: #ddd;
}

.field-name { 
    font-weight: 500;
    color: #bbb;
    width: 30%;
    padding-right: 10px;
    vertical-align: top;
}
.detail-table td {
    vertical-align: top;
    color: #eee;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.image-gallery .product-image {
    background-color: #222;
    border: 1px solid #444;
    border-radius: 4px;
    overflow: hidden;
    width: 75px;
    height: 75px;
    cursor: pointer;
}

.image-gallery .product-image img {
    width: 75px;
    height: 75px;
    object-fit: contain;
    padding: 2px;
    transition: transform 0.2s ease;
}
.image-gallery .product-image:hover img {
    transform: scale(1.1);
}

.sku-table-container { 
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #444;
    border-radius: 4px;
    margin-top: 10px;
}

.sku-count {
    font-size: 12px;
    font-weight: normal;
    color: #aaa;
    margin-left: 5px;
}

.export-section {
    margin-top: 25px;
    text-align: center;
    background-color: transparent;
    border: none;
    padding-top: 15px;
    border-top: 1px solid #444;
}

.export-detail-btn {
    background-color: #5b00d7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.export-detail-btn:hover {
    background-color: #6c13e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Ensure text elements also get proper centering */
.competitor-table td .cell-content-wrapper > span,
.competitor-table td .cell-content-wrapper > div,
.competitor-table td .cell-content-wrapper > p {
    margin: 0;
    padding: 0;
    max-width: 100%;
    word-break: break-word; /* Allow word breaking for long content */
}

/* SKU Detail Popup */
.sku-detail-popup {
    position: fixed;
    display: none;
    background-color: #333;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 15px;
    min-width: 300px;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    color: #eee;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
    z-index: 1500; /* Ensure higher than the main modal (typically 1000) */
    text-align: left;
    font-size: 13px;
}

.sku-detail-popup h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #fff;
    border-bottom: 1px solid #555;
    padding-bottom: 8px;
}

.sku-detail-popup .sku-item {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #444;
}

.sku-detail-popup .sku-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sku-detail-popup .sku-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #aaa;
}

.sku-detail-popup .sku-price {
    color: #ff9800;
    font-weight: bold;
}

.sku-detail-popup .sku-inventory {
    color: #999;
    margin-left: 10px;
}

.sku-detail-popup .close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #aaa;
    font-size: 18px;
    cursor: pointer;
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
}

.sku-detail-popup .close-popup:hover {
    color: #fff;
    background-color: rgba(255,255,255,0.1);
} 

/* Image Preview Popup - higher z-index than other popups */
.image-preview-popup {
    position: fixed;
    display: none;
    z-index: 2500; /* Higher than other popups (SKU popup: 1500, product modal: 2000) */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
}

.image-preview-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-preview-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.image-preview-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    padding: 8px 16px;
    text-align: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 10; /* Ensure button stays above the image */
    font-weight: bold;
}

.image-preview-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.image-preview-title {
    color: #fff;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
    max-width: 100%;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

/* 商品参数样式 */
.product-params-cell .cell-content-wrapper {
    max-height: 180px;
    overflow-y: auto !important;
    text-align: left !important;
    align-items: flex-start !important;
}

.product-params {
    width: 100%;
    text-align: left;
}

.param-item {
    margin-bottom: 5px;
    border-bottom: 1px dotted #555;
    padding-bottom: 3px;
}

.param-name {
    font-weight: bold;
    color: #aaa;
}

.param-value {
    color: #ddd;
}

/* 图片显示样式 */
.competitor-table td img {
    max-width: 90%;
    max-height: 120px;
    object-fit: contain;
}

/* 商品参数弹窗样式 */
.product-params-popup {
    display: none;
    position: fixed;
    z-index: 2001;
    background-color: #2a2a2a;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 600px;
    border: 1px solid #444;
}

.product-params-popup .params-popup-content {
    padding: 20px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.product-params-popup h4 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
    padding-right: 30px;
    color: #fff;
    font-size: 18px;
}

.product-params-popup .close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #aaa;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.product-params-popup .close-popup:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.product-params-popup .params-detail-content {
    overflow-y: auto;
    padding-right: 10px;
    background-color: #333;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #444;
}

.product-params-popup .param-item {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #444;
}

.product-params-popup .param-name {
    font-weight: bold;
    color: #aaa;
    margin-right: 8px;
}

.product-params-popup .param-value {
    color: #ddd;
}

/* 高亮显示参数弹窗时的单元格 */
.competitor-table td.highlight-cell {
    position: relative;
}

.competitor-table td.highlight-cell::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid #5b00d7;
    pointer-events: none;
}

/* 可点击的参数单元格样式 */
.product-params-cell .cell-content-wrapper {
    cursor: pointer;
}

.product-params-cell .cell-content-wrapper:hover {
    background-color: rgba(91, 0, 215, 0.05);
}

/* 使单元格内的参数显示更清晰 */
.product-params-cell .product-params {
    max-height: 120px;
    overflow-y: auto;
}

/* 视频预览和播放样式 */
.video-cell .cell-content-wrapper {
    position: relative;
}

.video-preview {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.video-preview img {
    width: 75px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
    background-color: #222;
    border: 1px solid #444;
    transition: all 0.2s ease;
}

.video-preview:hover img {
    transform: scale(1.05);
    border-color: #5b00d7;
    box-shadow: 0 0 10px rgba(91, 0, 215, 0.5);
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background-color: rgba(91, 0, 215, 0.8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
}

.video-preview:hover .video-play-btn {
    background-color: #6c13e8;
    transform: translate(-50%, -50%) scale(1.1);
}

/* 视频播放弹窗 */
.video-player-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.video-player-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    width: auto;
    height: auto;
}

.video-player-content video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background-color: #000;
}

.video-player-close {
    position: absolute;
    top: -40px;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.video-player-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* When no video is available */
.video-cell .cell-content-wrapper:not(:has(.video-preview)) {
    color: #777;
    font-style: italic;
}

/* Style for detail image columns */
th:nth-child(n+15):nth-child(-n+30) {
    background-color: #3a3a3a; /* Slightly different background to highlight detail image columns */
}

/* Use a different color for 'N/A' in the detail image cells */
td .cell-content-wrapper:not(:has(img)):not(:has(.video-preview)):contains('N/A') {
    color: #666;
    font-style: italic;
}