
/* 响应式表格样式 */
.responsive-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 桌面端表格样式 */
.desktop-table {
    display: block;
}

.table-wrapper {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f7fafc;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 800px;
}

.modern-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modern-table th {
    padding: 16px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.modern-table th.item-column {
    text-align: left;
    min-width: 250px;
}

.modern-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #e2e8f0;
}

.modern-table tbody tr:hover {
    background-color: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modern-table td {
    padding: 16px 12px;
    vertical-align: middle;
}

.item-cell {
    min-width: 250px;
}

.item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.item-info:hover {
    background-color: #f1f5f9;
}

.item-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.item-grade {
    font-size: 12px;
    color: #718096;
}

.price-cell {
    text-align: center;
    font-weight: 600;
    color: #2d3748;
    font-size: 15px;
}

.change-cell {
    text-align: center;
    cursor: pointer;
}

.change-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    color: white;
    min-width: 60px;
    text-align: center;
    transition: all 0.2s ease;
}

.change-badge.positive {
    background: linear-gradient(135deg, #48bb78, #38a169);
}

.change-badge.negative {
    background: linear-gradient(135deg, #f56565, #e53e3e);
}

.change-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 移动端卡片样式 */
.mobile-cards {
    display: none;
    padding: 16px;
    gap: 16px;
    flex-direction: column;
}

.mobile-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.current-price {
    text-align: right;
}

.price-label {
    font-size: 12px;
    color: #718096;
    margin-bottom: 4px;
}

.price-value {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.price-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.price-item .label {
    font-size: 11px;
    color: #718096;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-item .value {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

/* 响应式断点 */
@media (max-width: 1024px) {
    .modern-table {
        min-width: 700px;
    }

    .modern-table th,
    .modern-table td {
        padding: 12px 8px;
    }

    .item-avatar {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 768px) {
    .desktop-table {
        display: none;
    }

    .mobile-cards {
        display: flex;
    }

    .responsive-table-container {
        box-shadow: none;
        background: transparent;
    }

    .mobile-card .item-avatar {
        width: 44px;
        height: 44px;
    }

    .mobile-card .item-name {
        font-size: 16px;
    }

    .mobile-card .change-badge {
        font-size: 11px;
        padding: 4px 8px;
        min-width: 50px;
    }
}

@media (max-width: 480px) {
    .mobile-cards {
        padding: 12px;
        gap: 12px;
    }

    .mobile-card {
        padding: 12px;
    }

    .card-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
    }

    .current-price {
        align-self: flex-end;
    }

    .price-row {
        gap: 8px;
    }

    .mobile-card .item-avatar {
        width: 40px;
        height: 40px;
    }

    .mobile-card .item-name {
        font-size: 15px;
    }

    .price-value {
        font-size: 16px;
    }
}